summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2017-06-23 14:52:25 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2017-06-23 14:52:25 +0000
commit25a27b4b95bc9c08f15b37371d23956f6faf2dd7 (patch)
tree27be5e874331789343aab9fe61759497f89a9f50 /Build
parent2e769ccbfa30589418166eb6f1c56770765a3762 (diff)
texk/seetexk [Windows]: Allow Unicode file names
git-svn-id: svn://tug.org/texlive/trunk@44674 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/seetexk/ChangeLog5
-rw-r--r--Build/source/texk/seetexk/dvibook.c19
-rw-r--r--Build/source/texk/seetexk/dviconcat.c19
-rw-r--r--Build/source/texk/seetexk/dviselect.c19
-rw-r--r--Build/source/texk/seetexk/dvitodvi.c21
-rw-r--r--Build/source/texk/seetexk/error.h5
6 files changed, 87 insertions, 1 deletions
diff --git a/Build/source/texk/seetexk/ChangeLog b/Build/source/texk/seetexk/ChangeLog
index 9fdec592050..29acaa675e9 100644
--- a/Build/source/texk/seetexk/ChangeLog
+++ b/Build/source/texk/seetexk/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-23 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * dvibook.c, dviconcat.c, dviselect.c, dvitodvi.c, error.h:
+ Allow Unicode file names. (Windows only)
+
2017-06-18 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* dvibook.c, dviclass.[ch], dvicodes.h, dviconcat.c,
diff --git a/Build/source/texk/seetexk/dvibook.c b/Build/source/texk/seetexk/dvibook.c
index 3c590e0478f..b57f50cfce1 100644
--- a/Build/source/texk/seetexk/dvibook.c
+++ b/Build/source/texk/seetexk/dvibook.c
@@ -35,6 +35,9 @@
#include <kpathsea/config.h>
#include <kpathsea/c-fopen.h>
#include <kpathsea/getopt.h>
+#if defined(WIN32)
+#include <kpathsea/variable.h>
+#endif
#else
#define FOPEN_RBIN_MODE "rb"
#define FOPEN_WBIN_MODE "wb"
@@ -54,6 +57,11 @@ extern int optind;
#include <ctype.h>
#include "seek.h"
+#if defined(WIN32) && defined(KPATHSEA)
+#undef fopen
+#define fopen fsyscp_fopen
+#endif
+
#define white(x) ((x) == ' ' || (x) == '\t' || (x) == ',')
#define MAXDVIPAGES 1000 /* max (absolute) pages in DVI file */
@@ -397,6 +405,17 @@ main(int argc, char **argv)
register int c;
register char *s;
char *outname = NULL;
+#if defined(WIN32) && defined(KPATHSEA)
+ int ac;
+ char **av, *enc;
+
+ kpse_set_program_name(argv[0], "dvibook");
+ enc = kpse_var_value("command_line_encoding");
+ if (get_command_line_args_utf8(enc, &ac, &av)) {
+ argc = ac;
+ argv = av;
+ }
+#endif
Signature = 0;
diff --git a/Build/source/texk/seetexk/dviconcat.c b/Build/source/texk/seetexk/dviconcat.c
index 9082c1d5676..db9f5cc5587 100644
--- a/Build/source/texk/seetexk/dviconcat.c
+++ b/Build/source/texk/seetexk/dviconcat.c
@@ -32,6 +32,9 @@
#include <kpathsea/config.h>
#include <kpathsea/c-fopen.h>
#include <kpathsea/getopt.h>
+#if defined(WIN32)
+#include <kpathsea/variable.h>
+#endif
#else
#define FOPEN_RBIN_MODE "rb"
#define FOPEN_WBIN_MODE "wb"
@@ -50,6 +53,11 @@ extern int optind;
#include <stdio.h>
#include <ctype.h>
+#if defined(WIN32) && defined(KPATHSEA)
+#undef fopen
+#define fopen fsyscp_fopen
+#endif
+
char *ProgName;
/*
@@ -399,6 +407,17 @@ main(int argc, char **argv)
register int c;
register char *s;
FILE *f;
+#if defined(WIN32) && defined(KPATHSEA)
+ int ac;
+ char **av, *enc;
+
+ kpse_set_program_name(argv[0], "dviconcat");
+ enc = kpse_var_value("command_line_encoding");
+ if (get_command_line_args_utf8(enc, &ac, &av)) {
+ argc = ac;
+ argv = av;
+ }
+#endif
ProgName = *argv;
diff --git a/Build/source/texk/seetexk/dviselect.c b/Build/source/texk/seetexk/dviselect.c
index 1f401072503..580db149faa 100644
--- a/Build/source/texk/seetexk/dviselect.c
+++ b/Build/source/texk/seetexk/dviselect.c
@@ -38,6 +38,9 @@
#include <kpathsea/config.h>
#include <kpathsea/c-fopen.h>
#include <kpathsea/getopt.h>
+#if defined(WIN32)
+#include <kpathsea/variable.h>
+#endif
#else
#define FOPEN_RBIN_MODE "rb"
#define FOPEN_WBIN_MODE "wb"
@@ -56,6 +59,11 @@ extern int optind;
#include <stdio.h>
#include <ctype.h>
+#if defined(WIN32) && defined(KPATHSEA)
+#undef fopen
+#define fopen fsyscp_fopen
+#endif
+
#define white(x) ((x) == ' ' || (x) == '\t' || (x) == ',')
char *ProgName;
@@ -527,6 +535,17 @@ main(int argc, char **argv)
{
register int c;
register char *s;
+#if defined(WIN32) && defined(KPATHSEA)
+ int ac;
+ char **av, *enc;
+
+ kpse_set_program_name(argv[0], "dviselect");
+ enc = kpse_var_value("command_line_encoding");
+ if (get_command_line_args_utf8(enc, &ac, &av)) {
+ argc = ac;
+ argv = av;
+ }
+#endif
ProgName = *argv;
setbuf(stderr, serrbuf);
diff --git a/Build/source/texk/seetexk/dvitodvi.c b/Build/source/texk/seetexk/dvitodvi.c
index 91c94d75b58..c643ac95178 100644
--- a/Build/source/texk/seetexk/dvitodvi.c
+++ b/Build/source/texk/seetexk/dvitodvi.c
@@ -35,6 +35,9 @@
#include <kpathsea/config.h>
#include <kpathsea/c-fopen.h>
#include <kpathsea/getopt.h>
+#if defined(WIN32)
+#include <kpathsea/variable.h>
+#endif
#else
#define FOPEN_RBIN_MODE "rb"
#define FOPEN_WBIN_MODE "wb"
@@ -52,11 +55,16 @@ extern int optind;
#include "search.h"
#include <stdio.h>
#include <ctype.h>
+#include "seek.h"
+
+#if defined(WIN32) && defined(KPATHSEA)
+#undef fopen
+#define fopen fsyscp_fopen
+#endif
#define white(x) ((x) == ' ' || (x) == '\t' || (x) == ',')
#define MAXDVIPAGES 1000 /* max (absolute) pages in DVI file */
-#include "seek.h"
char *ProgName;
@@ -621,6 +629,17 @@ main(int argc, char **argv)
register char *s;
char *outname = NULL;
char *specstring = NULL;
+#if defined(WIN32) && defined(KPATHSEA)
+ int ac;
+ char **av, *enc;
+
+ kpse_set_program_name(argv[0], "dvitodvi");
+ enc = kpse_var_value("command_line_encoding");
+ if (get_command_line_args_utf8(enc, &ac, &av)) {
+ argc = ac;
+ argv = av;
+ }
+#endif
Width = 0;
Height = 0;
diff --git a/Build/source/texk/seetexk/error.h b/Build/source/texk/seetexk/error.h
index a9b8f8cb865..e23be057ea6 100644
--- a/Build/source/texk/seetexk/error.h
+++ b/Build/source/texk/seetexk/error.h
@@ -30,3 +30,8 @@ void error(int quit, int e, const char *fmt, ...);
void panic(const char *fmt, ...);
void SetErrorTrap(void (*fn)(int quit, const char *text));
+
+#if defined(WIN32) && defined(KPATHSEA)
+#undef vfprintf
+#define vfprintf win32_vfprintf
+#endif