texlive[44674] Build/source/texk/seetexk: texk/seetexk [Windows]:

commits+takuji at tug.org commits+takuji at tug.org
Fri Jun 23 16:52:26 CEST 2017


Revision: 44674
          http://tug.org/svn/texlive?view=revision&revision=44674
Author:   takuji
Date:     2017-06-23 16:52:25 +0200 (Fri, 23 Jun 2017)
Log Message:
-----------
texk/seetexk [Windows]: Allow Unicode file names

Modified Paths:
--------------
    trunk/Build/source/texk/seetexk/ChangeLog
    trunk/Build/source/texk/seetexk/dvibook.c
    trunk/Build/source/texk/seetexk/dviconcat.c
    trunk/Build/source/texk/seetexk/dviselect.c
    trunk/Build/source/texk/seetexk/dvitodvi.c
    trunk/Build/source/texk/seetexk/error.h

Modified: trunk/Build/source/texk/seetexk/ChangeLog
===================================================================
--- trunk/Build/source/texk/seetexk/ChangeLog	2017-06-23 00:21:22 UTC (rev 44673)
+++ trunk/Build/source/texk/seetexk/ChangeLog	2017-06-23 14:52:25 UTC (rev 44674)
@@ -1,3 +1,8 @@
+2017-06-23  TANAKA Takuji  <ttk at 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 at gmail.com>
 
 	* dvibook.c, dviclass.[ch], dvicodes.h, dviconcat.c,

Modified: trunk/Build/source/texk/seetexk/dvibook.c
===================================================================
--- trunk/Build/source/texk/seetexk/dvibook.c	2017-06-23 00:21:22 UTC (rev 44673)
+++ trunk/Build/source/texk/seetexk/dvibook.c	2017-06-23 14:52:25 UTC (rev 44674)
@@ -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 @@
 #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,7 +405,18 @@
 	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;
 
 #ifdef	ASCIIPTEX

Modified: trunk/Build/source/texk/seetexk/dviconcat.c
===================================================================
--- trunk/Build/source/texk/seetexk/dviconcat.c	2017-06-23 00:21:22 UTC (rev 44673)
+++ trunk/Build/source/texk/seetexk/dviconcat.c	2017-06-23 14:52:25 UTC (rev 44674)
@@ -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 @@
 #include <stdio.h>
 #include <ctype.h>
 
+#if defined(WIN32) && defined(KPATHSEA)
+#undef fopen
+#define fopen  fsyscp_fopen
+#endif
+
 char *ProgName;
 
 /*
@@ -399,7 +407,18 @@
 	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;
 
 	/*

Modified: trunk/Build/source/texk/seetexk/dviselect.c
===================================================================
--- trunk/Build/source/texk/seetexk/dviselect.c	2017-06-23 00:21:22 UTC (rev 44673)
+++ trunk/Build/source/texk/seetexk/dviselect.c	2017-06-23 14:52:25 UTC (rev 44674)
@@ -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 @@
 #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,7 +535,18 @@
 {
 	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);
 

Modified: trunk/Build/source/texk/seetexk/dvitodvi.c
===================================================================
--- trunk/Build/source/texk/seetexk/dvitodvi.c	2017-06-23 00:21:22 UTC (rev 44673)
+++ trunk/Build/source/texk/seetexk/dvitodvi.c	2017-06-23 14:52:25 UTC (rev 44674)
@@ -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 @@
 #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,7 +629,18 @@
 	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;
 	Magnification = 1000;

Modified: trunk/Build/source/texk/seetexk/error.h
===================================================================
--- trunk/Build/source/texk/seetexk/error.h	2017-06-23 00:21:22 UTC (rev 44673)
+++ trunk/Build/source/texk/seetexk/error.h	2017-06-23 14:52:25 UTC (rev 44674)
@@ -30,3 +30,8 @@
 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



More information about the tex-live-commits mailing list