summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/ptexenc/ChangeLog5
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c7
-rw-r--r--Build/source/texk/web2c/xetexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c4
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')