summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-06-24 22:18:04 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-06-24 22:18:04 +0000
commit46641b6545659d40a665d64d0e7239bed2235c73 (patch)
treee37d4e13ff1fad070c613c0300c2b4af4899637b /Build
parent51a8bf55920a28646bc701a7b2a438aa5fc935a0 (diff)
fix a potential bug in ptexenc.
git-svn-id: svn://tug.org/texlive/trunk@30905 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/ptexenc/ChangeLog5
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c9
2 files changed, 6 insertions, 8 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog b/Build/source/texk/ptexenc/ChangeLog
index a20eaae9b79..86e6d5f6c80 100644
--- a/Build/source/texk/ptexenc/ChangeLog
+++ b/Build/source/texk/ptexenc/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * ptexenc.c: Remove redundant lines in input_line2(), which are
+ inconsistent with those lines in texmfmp.c.
+
2013-06-24 Peter Breitenlohner <peb@mppmu.mpg.de>
* version.ac: Update version number 1.3.1 => 1.3.2dev.
diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c
index 4c1d6acc11d..b492876c081 100644
--- a/Build/source/texk/ptexenc/ptexenc.c
+++ b/Build/source/texk/ptexenc/ptexenc.c
@@ -711,6 +711,7 @@ long input_line2(FILE *fp, unsigned char *buff, long pos,
const int fd = fileno(fp);
if (infile_enc[fd] == ENC_UNKNOWN) { /* just after opened */
+ ungetbuff[fd].size = 0;
if (isUTF8Nstream(fp)) infile_enc[fd] = ENC_UTF8;
else infile_enc[fd] = get_file_enc();
}
@@ -776,14 +777,6 @@ long input_line2(FILE *fp, unsigned char *buff, long pos,
if (i == EOF || i == '\n' || i == '\r') injis = false;
if (lastchar != NULL) *lastchar = i;
- if (i == '\r' && !isatty(fd)) {
- int ii;
- while ((ii = getc4(fp)) == EOF && errno == EINTR)
- ;
- if (ii != '\n')
- ungetc4(ii, fp);
- }
-
return last;
}