[gs-cvs] rev 7834 - in trunk/gs: lib src
alexcher at ghostscript.com
alexcher at ghostscript.com
Sun Apr 8 11:23:38 PDT 2007
Author: alexcher
Date: 2007-04-08 11:23:38 -0700 (Sun, 08 Apr 2007)
New Revision: 7834
Modified:
trunk/gs/lib/pdf_base.ps
trunk/gs/lib/pdf_main.ps
trunk/gs/src/ziodevs.c
trunk/gs/src/ziodevsc.c
Log:
Increase the size of %stdin buffer to support larger lookahead requests and
look for for %PDF- tag in the first 1024 bytes of the file. Fix bug 687125,
DIFFERENCES:
No CET or Comparefiles differences.
Modified: trunk/gs/lib/pdf_base.ps
===================================================================
--- trunk/gs/lib/pdf_base.ps 2007-04-08 17:55:40 UTC (rev 7833)
+++ trunk/gs/lib/pdf_base.ps 2007-04-08 18:23:38 UTC (rev 7834)
@@ -47,9 +47,10 @@
% ------ Utilities ------ %
-% Define a scratch string. The PDF language definition says that
-% no line in a PDF file can exceed 255 characters.
-/pdfstring 255 string def
+% Define a scratch string. The PDF language definition says that
+% no line in a PDF file can exceed 255 characters, but this string
+% is also used to search for %PDF-, which needs 1024 characters.
+/pdfstring 1024 string def
% Read the previous line of a file. If we aren't at a line boundary,
% read the line containing the current position.
Modified: trunk/gs/lib/pdf_main.ps
===================================================================
--- trunk/gs/lib/pdf_main.ps 2007-04-08 17:55:40 UTC (rev 7833)
+++ trunk/gs/lib/pdf_main.ps 2007-04-08 18:23:38 UTC (rev 7834)
@@ -76,7 +76,7 @@
} loop
exch pop
{
- dup 127 string .peekstring { % "128 string" doesn't work for "(%stdin) run"
+ dup 1023 string .peekstring { % "1024 string" exceeds current %stdin buffer"
(%PDF-1.) search {
3 1 roll pop pop
dup (%!PS) search not {
Modified: trunk/gs/src/ziodevs.c
===================================================================
--- trunk/gs/src/ziodevs.c 2007-04-08 17:55:40 UTC (rev 7833)
+++ trunk/gs/src/ziodevs.c 2007-04-08 18:23:38 UTC (rev 7834)
@@ -43,7 +43,7 @@
* immediately afterwards so as not to wind up with dangling references.
*/
-#define STDIN_BUF_SIZE 128
+#define STDIN_BUF_SIZE 1024
private iodev_proc_init(stdin_init);
private iodev_proc_open_device(stdin_open);
Modified: trunk/gs/src/ziodevsc.c
===================================================================
--- trunk/gs/src/ziodevsc.c 2007-04-08 17:55:40 UTC (rev 7833)
+++ trunk/gs/src/ziodevsc.c 2007-04-08 18:23:38 UTC (rev 7834)
@@ -45,7 +45,7 @@
* immediately afterwards so as not to wind up with dangling references.
*/
-#define STDIN_BUF_SIZE 128
+#define STDIN_BUF_SIZE 1024
private iodev_proc_init(stdin_init);
private iodev_proc_open_device(stdin_open);
const gx_io_device gs_iodev_stdin =
More information about the gs-cvs
mailing list