summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvi2tty
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2014-02-01 05:40:06 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2014-02-01 05:40:06 +0000
commitc26c1f4883a0efc030ad4a020814a5d84f5ce402 (patch)
tree42afa7510f5d4f1e24bef43351810a050fabeef8 /Build/source/texk/dvi2tty
parent148877ceedb947e45a83517cd85d4bb5c02ce6f4 (diff)
dvi2tty [win32]: Allow Unicode filename
git-svn-id: svn://tug.org/texlive/trunk@32839 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvi2tty')
-rw-r--r--Build/source/texk/dvi2tty/ChangeLog5
-rw-r--r--Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c18
-rw-r--r--Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.c12
-rw-r--r--Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h3
4 files changed, 38 insertions, 0 deletions
diff --git a/Build/source/texk/dvi2tty/ChangeLog b/Build/source/texk/dvi2tty/ChangeLog
index f198d58abf4..d2a8f00c9d5 100644
--- a/Build/source/texk/dvi2tty/ChangeLog
+++ b/Build/source/texk/dvi2tty/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-01 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * dvi2tty.c, dvi2tty.h, disdvi.c:
+ Allow Unicode filename. (Windows only)
+
2013-01-29 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Allow subdir-objects.
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c
index 8e05ec42425..c78800cd130 100644
--- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c
+++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/disdvi.c
@@ -49,6 +49,9 @@ const char *disdvi = "@(#) disdvi.c 2.26 20101027 M.J.E. Mol (c) 1989-2010, mar
# define NO_DEBUG 1
# include <kpathsea/config.h>
# include <kpathsea/lib.h>
+#if defined(WIN32)
+# include <kpathsea/variable.h>
+#endif
#endif
#include <stdio.h>
@@ -66,6 +69,10 @@ const char *disdvi = "@(#) disdvi.c 2.26 20101027 M.J.E. Mol (c) 1989-2010, mar
#if defined(THINK_C)
# include "macintosh.h"
#endif
+#if defined(WIN32) && defined(KPATHSEA)
+#undef fopen
+#define fopen fsyscp_fopen
+#endif
/*
@@ -153,6 +160,17 @@ int main(int argc, char **argv)
register int i;
unsigned long fontnum;
+#if defined(WIN32) && defined(KPATHSEA)
+ char **av, *enc;
+ int ac;
+ kpse_set_program_name(argv[0], "disdvi");
+ enc = kpse_var_value("command_line_encoding");
+ if (get_command_line_args_utf8(enc, &ac, &av)) {
+ argv = av;
+ argc = ac;
+ }
+#endif
+
#if defined(THINK_C)
argc = process_disdvi_command_line(&argv);
#endif
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.c b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.c
index 2fee22892b0..2868d90f365 100644
--- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.c
+++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.c
@@ -31,6 +31,10 @@
# include "macintosh.h"
#endif
+#if defined(WIN32) && defined(KPATHSEA)
+#undef fopen
+#define fopen fsyscp_fopen
+#endif
/*
@@ -155,6 +159,9 @@ main(int argc, char **argv)
int main(int argc, char **argv)
#endif
{
+#if defined(WIN32) && defined(KPATHSEA)
+ char *enc;
+#endif
#if defined(THINK_C)
argc = process_dvi_command_line(&argv);
@@ -163,6 +170,11 @@ int main(int argc, char **argv)
progname = *argv;
Argc = argc;
Argv = argv;
+#if defined(WIN32) && defined(KPATHSEA)
+ kpse_set_program_name(argv[0], "dvi2tty");
+ enc = kpse_var_value("command_line_encoding");
+ get_command_line_args_utf8(enc, &Argc, &Argv);
+#endif
#ifdef WIN32
set_enc_string ("sjis", "default");
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h
index 7677c09e3d7..e905156300e 100644
--- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h
+++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvi2tty.h
@@ -29,6 +29,9 @@ Copyright (C) 1989-2010 M.J.E. Mol, MESA Consulting B.V."
# define NO_DEBUG 1
# include <kpathsea/config.h>
# include <kpathsea/readable.h>
+#if defined(WIN32)
+# include <kpathsea/variable.h>
+#endif
# include <sys/types.h>
# include <sys/stat.h>
#else