diff options
author | Joachim Schrod <jschrod@acm.org> | 2007-07-03 15:03:55 +0000 |
---|---|---|
committer | Joachim Schrod <jschrod@acm.org> | 2007-07-03 15:03:55 +0000 |
commit | e3d1e43cf9a8eb198ac23d54cb248a38750c743b (patch) | |
tree | 2675d6899b51df48f942bc654adff8461dc85bb6 /Build | |
parent | 379e0b409d146e67348ee1ea1885f6b1b94e5bea (diff) |
Open include file only once, not twice.
git-svn-id: svn://tug.org/texlive/trunk@4535 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dviljk/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dviljk/dvi2xx.c | 18 |
2 files changed, 16 insertions, 7 deletions
diff --git a/Build/source/texk/dviljk/ChangeLog b/Build/source/texk/dviljk/ChangeLog index 51419944bb4..3cddb6471db 100644 --- a/Build/source/texk/dviljk/ChangeLog +++ b/Build/source/texk/dviljk/ChangeLog @@ -1,3 +1,8 @@ +2007-07-03 Joachim Schrod <jschrod@acm.org> + + * dvi2xx.c (CopyHPFile): Open include file only once, rewind + instead of reopen. + 2007-07-02 Joachim Schrod <jschrod@acm.org> * dvi2xx.c (DoSpecial): Security issue: usage of tmpnam() caused diff --git a/Build/source/texk/dviljk/dvi2xx.c b/Build/source/texk/dviljk/dvi2xx.c index de8d5083d9b..32e717d5ca0 100644 --- a/Build/source/texk/dviljk/dvi2xx.c +++ b/Build/source/texk/dviljk/dvi2xx.c @@ -911,15 +911,12 @@ char *str; } while ((binumber == BUFFSIZE) || (biact < binumber)); - BCLOSE(spfp); - qfprintf(ERR_STREAM,"]"); - - if ( (spfp = BINOPEN(str)) == FPNULL ) { - Warning("Unable to open file %s", str ); + /* reset input buffer, to read it anew */ + if ( FSEEK(spfp, 0L, SEEK_SET) == -1 ) { + Warning(" could not seek to start of file (errno=%d), abandon %s inclusion", + errno, str); return; } - qfprintf(ERR_STREAM," [%s", str); - /* reset input buffer again */ binumber = 0; biact = 0; @@ -5653,3 +5650,10 @@ Warning(va_alist) fprintf(ERR_STREAM, "\n"); va_end(args); } + + +/* + * Local Variables: + * c-file-style: "gnu" + * End: + */ |