diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-07-18 01:16:18 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-07-18 01:16:18 +0000 |
commit | cf7d3715860b798f7cdf0620bd02496333f34c3d (patch) | |
tree | 80013aff391d3a50a60ad082d6136e5112683147 /Build | |
parent | 02f80322b9455ebbfec42354fc3f4d7ee33058c6 (diff) |
dvi2tty: apply patch of W32TeX (Windows only)
git-svn-id: svn://tug.org/texlive/trunk@59964 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvi2tty/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvi2tty/dvi2tty-src/disdvi.c | 3 | ||||
-rw-r--r-- | Build/source/texk/dvi2tty/dvi2tty-src/dvi2tty.c | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/Build/source/texk/dvi2tty/ChangeLog b/Build/source/texk/dvi2tty/ChangeLog index da3b307d74e..7b9c85b3ab5 100644 --- a/Build/source/texk/dvi2tty/ChangeLog +++ b/Build/source/texk/dvi2tty/ChangeLog @@ -1,3 +1,8 @@ +2021-07-18 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * dvi2tty.c, disdvi.c: Apply patch of W32TeX by Kakuto-san. + (Windows only) + 2021-03-04 Karl Berry <karl@freefriends.org> * dvi2tty-src/dvi2tty.1: Fixes from Bjarni Ingi Gislason (and diff --git a/Build/source/texk/dvi2tty/dvi2tty-src/disdvi.c b/Build/source/texk/dvi2tty/dvi2tty-src/disdvi.c index c78800cd130..eb790c0ef8e 100644 --- a/Build/source/texk/dvi2tty/dvi2tty-src/disdvi.c +++ b/Build/source/texk/dvi2tty/dvi2tty-src/disdvi.c @@ -169,6 +169,7 @@ int main(int argc, char **argv) argv = av; argc = ac; } + _setmode (fileno(stdout), _O_BINARY); #endif #if defined(THINK_C) @@ -227,7 +228,7 @@ int main(int argc, char **argv) dvifp = stdin; #if defined(MSDOS) || defined(WIN32) - setmode(fileno(dvifp), O_BINARY); + setmode(fileno(dvifp), _O_BINARY); #endif while ((opcode = (int) get1()) != EOF) { /* process until end of file */ diff --git a/Build/source/texk/dvi2tty/dvi2tty-src/dvi2tty.c b/Build/source/texk/dvi2tty/dvi2tty-src/dvi2tty.c index ab44c38e16b..f3a5b082f04 100644 --- a/Build/source/texk/dvi2tty/dvi2tty-src/dvi2tty.c +++ b/Build/source/texk/dvi2tty/dvi2tty-src/dvi2tty.c @@ -179,6 +179,7 @@ int main(int argc, char **argv) #ifdef WIN32 set_enc_string ("sjis", "default"); + _setmode (fileno(stdout), _O_BINARY); #else set_enc_string (NULL, "default"); #endif @@ -203,7 +204,11 @@ int main(int argc, char **argv) #endif if (outputtofile) { /* open the outfile, if needed */ +#if defined(MSDOS) || defined(WIN32) + if ((output = fopen(OUTfilename, "wb")) == NULL) +#else if ((output = fopen(OUTfilename, "w")) == NULL) +#endif errorexit(filcr); #if defined(THINK_C) else |