🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6049

Neat Thing to do with NEC LC-890 (Front Panel Hack)

#6049
From: Kenneth Porter
Date: Mon, 20 May 1991 07:15
50 lines
1868 bytes
I have the following code in my printer's if filter (installed
in the if field of printcap).  The if filter expects to get
the PostScript file as standard input and the printer as
standard output.  Put this at the top of the filter
before the actual file is copies to stdout with cat.
 
Ken (shiva@well.sf.ca.us)
 
================================================================
#!/bin/sh
# next line controls whether file and host gets put in printer's front panel
# (NEC Silentwriter LC-890 code for this is invoked)
FPSUPPORT=LC-890
 
if [ "$FPSUPPORT" = LC-890 ]
then
	echo "statusdict begin (       UP)(    SETTING) setfpdisplay end"
fi
 
#
# Extract info about file from config file
#
SPOOLDIR=.
LOCKF=$SPOOLDIR/lock
CFFILE=`grep cf $LOCKF`
FILENAME=`grep '^N' $CFFILE | cut -c2-`
FPS1=\(`basename "$FILENAME" | sed -e "y/./ /" | capitalize -u`\)
CLASS=`grep '^C' $CFFILE  | cut -c2-`
FPS2=\(`echo $CLASS | capitalize -u`\)
 
# Put jobname in printer display
 
if [ "$FPSUPPORT" = LC-890 ]
then
	echo "statusdict begin /jobname ($FILENAME) def end"
	echo "statusdict begin /jobsource $FPS2 def end"
	sleep 1
	echo "/putjobtofp {statusdict begin $FPS1 $FPS2 setfpdisplay end}
def"
	echo "putjobtofp"
	# next is so that "status-printing" gets reset
	# to jobname after paper feed
	echo "/showpage dup load type /operatortype eq"
	echo "{ { //showpage putjobtofp } }"
	echo "{ { //showpage exec putjobtofp } }"
	echo "ifelse bind def"
fi
 
..
Technical Details
Message-ID: <24890@well.sf.ca.us>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!apple!well!shiva

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!apple!well!shiva
From: shiva@well.sf.ca.us (Kenneth Porter)
Newsgroups: comp.lang.postscript
Subject: Neat Thing to do with NEC LC-890 (Front Panel Hack)
Message-ID: <24890@well.sf.ca.us>
Date: 20 May 91 07:15:21 GMT
Distribution: comp
Lines: 50