diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2021-06-25 19:37:24 -0700 |
---|---|---|
committer | Ray Johnston <ray.johnston@artifex.com> | 2021-06-25 19:37:24 -0700 |
commit | 50db12bd12f76058516d5c44b5ba7b4c4cf96651 (patch) | |
tree | f6cb2473166dfe421dc48622c7aa2bd46398293a /lib | |
parent | 65e5a72c5154859a10e612e9efa93810f705d4d5 (diff) | |
download | ghostpdl-50db12bd12f76058516d5c44b5ba7b4c4cf96651.tar.gz |
Fix --detect mode in gslp.ps to handle new-lines in first two characters
Reported by customer 193
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gslp.ps | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gslp.ps b/lib/gslp.ps index 173d52c21..a0a1808ee 100644 --- a/lib/gslp.ps +++ b/lib/gslp.ps @@ -506,6 +506,15 @@ lpdict begin % Iterate through the file. lpline + % First handle new-lines in the initial string (--detect mode) + (\n) search { + showline % output up to the first new-line + pop pop % done with that string and the new-line + (\n) search { + showline % output the second new-line + pop pop % done + } if + } if { dup length /pos exch def lbuf exch 0 exch putinterval { lpfile lbuf pos lbuf length pos sub getinterval readline } stopped |