summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c27
2 files changed, 26 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index dfcc3f1041e..b3779e137d3 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-01 Peter Breitenlohner <peb@mp.mpg.de>
+
+ * texmfmp.c [WIN32]: Minor rewrite to reduce diffs with W32TeX.
+
2011-08-30 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* texmfmp.c [WIN32]: Remove a semicolon.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index b277dca3f3c..ddacc5190b3 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -811,6 +811,7 @@ main (int ac, string *av)
#ifdef WIN32
_setmaxstdio(2048);
+ setmode(fileno(stdin), _O_BINARY);
#endif
maininit (ac, av);
@@ -1301,13 +1302,29 @@ get_input_file_name (void)
if (argv[optind] && argv[optind][0] != '&' && argv[optind][0] != '\\') {
/* Not &format, not \input, so assume simple filename. */
+ string name;
+#ifndef XeTeX
+ boolean quoted;
+#endif
+
+#ifdef WIN32
+ if (strlen (argv[optind]) > 2 && isalpha (argv[optind][0]) &&
+ argv[optind][1] == ':' && argv[optind][2] == '\\') {
+ char *pp;
+ for (pp = argv[optind]; *pp; pp++) {
+ if (*pp == '\\')
+ *pp = '/';
+ else if (IS_KANJI(pp))
+ pp++;
+ }
+ }
+#endif
+
+ name = normalize_quotes(argv[optind], "argument");
#ifdef XeTeX
- string name = normalize_quotes(argv[optind], "argument");
input_file_name = kpse_find_file(argv[optind], INPUT_FORMAT, false);
- argv[optind] = name;
#else
- string name = normalize_quotes(argv[optind], "argument");
- boolean quoted = (name[0] == '"');
+ quoted = (name[0] == '"');
if (quoted) {
/* Overwrite last quote and skip first quote. */
name[strlen(name)-1] = '\0';
@@ -1319,8 +1336,8 @@ get_input_file_name (void)
name[strlen(name)] = '"';
name--;
}
- argv[optind] = name;
#endif
+ argv[optind] = name;
}
return input_file_name;
}