From 50db12bd12f76058516d5c44b5ba7b4c4cf96651 Mon Sep 17 00:00:00 2001 From: Ray Johnston Date: Fri, 25 Jun 2021 19:37:24 -0700 Subject: Fix --detect mode in gslp.ps to handle new-lines in first two characters Reported by customer 193 --- lib/gslp.ps | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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 -- cgit v1.2.1