diff options
Diffstat (limited to 'Build/source/texk/ptexenc')
-rw-r--r-- | Build/source/texk/ptexenc/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/ptexenc/ptexenc.c | 7 |
2 files changed, 12 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); |