summaryrefslogtreecommitdiff
path: root/Build/source/texk/cjkutils
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-07-18 02:50:36 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-07-18 02:50:36 +0000
commit649435c5493b5a4828532fe58f1fe5aa22f9194c (patch)
treef386d4a2f4a38cf4c5de54e5be0de09a1c21fcb0 /Build/source/texk/cjkutils
parent15db517a6d0610f32b5a98250ea468860261ce97 (diff)
cjkutils: apply patch of W32TeX (Windows only)
git-svn-id: svn://tug.org/texlive/trunk@59968 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/cjkutils')
-rw-r--r--Build/source/texk/cjkutils/ChangeLog5
-rw-r--r--Build/source/texk/cjkutils/TLpatches/ChangeLog4
-rw-r--r--Build/source/texk/cjkutils/TLpatches/patch-05-win32153
-rw-r--r--Build/source/texk/cjkutils/cjkutils-src/Bg5conv/bg5conv.c7
-rw-r--r--Build/source/texk/cjkutils/cjkutils-src/CEFconv/cef5conv.c7
-rw-r--r--Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefconv.c7
-rw-r--r--Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefsconv.c7
-rw-r--r--Build/source/texk/cjkutils/cjkutils-src/SJISconv/sjisconv.c7
-rw-r--r--Build/source/texk/cjkutils/cjkutils-src/extconv/extconv.c7
-rw-r--r--Build/source/texk/cjkutils/cjkutils-src/hbf2gf/hbf2gf.c4
10 files changed, 206 insertions, 2 deletions
diff --git a/Build/source/texk/cjkutils/ChangeLog b/Build/source/texk/cjkutils/ChangeLog
index 585ed859319..595cdc5ce90 100644
--- a/Build/source/texk/cjkutils/ChangeLog
+++ b/Build/source/texk/cjkutils/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-18 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * */*conv.c, hbf2gf/hbfgf.c:
+ Apply patch of W32TeX by Kakuto-san.
+
2018-09-09 Karl Berry <karl@tug.org>
* cef5conv.test,
diff --git a/Build/source/texk/cjkutils/TLpatches/ChangeLog b/Build/source/texk/cjkutils/TLpatches/ChangeLog
index d05c74e94fd..60c0393bc7b 100644
--- a/Build/source/texk/cjkutils/TLpatches/ChangeLog
+++ b/Build/source/texk/cjkutils/TLpatches/ChangeLog
@@ -1,3 +1,7 @@
+2021-07-18 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * patch-05-win32 (new): patch for W32TeX by Kakuto-san.
+
2015-04-18 Peter Breitenlohner <peb@mppmu.mpg.de>
Imported cjk-4.8.4/utils source tree from:
diff --git a/Build/source/texk/cjkutils/TLpatches/patch-05-win32 b/Build/source/texk/cjkutils/TLpatches/patch-05-win32
new file mode 100644
index 00000000000..4f95c048c5c
--- /dev/null
+++ b/Build/source/texk/cjkutils/TLpatches/patch-05-win32
@@ -0,0 +1,153 @@
+diff -urN cjkutils-src.orig/Bg5conv/bg5conv.c cjkutils-src/Bg5conv/bg5conv.c
+--- cjkutils-src.orig/Bg5conv/bg5conv.c 2018-06-04 21:21:53.198895618 +0900
++++ cjkutils-src/Bg5conv/bg5conv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -6,11 +6,18 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+ {int ch;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/CEFconv/cef5conv.c cjkutils-src/CEFconv/cef5conv.c
+--- cjkutils-src.orig/CEFconv/cef5conv.c 2018-06-04 21:21:53.198895618 +0900
++++ cjkutils-src/CEFconv/cef5conv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -7,6 +7,10 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+@@ -15,6 +19,9 @@
+ unsigned char out[32];
+ unsigned char*inp,*outp;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/CEFconv/cefconv.c cjkutils-src/CEFconv/cefconv.c
+--- cjkutils-src.orig/CEFconv/cefconv.c 2018-06-04 21:21:53.198895618 +0900
++++ cjkutils-src/CEFconv/cefconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -7,6 +7,10 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+@@ -15,6 +19,9 @@
+ unsigned char out[32];
+ unsigned char*inp,*outp;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/CEFconv/cefsconv.c cjkutils-src/CEFconv/cefsconv.c
+--- cjkutils-src.orig/CEFconv/cefsconv.c 2018-06-04 21:21:53.199895618 +0900
++++ cjkutils-src/CEFconv/cefsconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -7,6 +7,10 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+@@ -14,6 +18,9 @@
+ unsigned char in[16];
+ unsigned char out[32];
+ unsigned char*inp,*outp;
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+
+ fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
+
+diff -urN cjkutils-src.orig/SJISconv/sjisconv.c cjkutils-src/SJISconv/sjisconv.c
+--- cjkutils-src.orig/SJISconv/sjisconv.c 2018-06-04 21:21:53.199895618 +0900
++++ cjkutils-src/SJISconv/sjisconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -6,11 +6,18 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+ {int ch;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/extconv/extconv.c cjkutils-src/extconv/extconv.c
+--- cjkutils-src.orig/extconv/extconv.c 2018-06-04 21:21:53.200895618 +0900
++++ cjkutils-src/extconv/extconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -6,11 +6,18 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+ {int ch;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+
+ fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
+
+diff -urN cjkutils-src.orig/hbf2gf/hbf2gf.c cjkutils-src/hbf2gf/hbf2gf.c
+--- cjkutils-src.orig/hbf2gf/hbf2gf.c 2018-06-04 21:21:53.202895618 +0900
++++ cjkutils-src/hbf2gf/hbf2gf.c 2021-07-18 11:23:03.151348296 +0900
+@@ -286,9 +286,9 @@
+ FILE*config,*out;
+ HBF*hbf;
+
+-#ifdef msdos
++#ifdef WIN32
+ #define WRITE_BIN "wb"
+-#define WRITE_TXT "wt"
++#define WRITE_TXT "wb"
+ #define READ_BIN "rb"
+ #define READ_TXT "rt"
+ #else
diff --git a/Build/source/texk/cjkutils/cjkutils-src/Bg5conv/bg5conv.c b/Build/source/texk/cjkutils/cjkutils-src/Bg5conv/bg5conv.c
index b745e6a97f5..126dd1ac47b 100644
--- a/Build/source/texk/cjkutils/cjkutils-src/Bg5conv/bg5conv.c
+++ b/Build/source/texk/cjkutils/cjkutils-src/Bg5conv/bg5conv.c
@@ -6,11 +6,18 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
int main(int argc,char*argv[])
{int ch;
+#ifdef WIN32
+setmode(fileno(stdout), _O_BINARY);
+#endif
fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
ch= fgetc(stdin);
diff --git a/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cef5conv.c b/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cef5conv.c
index 46228a1f5de..5bc20b791c2 100644
--- a/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cef5conv.c
+++ b/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cef5conv.c
@@ -7,6 +7,10 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
int main(int argc,char*argv[])
@@ -15,6 +19,9 @@ unsigned char in[16];
unsigned char out[32];
unsigned char*inp,*outp;
+#ifdef WIN32
+setmode(fileno(stdout), _O_BINARY);
+#endif
fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
ch= fgetc(stdin);
diff --git a/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefconv.c b/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefconv.c
index 967672e7938..962f6267624 100644
--- a/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefconv.c
+++ b/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefconv.c
@@ -7,6 +7,10 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
int main(int argc,char*argv[])
@@ -15,6 +19,9 @@ unsigned char in[16];
unsigned char out[32];
unsigned char*inp,*outp;
+#ifdef WIN32
+setmode(fileno(stdout), _O_BINARY);
+#endif
fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
ch= fgetc(stdin);
diff --git a/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefsconv.c b/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefsconv.c
index bd4a701ffc5..d6eb6907327 100644
--- a/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefsconv.c
+++ b/Build/source/texk/cjkutils/cjkutils-src/CEFconv/cefsconv.c
@@ -7,6 +7,10 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
int main(int argc,char*argv[])
@@ -14,6 +18,9 @@ int main(int argc,char*argv[])
unsigned char in[16];
unsigned char out[32];
unsigned char*inp,*outp;
+#ifdef WIN32
+setmode(fileno(stdout), _O_BINARY);
+#endif
fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
diff --git a/Build/source/texk/cjkutils/cjkutils-src/SJISconv/sjisconv.c b/Build/source/texk/cjkutils/cjkutils-src/SJISconv/sjisconv.c
index af121e555d3..c6f8f78d363 100644
--- a/Build/source/texk/cjkutils/cjkutils-src/SJISconv/sjisconv.c
+++ b/Build/source/texk/cjkutils/cjkutils-src/SJISconv/sjisconv.c
@@ -6,11 +6,18 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
int main(int argc,char*argv[])
{int ch;
+#ifdef WIN32
+setmode(fileno(stdout), _O_BINARY);
+#endif
fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
ch= fgetc(stdin);
diff --git a/Build/source/texk/cjkutils/cjkutils-src/extconv/extconv.c b/Build/source/texk/cjkutils/cjkutils-src/extconv/extconv.c
index fdba62551c4..f32d59f2e14 100644
--- a/Build/source/texk/cjkutils/cjkutils-src/extconv/extconv.c
+++ b/Build/source/texk/cjkutils/cjkutils-src/extconv/extconv.c
@@ -6,11 +6,18 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
int main(int argc,char*argv[])
{int ch;
+#ifdef WIN32
+setmode(fileno(stdout), _O_BINARY);
+#endif
fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
diff --git a/Build/source/texk/cjkutils/cjkutils-src/hbf2gf/hbf2gf.c b/Build/source/texk/cjkutils/cjkutils-src/hbf2gf/hbf2gf.c
index 1e250496a64..aa523eb9fad 100644
--- a/Build/source/texk/cjkutils/cjkutils-src/hbf2gf/hbf2gf.c
+++ b/Build/source/texk/cjkutils/cjkutils-src/hbf2gf/hbf2gf.c
@@ -286,9 +286,9 @@ char output_name[STRING_LENGTH+1];
FILE*config,*out;
HBF*hbf;
-#ifdef msdos
+#ifdef WIN32
#define WRITE_BIN "wb"
-#define WRITE_TXT "wt"
+#define WRITE_TXT "wb"
#define READ_BIN "rb"
#define READ_TXT "rt"
#else