# $Source: /hpux/shared/supp/usr/src/cmd/lp/model/HPGL2,v $ # $Revision: 64.1 $ # Remote Host Spooling, aus dem "Communicator, 3/90" S.21ff # hier integriert von (ph) # wenn Remote-Spooling nicht gewÏnscht, dann bitte den Block auskommentieren ! # REMOTE=DL1 # if [ `cnodes -r` = `hostname` ] # then # args="" # device="/dev/lp_`basename $0`" # # while [ $# -gt 0 ] # do # args="$args \"$1\" " # shift # done # # remsh $REMOTE "" >/dev/null # while [ $? -eq 1 ] # do # sleep 60 # remsh $REMOTE "" >/dev/null # done # # remsh $REMOTE "$0 $args >$device" # run myself on the remote node # exit 0 # fi touch /dev/lp_djet2 :>/dev/lp_djet2 # HPGL2: lp interface for HP7550A, HP7595A, HP7596A, HP7570A plotter. # #===================================================================== # OPTIONS RECOGNIZED: # # Do not initialize # ni do not initialize Plotter # (default initialize) # # CGM (Computer Graphics Metafile) output: # cgm translate CGM to HP-GL # #====================================================================== # # NOTE: # The cgmtohpgl program needs a device file name in "-d" option. # (It cannot output to standard output.) # plotfilter=/usr/lib/plotdvr cgmfilter=/usr/lib/cgmtohpgl if [ -z "$LANG" ] then LANG="C" export LANG fi # save the arguments to the model plotter=`basename $0` reqid=$1 user=$2 title=$3 copies=$4 # get device file names devicefile="/usr/spool/lp/member/$plotter" devicename=`cat $devicefile | line` # Set up RS-232C interface if this is a tty port if [ -t 1 ] then stty 9600 opost onlcr -parenb cs8 ixon -istrip clocal tab3 <&1 2>/dev/null fi # Determine which options have been invoked initialize="" inputfile="def" for i in $5 do case "$i" in -ni | ni) # do not initialize initialize="-i";; -cgm | cgm) # CGM file input inputfile="cgm";; esac done # Handle disable and cancel traps. trap "trap 15;kill -15 0;exit 0" 15 # Assume that the rest of the arguments are files shift; shift; shift; shift; shift files="$*" # plot the spooled file i=1 while [ $i -le $copies ] do for file in $files do case "$inputfile" in def) #$plotfilter -l$reqid -u$user -e\ # $initialize $file <&1 2>/dev/null cat $file 2>/dev/null ;; cgm) $cgmfilter -d$devicename -l$reqid -u$user -e\ $initialize $file 2>/dev/null ;; *);; esac done i=`expr $i + 1` done cat /dev/lp_djet2 | /opt/hpxt/enware/hpnp/hpnpf -x djet2 # Insure all buffers are flushed to plotter stty 9600 opost onlcr -parenb cs8 ixon -istrip clocal tab3 <&1 2>/dev/null exit 0