diff options
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src/dpxfile.c')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dpxfile.c | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/dpxfile.c b/Build/source/texk/xdvipdfmx/src/dpxfile.c index c74e9817151..eca78d0f9ce 100644 --- a/Build/source/texk/xdvipdfmx/src/dpxfile.c +++ b/Build/source/texk/xdvipdfmx/src/dpxfile.c @@ -187,8 +187,7 @@ dpx_foolsearch (const char *foolname, return fqpn; } -#else /* TEXK */ -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L +#else /* !MIKTEX */ # define TDS11DOC "http://www.tug.org/ftp/tex/tds-1.1/tds.html#Fonts" static void insistupdate (const char *filename, @@ -214,7 +213,6 @@ insistupdate (const char *filename, WARN(">> %s", fir->default_path); WARN(">> Please read \"README\" file."); } -#endif /* TDS 1.1 */ static char * dpx_find__app__xyz (const char *filename, @@ -353,11 +351,9 @@ dpx_find_fontmap_file (const char *filename) fqpn = kpse_find_file(q, kpse_fontmap_format, 0); if (!fqpn) { fqpn = dpx_find__app__xyz(q, ".map", 1); -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L if (fqpn) insistupdate(q, fqpn, PACKAGE, kpse_program_text_format, kpse_fontmap_format); -#endif } #endif /* MIKETEX */ RELEASE(q); @@ -379,11 +375,9 @@ dpx_find_agl_file (const char *filename) fqpn = kpse_find_file(q, kpse_fontmap_format, 0); if (!fqpn) { fqpn = dpx_find__app__xyz(q, ".txt", 1); -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L if (fqpn) insistupdate(q, fqpn, PACKAGE, kpse_program_text_format, kpse_fontmap_format); -#endif } #endif /* MIKETEX */ RELEASE(q); @@ -430,9 +424,7 @@ dpx_find_cmap_file (const char *filename) memset(_tmpbuf, 0, _MAX_PATH+1); } #else -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L fqpn = kpse_find_file(filename, kpse_cmap_format, 0); -#endif #endif /* Files found above are assumed to be CMap, @@ -442,11 +434,9 @@ dpx_find_cmap_file (const char *filename) fqpn = dpx_foolsearch(fools[i], filename, 1); if (fqpn) { #ifndef MIKTEX -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L insistupdate(filename, fqpn, fools[i], kpse_program_text_format, kpse_cmap_format); #endif -#endif if (!qcheck_filetype(fqpn, DPX_RES_TYPE_CMAP)) { WARN("Found file \"%s\" for PostScript CMap but it doesn't look like a CMap...", fqpn); RELEASE(fqpn); @@ -477,20 +467,16 @@ dpx_find_sfd_file (const char *filename) q = ensuresuffix(filename, ".sfd"); #ifndef MIKTEX -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L fqpn = kpse_find_file(q, kpse_sfd_format, 0); -#endif #endif /* !MIKTEX */ for (i = 0; !fqpn && fools[i]; i++) { fqpn = dpx_foolsearch(fools[i], q, 1); #ifndef MIKTEX -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L if (fqpn) insistupdate(filename, fqpn, fools[i], kpse_program_text_format, kpse_sfd_format); #endif -#endif } RELEASE(q); @@ -515,22 +501,16 @@ dpx_find_enc_file (const char *filename) strcpy(fqpn, _tmpbuf); } #else -# if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L fqpn = kpse_find_file(q, kpse_enc_format, 0); -# else - fqpn = kpse_find_file(q, kpse_tex_ps_header_format, 0); -# endif #endif /* MIKTEX */ for (i = 0; !fqpn && fools[i]; i++) { fqpn = dpx_foolsearch(fools[i], q, 1); #ifndef MIKTEX -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L if (fqpn) insistupdate(filename, fqpn, fools[i], kpse_program_text_format, kpse_enc_format); #endif -#endif } RELEASE(q); @@ -596,23 +576,19 @@ dpx_find_opentype_file (const char *filename) q = ensuresuffix(filename, ".otf"); #ifndef MIKTEX -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L if (is_absolute_path(q)) fqpn = strdup(q); else fqpn = kpse_find_file(q, kpse_opentype_format, 0); if (!fqpn) { #endif -#endif fqpn = dpx_foolsearch(PACKAGE, q, 0); #ifndef MIKTEX -#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L if (fqpn) insistupdate(filename, fqpn, PACKAGE, kpse_program_binary_format, kpse_opentype_format); } #endif -#endif RELEASE(q); /* *We* use "opentype" for ".otf" (CFF). */ @@ -670,14 +646,14 @@ dpx_create_temp_file (void) # define __TMPDIR "/tmp" # define TEMPLATE "/dvipdfmx.XXXXXXXX" { - char *_tmpd; + const char *_tmpd; int _fd = -1; # ifdef HAVE_GETENV _tmpd = getenv("TMPDIR"); if (!_tmpd) - _tmpd = (char *) __TMPDIR; + _tmpd = __TMPDIR; # else - _tmpd = (char *) __TMPDIR; + _tmpd = __TMPDIR; # endif /* HAVE_GETENV */ tmp = NEW(strlen(_tmpd) + strlen(TEMPLATE) + 1, char); strcpy(tmp, _tmpd); @@ -731,7 +707,7 @@ dpx_file_apply_filter (const char *cmdtmpl, unsigned char version) { char *cmd = NULL; - char *p, *q; + const char *p, *q; size_t n, size; int error = 0; @@ -743,7 +719,7 @@ dpx_file_apply_filter (const char *cmdtmpl, size = strlen(cmdtmpl) + strlen(input) + strlen(output) + 3; cmd = NEW(size, char); memset(cmd, 0, size); - for (n = 0, p = (char *) cmdtmpl; *p != 0; p++) { + for (n = 0, p = cmdtmpl; *p != 0; p++) { #define need(s,l,m,n) \ if ((l) + (n) >= (m)) { \ (m) += (n) + 128; \ |