summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx/src/dvi.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfmx/src/dvi.c')
-rw-r--r--Build/source/texk/dvipdfmx/src/dvi.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfmx/src/dvi.c b/Build/source/texk/dvipdfmx/src/dvi.c
index 189592584e9..232efca6d14 100644
--- a/Build/source/texk/dvipdfmx/src/dvi.c
+++ b/Build/source/texk/dvipdfmx/src/dvi.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/dvi.c,v 1.37 2005/08/18 08:46:21 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/dvi.c,v 1.38 2006/12/06 12:50:40 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -1684,7 +1684,7 @@ read_length (double *vp, double mag, char **pp, char *endptr)
static int
-scan_special (double *wd, double *ht, char *lm, const char *buf, UNSIGNED_QUAD size)
+scan_special (double *wd, double *ht, double *xo, double *yo, char *lm, const char *buf, UNSIGNED_QUAD size)
{
char *q, *p = (char *) buf;
char *endptr;
@@ -1724,6 +1724,14 @@ scan_special (double *wd, double *ht, char *lm, const char *buf, UNSIGNED_QUAD s
error = read_length(ht, dvi_tell_mag(), &p, endptr);
if (!error)
*ht *= dvi_tell_mag();
+ } else if (!strcmp(kp, "xoffset")) {
+ error = read_length(xo, dvi_tell_mag(), &p, endptr);
+ if (!error)
+ *xo *= dvi_tell_mag();
+ } else if (!strcmp(kp, "yoffset")) {
+ error = read_length(yo, dvi_tell_mag(), &p, endptr);
+ if (!error)
+ *yo *= dvi_tell_mag();
}
RELEASE(kp);
}
@@ -1760,7 +1768,8 @@ scan_special (double *wd, double *ht, char *lm, const char *buf, UNSIGNED_QUAD s
void
dvi_scan_paper_size (unsigned page_no,
- double *page_width, double *page_height, char *landscape)
+ double *page_width, double *page_height,
+ double *x_offset, double *y_offset, char *landscape)
{
FILE *fp = dvi_file;
long offset;
@@ -1789,7 +1798,7 @@ dvi_scan_paper_size (unsigned page_no,
size = MIN(size, 1024);
if (fread(buf, sizeof(char), size, fp) != size)
ERROR("Reading DVI file failed!");
- scan_special(page_width, page_height, landscape, buf, size);
+ scan_special(page_width, page_height, x_offset, y_offset, landscape, buf, size);
continue;
}