summaryrefslogtreecommitdiff
path: root/Build/source/texk/ptexenc
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2014-04-28 06:37:18 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2014-04-28 06:37:18 +0000
commit58e7cc2c0db7f3e1940f38185a9e4d7c4102c3da (patch)
treef2640228059956a6d641b36caa3b132c3f316126 /Build/source/texk/ptexenc
parent05bea2a9bd70649c13ce0f10f5f7903c020911a1 (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/source/texk/ptexenc')
-rw-r--r--Build/source/texk/ptexenc/ChangeLog5
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c7
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);