summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-05-11 04:38:12 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-05-11 04:38:12 +0000
commit15aab7c66f0d872fe3ce195673f7a9f485062615 (patch)
tree2734b7e8590fb515da109247ee3c84d0f83489bd
parentb8a8ef5357db2251bc42d4589a2231790630e6cd (diff)
Allow non-ascii file names in pdfTeX (w32 only)
git-svn-id: svn://tug.org/texlive/trunk@47677 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c10
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/pdftexdir/ptexlib.h7
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.c2
6 files changed, 26 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index dc79998d8b8..6b63bfc99c9 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2018-05-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * texmfmp.c: Allow non-ascii file names for pdfTeX (w32 only).
+
2018-03-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* texmfmp.c: Remove support of short 8.3 names (w32 only).
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 78b59f407c5..04cb39e9522 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -674,7 +674,7 @@ void
maininit (int ac, string *av)
{
string main_input_file;
-#if (IS_upTeX || defined(XeTeX)) && defined(WIN32)
+#if (IS_upTeX || defined(XeTeX) || defined(pdfTeX)) && defined(WIN32)
string enc;
#endif
/* Save to pass along to topenin. */
@@ -703,10 +703,10 @@ maininit (int ac, string *av)
kpse_set_program_name (argv[0], NULL);
initkanji ();
#endif
-#if defined(XeTeX) && defined(WIN32)
+#if (defined(XeTeX) || defined(pdfTeX)) && defined(WIN32)
kpse_set_program_name (argv[0], NULL);
#endif
-#if (IS_upTeX || defined(XeTeX)) && defined(WIN32)
+#if (IS_upTeX || defined(XeTeX) || defined(pdfTeX)) && defined(WIN32)
enc = kpse_var_value("command_line_encoding");
get_command_line_args_utf8(enc, &argc, &argv);
#endif
@@ -714,7 +714,7 @@ maininit (int ac, string *av)
/* If the user says --help or --version, we need to notice early. And
since we want the --ini option, have to do it before getting into
the web (which would read the base file, etc.). */
-#if (IS_upTeX || defined(XeTeX)) && defined(WIN32)
+#if (IS_upTeX || defined(XeTeX) || defined(pdfTeX)) && defined(WIN32)
parse_options (argc, argv);
#else
parse_options (ac, av);
@@ -738,7 +738,7 @@ maininit (int ac, string *av)
/* Do this early so we can inspect kpse_invocation_name and
kpse_program_name below, and because we have to do this before
any path searching. */
-#if IS_pTeX || (defined(XeTeX) && defined(WIN32))
+#if IS_pTeX || ((defined(XeTeX) || defined(pdfTeX)) && defined(WIN32))
if (user_progname)
kpse_reset_program_name (user_progname);
#else
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index f4af0358e84..d92a00e9864 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,3 +1,7 @@
+2018-05-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * ptexlib.h: Allow non-ascii file names in pdfTeX (w32 only).
+
2018-04-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* pdftoepdf-newpoppler.cc, pdftosrc-newpoppler.cc:
diff --git a/Build/source/texk/web2c/pdftexdir/ptexlib.h b/Build/source/texk/web2c/pdftexdir/ptexlib.h
index dc3403f7677..c43c8728f9b 100644
--- a/Build/source/texk/web2c/pdftexdir/ptexlib.h
+++ b/Build/source/texk/web2c/pdftexdir/ptexlib.h
@@ -20,6 +20,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef PDFTEXLIB
# define PDFTEXLIB
+#ifdef _WIN32
+#undef fopen
+#undef xfopen
+#define fopen fsyscp_fopen
+#define xfopen fsyscp_xfopen
+#endif
+
/* WEB2C macros and prototypes */
# if !defined(PDFTEXCOERCE) && !defined(PDFETEXCOERCE)
# ifdef pdfTeX
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
index 83d1d483c64..5b874831c2f 100644
--- a/Build/source/texk/web2c/synctexdir/ChangeLog
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Allow non-ascii file names also for pdfTeX
+ (w32 only).
+
2018-01-18 Karl Berry <karl@freefriends.org>
* man5/synctex.5: spacing, typos, per Debian.
diff --git a/Build/source/texk/web2c/synctexdir/synctex.c b/Build/source/texk/web2c/synctexdir/synctex.c
index 66397d164ae..0c48281a823 100644
--- a/Build/source/texk/web2c/synctexdir/synctex.c
+++ b/Build/source/texk/web2c/synctexdir/synctex.c
@@ -292,7 +292,7 @@ mem[NODE+TYPE##_node_size-synchronization_field_size+1].cint
# define SYNCTEX_OFFSET_IS_PDF 0
# endif
-#if defined(_WIN32) && (defined(upTeX) || defined(eupTeX) || defined(XeTeX))
+#if defined(_WIN32) && (defined(pdfTeX) || defined(upTeX) || defined(eupTeX) || defined(XeTeX))
#define W32UPTEXSYNCTEX 1
#include <wchar.h>
static char *chgto_oem(char *src);