diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-21 14:17:36 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-21 14:17:36 +0000 |
commit | c3a8fb9686e80216eac324d9be41b11d5b65a8ee (patch) | |
tree | 226a28b57997dbca8813f7f4be56304d7938814c /Build/source/texk/xdvipdfmx/src | |
parent | 385515e5fcec8a4a5c72f3a51c64eea2ff35d72b (diff) |
support monocase filesystem
git-svn-id: svn://tug.org/texlive/trunk@27484 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dvipdfmx.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c index 51ead079990..5bb53f80b73 100644 --- a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c +++ b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c @@ -109,6 +109,12 @@ char *dvi_filename = NULL, *pdf_filename = NULL; static void read_config_file (const char *config); +#ifdef WIN32 +#define STRN_CMP strncasecmp +#else +#define STRN_CMP strncmp +#endif + static void set_default_pdf_filename(void) { @@ -117,16 +123,16 @@ set_default_pdf_filename(void) dvi_base = xbasename(dvi_filename); if (mp_mode && strlen(dvi_base) > 4 && - !strncmp(".mps", dvi_base + strlen(dvi_base) - 4, 4)) { + !STRN_CMP(".mps", dvi_base + strlen(dvi_base) - 4, 4)) { pdf_filename = NEW(strlen(dvi_base)+1, char); strncpy(pdf_filename, dvi_base, strlen(dvi_base) - 4); pdf_filename[strlen(dvi_base)-4] = '\0'; } else if (strlen(dvi_base) > 4 && #ifdef XETEX - (!strncmp(".dvi", dvi_base+strlen(dvi_base)-4, 4) || - !strncmp(".xdv", dvi_base+strlen(dvi_base)-4, 4))) { + (!STRN_CMP(".dvi", dvi_base+strlen(dvi_base)-4, 4) || + !STRN_CMP(".xdv", dvi_base+strlen(dvi_base)-4, 4))) { #else - !strncmp(".dvi", dvi_base+strlen(dvi_base)-4, 4)) { + !STRN_CMP(".dvi", dvi_base+strlen(dvi_base)-4, 4)) { #endif pdf_filename = NEW(strlen(dvi_base)+1, char); strncpy(pdf_filename, dvi_base, strlen(dvi_base)-4); |