View | Details | Raw Unified
Collapse All | Expand All

(-) espgs-7.05.6/lib/sysvlp.sh.orig (-14 / +20 lines)
 Lines 241-246    Link Here 
			then
			then
				/usr/lib/lprcat $Nofilter $Nolabel $file PCL1 $user $dev
				/usr/lib/lprcat $Nofilter $Nolabel $file PCL1 $user $dev
			else
			else
				TEMPFILE=`mktemp -t pjXXXXXX` || exit 1
				type=`file $file | sed 's/^[^:]*..//'`
				type=`file $file | sed 's/^[^:]*..//'`
				case "$type" in
				case "$type" in
				postscript*)
				postscript*)
 Lines 251-272    Link Here 
#
#
#					gs -q -sDEVICE=paintjet -r180 -sOutputFile=- -dDISKFONTS -dNOPAUSE - < $file 2>/tmp/sh$$
#					gs -q -sDEVICE=paintjet -r180 -sOutputFile=- -dDISKFONTS -dNOPAUSE - < $file 2>/tmp/sh$$
					gs -q -sDEVICE=paintjet -r180 -sOutputFile=/tmp/pj$$ -dDISKFONTS -dNOPAUSE - < $file 1>2
					gs -q -sDEVICE=paintjet -r180 -sOutputFile=$TEMPFILE -dDISKFONTS -dNOPAUSE - < $file 1>2
					cat /tmp/pj$$
					cat $TEMPFILE
					rm /tmp/pj$$
					rm $TEMPFILE
					needff=
					needff=
					;;
					;;
				*)	cat "$file" 2>/tmp/sh$$
				*)	cat "$file" 2>$TEMPFILE
					needff=1
					needff=1
					;;
					;;
				esac
				esac
				if [ -s /tmp/sh$$ ]
				if [ -s $TEMPFILE ]
				then
				then
#				    cat /tmp/sh$$	# output any errors
#				    cat /tmp/sh$$	# output any errors
				    cat /tmp/sh$$ 1>2	# output any errors
				    cat $TEMPFILE 1>2	# output any errors
				fi
				fi
				rm -f /tmp/sh$$
				rm -f $TEMPFILE
				if [ $needff ]; then echo "\014\r\c"; fi
				if [ $needff ]; then echo "\014\r\c"; fi
			fi
			fi
 Lines 1-7    Link Here 
#!/bin/sh
#!/bin/sh
# $Id: ps2epsi,v 1.4 2002/04/23 11:58:36 easysw Exp $
# $Id: ps2epsi,v 1.4 2002/04/23 11:58:36 easysw Exp $
tmpfile=/tmp/ps2epsi$$
tmpfile=`mktemp -t ps2epsiXXXXXX` || exit 1
trap "rm -rf $tmpfile" 0 1 2 3 7 13 15
export outfile
export outfile
 Lines 27-37    Link Here 
#
#
TEMPDIR=.
TEMPDIR=.
PAGE=$1
PAGE=$1
TEMPFILE=`mktemp -t ${FILE}XXXXXX` || exit 1
shift
shift
FILE=$1
FILE=$1
shift
shift
trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 1 2 15
trap "rm -rf $TEMPFILE" 0 1 2 15
#dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
#dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
dvips -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
dvips -p $PAGE -n 1 $FILE $* -o $TEMPFILE
gs $FILE.$$.pv
gs $TEMPFILE
exit 0
exit 0
 Lines 27-46    Link Here 
# Brother HL-4: switch to HP laserjet II+ emulation
# Brother HL-4: switch to HP laserjet II+ emulation
# echo "\033\015H\c"
# echo "\033\015H\c"
TEMPDIR=`mktemp -td sysvlp.XXXXXX` || exit 1
i=1
i=1
while [ $i -le $copies ]
while [ $i -le $copies ]
do
do
	for file in $files
	for file in $files
	do
	do
		$GSHOME/gs \
		$GSHOME/gs \
			-sOUTPUTFILE=/tmp/psp$$.%02d \
			-sOUTPUTFILE=$TEMPDIR/psp$$.%02d \
			-sDEVICE=$DEVICE \
			-sDEVICE=$DEVICE \
			$EHANDLER $file \
			$EHANDLER $file \
			< /dev/null >> /usr/tmp/ps_log 2>&1
			< /dev/null >> /usr/tmp/ps_log 2>&1
		cat /tmp/psp$$.* 2>> /usr/tmp/ps_log
		cat $TEMPDIR/psp$$.* 2>> /usr/tmp/ps_log
		rm -f /tmp/psp$$.*
		rm -f $TEMPDIR/psp$$.*
	done
	done
	i=`expr $i + 1`
	i=`expr $i + 1`
done
done
rmdir $TEMPDIR
exit 0
exit 0