diff options
author | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-04-28 06:37:18 +0000 |
---|---|---|
committer | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-04-28 06:37:18 +0000 |
commit | 58e7cc2c0db7f3e1940f38185a9e4d7c4102c3da (patch) | |
tree | f2640228059956a6d641b36caa3b132c3f316126 /Build | |
parent | 05bea2a9bd70649c13ce0f10f5f7903c020911a1 (diff) |
xetex, ptexenc [win32]: Accept Ctrl+Z as EOF on console
git-svn-id: svn://tug.org/texlive/trunk@33712 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/ptexenc/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/ptexenc/ptexenc.c | 7 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 4 |
4 files changed, 21 insertions, 0 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog b/Build/source/texk/ptexenc/ChangeLog index fc5d332cc6e..5cd1a0598e3 100644 --- a/Build/source/texk/ptexenc/ChangeLog +++ b/Build/source/texk/ptexenc/ChangeLog @@ -1,3 +1,8 @@ +2014-04-28 TANAKA Takuji <KXD02663@nifty.ne.jp> + + * ptexenc.c: Accept Ctrl+Z as EOF in console (keyboard) + in upTeX on Windows. + 2014-04-17 Karl Berry <karl@tug.org> * version.ac: 1.3.2 (without the dev) for 2014 pretest. diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c index bde9b9450c3..ddf2a8646ab 100644 --- a/Build/source/texk/ptexenc/ptexenc.c +++ b/Build/source/texk/ptexenc/ptexenc.c @@ -772,6 +772,13 @@ long input_line2(FILE *fp, unsigned char *buff, long pos, while (last < buffsize-30 && (i=getc4(fp)) != EOF && i!='\n' && i!='\r') { /* 30 is enough large size for one char */ /* attention: 4 times of write_hex() eats 16byte */ +#ifdef WIN32 + if (i == 0x1a && first == last && + fd == fileno(stdin) && _isatty(fd)) { /* Ctrl+Z on console */ + i = EOF; + break; + } else +#endif if (i == ESC) { if ((i=getc4(fp)) == '$') { /* ESC '$' (Kanji-in) */ i = getc4(fp); diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index ffd761b85d5..d255d4f7444 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,8 @@ +2014-04-28 TANAKA Takuji <KXD02663@nifty.ne.jp> + + * XeTeX_ext.c: Accept Ctrl+Z as EOF in console (keyboard). + (Windows only) + 2014-03-17 Peter Breitenlohner <peb@mppmu.mpg.de> * XeTeXFontInst.cpp, XeTeXFontInst_Mac.cpp, XeTeXFontMgr.cpp, diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index 74e19024125..f52923efd9e 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -422,6 +422,10 @@ static uint32_t *utf32Buf = NULL; break; default: // none +#ifdef WIN32 + if (f->encodingMode == WIN32CONSOLE && i == 0x1a) /* Ctrl+Z */ + return false; +#endif if (last < bufsize && i != EOF && i != '\n' && i != '\r') buffer[last++] = i; if (i != EOF && i != '\n' && i != '\r') |