[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a2ps psset postscript corruption (^Ountdictstack)

From: Phil Pennock
Subject: a2ps psset postscript corruption (^Ountdictstack)
Date: Thu, 16 Mar 2006 12:47:33 +0100

Problem with solution:

Earlier posting of problem:

Problem: psset -d creates corrupt postscript.  The shell script has a
missing space in a sed s/// invocation.

It's caused by an attempt (using sed) to escape leading whitespace in a
postscript fragment for insertion by a sed filter; it actually inserts a
backslash at the start of every line.  It's this which causes the final
sed filter invocation to see \countdictstack, \c for control, control-O,
resulting in ^Ountdictstack.

Fix is to only escape a leading space with a backslash, instead of
inserting a backslash at the start of every line.

--- t   2006-03-16 12:30:48.000000000 +0100
+++ /usr/bin/psset      2006-03-16 12:28:14.000000000 +0100
@@ -241,7 +241,7 @@
 # spaces with a `\' too...
 pspagedevicelen=`echo "$pspagedevice" | wc -l`
 pspagedevice=`echo "$pspagedevice" | \
- sed -e "$pspagedevicelen!s/\$/\\\\\\/;s/^/\\\\\\/"`
+ sed -e "$pspagedevicelen!s/\$/\\\\\\/;s/^ /\\\\\\/"`
 case $at in
   0) # Insert last in the Setup, so that we win over other requests.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]