summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx/src/dpxfile.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:30:17 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:30:17 +0000
commitac4c4a45682b1157c58076c40c943a3d9a2cad77 (patch)
tree2bf13ce5c730f42f654abf500e95ce60ecf4bd4c /Build/source/texk/dvipdfmx/src/dpxfile.c
parentc7373aea6badf4ce6e1bca4a5335b89569d5c8a5 (diff)
towards TL2010: texk/dvipdfmx
git-svn-id: svn://tug.org/texlive/trunk@15972 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfmx/src/dpxfile.c')
-rw-r--r--Build/source/texk/dvipdfmx/src/dpxfile.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/Build/source/texk/dvipdfmx/src/dpxfile.c b/Build/source/texk/dvipdfmx/src/dpxfile.c
index 3965b552ce6..5e5439fc4ef 100644
--- a/Build/source/texk/dvipdfmx/src/dpxfile.c
+++ b/Build/source/texk/dvipdfmx/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,
@@ -356,11 +354,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);
@@ -382,11 +378,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);
@@ -433,9 +427,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,
@@ -445,11 +437,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);
@@ -480,20 +470,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);
@@ -518,22 +504,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);
@@ -579,20 +559,16 @@ dpx_find_opentype_file (const char *filename)
q = ensuresuffix(filename, ".otf");
#ifndef MIKTEX
-#if defined(__TDS_VERSION__) && __TDS_VERSION__ >= 0x200406L
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). */
@@ -649,14 +625,14 @@ dpx_create_temp_file (void)
# define __TMPDIR "/tmp"
# define TEMPLATE "/dvipdfmx.XXXXXXX"
{
- 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);
@@ -710,7 +686,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;
@@ -722,7 +698,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; \