|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3561 (0xde9) Types: TextFile Notes: UNIX file Names: »uniplexLPmodel«
└─⟦c93a30372⟧ Bits:30004169/disk3.imd Uniplex II+ V.6 release 1.0 (dansk) └─⟦c93a30372⟧ UNIX Filesystem └─⟦this⟧ »up/new/usr/UAP/unsupported/uniplexLPmodel«
# uniplexLPmodel - LP spooler model for sites running LP spooler # against a printer device being run so that UNIX # adds CARRIAGE RETURN to each LINEFEED sent to # printer - which can mess up graphics and other # operations on some printers : ' L..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..R. ' # Installation steps: # 1. Copy to "/usr/spool/lp/model" # eg: cp uniplexLPmodel /usr/spool/lp/model/. # # 2. As root, stop spooler ("lpshut") and # run "lpadmin -muniplexLPmodel -v/dev/devicename -pprintername" # eg: lpadmin -muniplexLPmodel -v/dev/tty23 -pUNIPLEX # # 3. Restart spooler and configure UNIPLEX print interface to # a command such as: "| lp -s -dUNIPLEX" # Note: # When printing against this model, you must supply text with CR/NL pairs # at the end of every text line. Normal UNIX text will not have this. # The UAP/unsupported/addcr filter can be used to do this. # eg: addcr my.file | lp -dUNIPLEX # # Usage: invoked by LPSCHED as: # # lp/interface/printername id user title copies options file ... # # where: id is request id returned to user by LP (unless -s flag) # user is logname of user who made the request # title is optional title specified by the user # copies is number of copies requested. Note that the standard # UNIPLEX print will leave this as 1. See under "file", below. # options is optional list of printer-specific options # Standard UNIPLEX interface will not set this # file Path name(s) of file(s) to print # Standard UNIPLEX interface will pass a complete print image # file to LP. The image will contain all copies - either as # replications of the text, or appropriate commands to make # the printer hardware do any copies. # # Portability: # Will only run with UNIX system V and above shell and "stty" # Is built and tested for V.2 LP # # Ignore all LP arguments, except COPIES copies=$4 shift; shift; shift; shift; shift i=1 FF="`echo '\014\c'`" ESC="`echo '\033\c'`" # Find if TTY driver is in "raw" output mode ("-opost" reported by "stty -a") # (note that LP should have connected our stderr to the TTY device, which # is why "stty", which expects its stdin to be connected to the TTY, # needs the shell "<&2" redirection trick) # If it is "raw", we don't need to do anything special. # If it isn't set TTY device into "raw" mode - to prevent any possibility # of the TTY driver mapping NL to CR/NL (UPROP will always output CR/NL # itself when needed) and make a note to restore it at end of job OPOST=off case "`stty -a <&2`" in *-opost*) ;; *opost*) OPOST=on; stty -opost <&2 ;; esac while [ $i -le $copies ]; do for file do cat "$file" 2>&1 # After each file, echo a Form Feed if the last characters # in the file are not Form Feed, an ESC-e or ESC-E sequence # (common Laserjet page eject sequences) or ESC-c (canon flush) case "`tail -2c $file`" in "$ESC"[Eec]) ;; ?"$FF") ;; *) echo "$FF\c";; esac done i=`expr $i + 1` done case "$OPOST" in on) # sleep 3 # Uncomment this sleep, if you fear that your UNIX # isn't synchronizing the flushing of data from preceding # CAT before/as STTY runs up stty opost <&2 ;; esac exit 0