summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviljk
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dviljk')
-rw-r--r--Build/source/texk/dviljk/ChangeLog5
-rw-r--r--Build/source/texk/dviljk/dvi2xx.c18
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:
+ */