summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2014-07-29 07:10:49 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2014-07-29 07:10:49 +0000
commit117d1038285bced4517dbc0313a0bb3f799961ed (patch)
treed1e82b97f0942e0a94a550b9a2792235df6c40d3 /Build
parent2c82e6c5f9624187e7abd78c1bfd66663b72deaf (diff)
Rename is_xetex to is_xdv
git-svn-id: svn://tug.org/texlive/trunk@34766 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog4
-rw-r--r--Build/source/texk/dvipdfm-x/dvi.c8
-rw-r--r--Build/source/texk/dvipdfm-x/dvipdfmx.c9
-rw-r--r--Build/source/texk/dvipdfm-x/dvipdfmx.h2
-rw-r--r--Build/source/texk/dvipdfm-x/spc_pdfm.c8
5 files changed, 20 insertions, 11 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index ff6283022ff..253a51998f3 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -10,6 +10,10 @@
is no much gain from not doing so.
* pdfnames.c: Remove wrong is_xetex check.
+ * dvi.c, dvipdfmx.c, dvipdfmx.h, spc_pdfm.c: Rename is_xetex to is_xdv
+ and set it to 1 when DVI id equals XDV_ID.
+
+
2014-07-28 Jiang Jiang <gzjjgod@gmail.com>
* dpxfile.c (qcheck_filetype): Skip opening non-existent file.
diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c
index 737f3ab5def..d5862eb1dc1 100644
--- a/Build/source/texk/dvipdfm-x/dvi.c
+++ b/Build/source/texk/dvipdfm-x/dvi.c
@@ -443,11 +443,13 @@ find_post (void)
/* file_position now points to last non padding character or
* beginning of file */
if (dvi_file_size - current < 4 || current == 0 ||
- !(ch == DVI_ID || ch == DVIV_ID || (is_xetex && ch == XDV_ID))) {
+ !(ch == DVI_ID || ch == DVIV_ID || ch == XDV_ID)) {
MESG("DVI ID = %d\n", ch);
ERROR(invalid_signature);
}
+ is_xdv = ch == XDV_ID;
+
/* Make sure post_post is really there */
current = current - 5;
seek_absolute(dvi_file, current);
@@ -550,10 +552,12 @@ get_preamble_dvi_info (void)
}
ch = get_unsigned_byte(dvi_file);
- if (!(ch == DVI_ID || ch == DVIV_ID || (is_xetex && ch == XDV_ID))) {
+ if (!(ch == DVI_ID || ch == DVIV_ID || ch == XDV_ID)) {
MESG("DVI ID = %d\n", ch);
ERROR(invalid_signature);
}
+
+ is_xdv = ch == XDV_ID;
dvi_info.unit_num = get_unsigned_quad(dvi_file);
dvi_info.unit_den = get_unsigned_quad(dvi_file);
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c
index 3f29ab5dec5..1fd33f64959 100644
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.c
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c
@@ -63,11 +63,11 @@
#include "error.h"
+int is_xdv = 0;
+
#ifdef XETEX
-int is_xetex = 1;
const char *my_name = "xdvipdfmx";
#else
-int is_xetex = 0;
const char *my_name = "dvipdfmx";
#endif
@@ -153,8 +153,9 @@ show_version (void)
printf ("This is %s Version " VERSION " by the DVIPDFMx project team,\n",
my_name);
printf ("modified for TeX Live,\n");
- if (is_xetex)
- printf ("an extended version of DVIPDFMx, which in turn was\n");
+#ifdef XETEX
+ printf ("an extended version of DVIPDFMx, which in turn was\n");
+#endif
printf ("an extended version of dvipdfm-0.13.2c developed by Mark A. Wicks.\n");
printf ("\nCopyright (C) 2002-2014 the DVIPDFMx project team\n");
printf ("Copyright (C) 2006 SIL International.\n");
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.h b/Build/source/texk/dvipdfm-x/dvipdfmx.h
index add867542c3..ff33d412d4e 100644
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.h
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.h
@@ -26,7 +26,7 @@
#define _DVIPDFMX_H_
extern int compat_mode;
-extern int is_xetex;
+extern int is_xdv;
extern const char *my_name;
extern int extractbb(int argc, char *argv[]);
diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.c b/Build/source/texk/dvipdfm-x/spc_pdfm.c
index 2636a984bf8..5eb2dba61f5 100644
--- a/Build/source/texk/dvipdfm-x/spc_pdfm.c
+++ b/Build/source/texk/dvipdfm-x/spc_pdfm.c
@@ -532,7 +532,7 @@ modstrings (pdf_obj *kp, pdf_obj *vp, void *dp)
CMap *cmap = CMap_cache_get(cd->cmap_id);
if (needreencode(kp, vp, cd))
r = reencodestring(cmap, vp);
- } else if (is_xetex)
+ } else if (is_xdv)
r = maybe_reencode_utf8(vp);
if (r < 0) /* error occured... */
WARN("Failed to convert input string to UTF16...");
@@ -553,8 +553,8 @@ parse_pdf_dict_with_tounicode (const char **pp, const char *endptr, struct touni
{
pdf_obj *dict;
-/* disable this test for xdvipdfmx, as we do utf8 reencoding with no cmap */
- if (!is_xetex && cd->cmap_id < 0)
+ /* disable this test for XDV files, as we do UTF8 reencoding with no cmap */
+ if (!is_xdv && cd->cmap_id < 0)
return parse_pdf_dict(pp, endptr, NULL);
/* :( */
@@ -1077,7 +1077,7 @@ spc_handler_pdfm_dest (struct spc_env *spe, struct spc_arg *args)
return -1;
}
- if (is_xetex && maybe_reencode_utf8(name) < 0)
+ if (is_xdv && maybe_reencode_utf8(name) < 0)
WARN("Failed to convert input string to UTF16...");
array = parse_pdf_object(&args->curptr, args->endptr, NULL);