From 46641b6545659d40a665d64d0e7239bed2235c73 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Mon, 24 Jun 2013 22:18:04 +0000 Subject: fix a potential bug in ptexenc. git-svn-id: svn://tug.org/texlive/trunk@30905 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/ptexenc/ChangeLog | 5 +++++ Build/source/texk/ptexenc/ptexenc.c | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'Build/source/texk/ptexenc') 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 + + * ptexenc.c: Remove redundant lines in input_line2(), which are + inconsistent with those lines in texmfmp.c. + 2013-06-24 Peter Breitenlohner * 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; } -- cgit v1.2.3