home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-14 | 42.9 KB | 1,571 lines |
- Newsgroups: comp.sources.misc
- Path: sparky!kent
- From: jjc@jclark.com (James Clark)
- Subject: v31i077: lprps - interface lpr to a PostScript printer, Part01/02
- Message-ID: <csm-v31i077=lprps.133532@sparky.IMD.Sterling.COM>
- Followup-To: comp.sources.d
- X-Md4-Signature: 2dbd986849c25cb6b035e9286c16958d
- Sender: kent@sparky.imd.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Fri, 14 Aug 1992 18:35:55 GMT
- Approved: kent@sparky.imd.sterling.com
- Lines: 1557
-
- Submitted-by: jjc@jclark.com (James Clark)
- Posting-number: Volume 31, Issue 77
- Archive-name: lprps/part01
- Environment: BSD, SUNOS
- Supersedes: lprps: Volume 21, Issue 25
-
- This is lprps version 2.3.
-
- lprps is a collection of programs for using lpr with a PostScript
- printer connected by a bidirectional serial channel. It has been
- tested mainly with Suns running various versions of SunOS (4.0.3, 4.1
- and 4.1.1). It should be easy to port to other 4.3 BSD based systems.
- It is not intended for use with System V.
-
- It contains the following programs:
-
- lprps handles communication with the printer
- psif allows separate filters to be used for text and PostScript
- textps simple text to PostScript filter
- psrev PostScript page reversal filter
- psof banner filter
-
- The file lpr.diff contains some changes to the version of lpr in the
- second Berkeley networking release; lprps does not require these
- changes, but will work slightly better with them.
-
- Some features are:
-
- * Deals intelligently with output generated by the printer: printer
- errors (such as ``out of paper'') are logged using syslog; other
- errors and output generated by the user's job are mailed back to the
- user. Updates status file (displayed by lpq) with printer's current
- status.
-
- * Performs printer accounting.
-
- * Ensures that the printer is ready to receive the job.
-
- * Determines whether file is PostScript or text (by looking at the
- first 2 bytes), and uses the appropriate filter; this is done in
- such a way that you can easily use your favourite text-to-PostScript
- filter.
-
- * Can automatically perform page reversal for the benefit of printers
- that stack face-up.
-
- * Can easily add your own output filters for TeX, troff or any of the
- other formats supported by lpr.
-
- * Page reversal filter supports version 3.0 of Document Structuring
- Conventions.
-
- * Text to PostScript filter supports ISO Latin-1.
-
- * Supports banner printing.
-
- There is no copyright on lprps.
-
- See the file INSTALL for installation information.
-
- Please report any bugs to me.
-
- James Clark
- jjc@jclark.com
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 2)."
- # Contents: README INSTALL TODO Makefile textps.man psrev.man
- # lprps.man psif.man psof.man banner.ps lpr.diff
- # Wrapped by jjc@jclark on Fri Aug 14 17:43:02 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(1945 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- XThis is lprps version 2.3.
- X
- Xlprps is a collection of programs for using lpr with a PostScript
- Xprinter connected by a bidirectional serial channel. It has been
- Xtested mainly with Suns running various versions of SunOS (4.0.3, 4.1
- Xand 4.1.1). It should be easy to port to other 4.3 BSD based systems.
- XIt is not intended for use with System V.
- X
- XIt contains the following programs:
- X
- Xlprps handles communication with the printer
- Xpsif allows separate filters to be used for text and PostScript
- Xtextps simple text to PostScript filter
- Xpsrev PostScript page reversal filter
- Xpsof banner filter
- X
- XThe file lpr.diff contains some changes to the version of lpr in the
- Xsecond Berkeley networking release; lprps does not require these
- Xchanges, but will work slightly better with them.
- X
- XSome features are:
- X
- X* Deals intelligently with output generated by the printer: printer
- X errors (such as ``out of paper'') are logged using syslog; other
- X errors and output generated by the user's job are mailed back to the
- X user. Updates status file (displayed by lpq) with printer's current
- X status.
- X
- X* Performs printer accounting.
- X
- X* Ensures that the printer is ready to receive the job.
- X
- X* Determines whether file is PostScript or text (by looking at the
- X first 2 bytes), and uses the appropriate filter; this is done in
- X such a way that you can easily use your favourite text-to-PostScript
- X filter.
- X
- X* Can automatically perform page reversal for the benefit of printers
- X that stack face-up.
- X
- X* Can easily add your own output filters for TeX, troff or any of the
- X other formats supported by lpr.
- X
- X* Page reversal filter supports version 3.0 of Document Structuring
- X Conventions.
- X
- X* Text to PostScript filter supports ISO Latin-1.
- X
- X* Supports banner printing.
- X
- XThere is no copyright on lprps.
- X
- XSee the file INSTALL for installation information.
- X
- XPlease report any bugs to me.
- X
- XJames Clark
- Xjjc@jclark.com
- X
- X$Id: README,v 1.12 1992/08/14 16:34:21 jjc Exp $
- END_OF_FILE
- if test 1945 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'INSTALL' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'INSTALL'\"
- else
- echo shar: Extracting \"'INSTALL'\" \(3109 characters\)
- sed "s/^X//" >'INSTALL' <<'END_OF_FILE'
- XYou will need to edit the Makefile. The comments should make it clear
- Xwhat needs changing. Do a make; then do a make install as root.
- X
- XYou need to decide what baud rate you are going to use. If you have a
- Xvery old Laserwriter (not a plus), you will have to use 9600;
- Xotherwise you should be able to use 38400.
- X
- XYou need to add an entry in /etc/printcap. Here's the entry I use:
- X
- Xlp|ps:\
- X :br#38400:lp=/dev/ttya:mx#0:sf:sh:rw:sb:\
- X :fc#0177777:fs#003:ms=-isig,igncr,cstopb,-echok:\
- X :af=/usr/adm/psacct:lf=/usr/adm/pslog:sd=/usr/spool/pslpd:\
- X :if=/usr/local/lib/psif:
- X
- XThis entry would be appropriate if you were using /dev/ttya and a baud
- Xrate of 38400. You need to create the spool directory
- X(/usr/spool/pslpd), the accounting file (/usr/adm/psacct), and the log
- Xfile (/usr/adm/pslog). The spool directory and the accounting file
- Xshould be owned by daemon, the log file by root. You can use other
- Xnames if you want. The `ms' capabability is a Sun extension. If you
- Xdecide to make use of the patches in lpr.diff, you should also add the
- X`ex' boolean capability (the patches also add the `ms' capability.)
- X
- XIf you wish to have banner printing, then you should add
- X`of=/usr/local/lib/psof', and remove the `sh' capability. You will
- Xprobably also wnat to modify the banner printing code in banner.ps.
- XAs distributed, it provides a fairly minimalist banner page. Note
- Xthat psof requires the `sb' capability.
- X
- XYou can add easily add other filters. For example, suppose you want to
- Xadd a filter for dvi files. Then add an entry to /etc/printcap:
- X
- X :df=/usr/local/lib/psdf:
- X
- XThen create a shell script /usr/local/lib/psdf
- X
- X#!/bin/sh
- X/usr/local/bin/dvitops | /usr/local/lib/lprps "$@"
- X
- XReplace `/usr/local/bin/dvitops' by the name of your favourite dvi to
- Xps program (it must be able to read from the standard input). Then you
- Xcan print dvi files with `lpr -d'.
- X
- XYou must also set the printer's communication parameters. Make sure
- Xyou have an entry like this in /etc/remote:
- X
- X ttya:dv=/dev/ttya:br#1200:el=^D:
- X
- XSet the switch on your printer to position labelled 1200 or 0. Then
- X
- X tip ttya
- X
- X(*)Now carefully type
- X
- X executive
- X
- Xand then RETURN. The printer will not echo this while you are typing.
- XIf you typed it correctly, the printer will print a banner and a
- Xprompt. If you get an error message from the printer, type CTRL-D and
- Xtry again. If you don't get any response at all, you probably have a
- Xcable problem. Then type
- X
- X serverdict begin 0 exitserver
- X
- Xand RETURN. The printer should say something like
- X
- X %%[ exitserver: permanent state may be changed ]%%
- X
- XThen type
- X
- X statusdict begin 25 38400 3 setsccbatch end
- X
- Xand RETURN. The printer will not echo this. If you get an error message,
- Xtype CTRL-D and go back to (*). Otherwise type CTRL-D.
- X
- XNow check to see that this worked. Type
- X
- X executive
- X
- Xagain. Then
- X
- X statusdict begin 25 sccbatch end = =
- X
- XThe printer should say
- X
- X 3
- X 38400
- X
- XIf it does, type CTRL-D, exit tip, and set the switch on the printer
- Xback to the position labelled 9600 or 1. If not, type CTRL-D and try
- Xagain from (*).
- X
- X$Id: INSTALL,v 1.7 1992/02/01 12:51:59 jjc Exp $
- END_OF_FILE
- if test 3109 -ne `wc -c <'INSTALL'`; then
- echo shar: \"'INSTALL'\" unpacked with wrong size!
- fi
- # end of 'INSTALL'
- fi
- if test -f 'TODO' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'TODO'\"
- else
- echo shar: Extracting \"'TODO'\" \(145 characters\)
- sed "s/^X//" >'TODO' <<'END_OF_FILE'
- XDo different intro if errors are being logged.
- X
- XCatch control characters in lprps. Handle -c option.
- X
- Xpsif should either mail or syslog errors.
- END_OF_FILE
- if test 145 -ne `wc -c <'TODO'`; then
- echo shar: \"'TODO'\" unpacked with wrong size!
- fi
- # end of 'TODO'
- fi
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(3437 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X# $Id: Makefile,v 1.14 1992/08/14 16:41:24 jjc Exp $
- X# Define A4 if you use A4 rather than letter size paper.
- X# Define IIg to enable a workaround for a bug in the serial
- X# driver of the Laserwriter IIf and IIg; this requires the POSIX
- X# tcdrain() function. (I haven't tested this personally.)
- XDEFINES=-DA4 #-DIIg
- XPREFIX=/usr/local
- X# Where to install public executables.
- XBINDIR=$(PREFIX)/bin
- X# Where to install private executables.
- XLIBDIR=$(PREFIX)/lib
- X# Define REV_COMMAND to be empty if documents don't need to
- X# be printed in reverse order.
- XREV_COMMAND=$(BINDIR)/psrev |
- X# Where to install the filter for text files.
- XTEXT_FILTER=$(LIBDIR)/psif-text
- X# Where to install the filter for PostScript files.
- XPS_FILTER=$(LIBDIR)/psif-ps
- X# Where to install PostScript banner printing code
- XBANNER=$(LIBDIR)/banner.ps
- X# Filter to convert text to PostScript. You can use your own instead.
- X# It must be able to read from standard input.
- XTEXT_TO_PS=$(BINDIR)/textps
- XMANROOT=$(PREFIX)/man
- X# Manual section for user commands.
- XMAN1EXT=1
- XMAN1DIR=$(MANROOT)/man$(MAN1EXT)
- X# Manual section for system maintenance and operation commands.
- XMAN8EXT=8
- XMAN8DIR=$(MANROOT)/man$(MAN8EXT)
- X
- XCC=cc
- XCFLAGS=-O $(DEFINES)
- X#CFLAGS=-g -Bstatic $(DEFINES)
- X# Command for installing programs.
- XINSTALL_PROGRAM=install
- X# Command for installing man pages.
- XINSTALL_DATA=install -m 0444
- X
- XSHAR=shar
- XDIST1=README INSTALL TODO Makefile textps.man psrev.man lprps.man psif.man \
- X psof.man banner.ps lpr.diff
- XDIST2=psrev.c lprps.c psif.c textps.c psof.c
- X
- XPROGS=psrev psif lprps textps psof
- X
- X.SUFFIXES: .man .n
- X
- X.man.n:
- X @echo Making $@ from $<
- X @-rm -f $@
- X @sed -e "s;@MAN1EXT@;$(MAN1EXT);" \
- X -e "s;@MAN8EXT@;$(MAN8EXT);" \
- X -e "s;@PS_FILTER@;$(PS_FILTER);" \
- X -e "s;@TEXT_FILTER@;$(TEXT_FILTER);" \
- X -e "s;@BANNER@;$(BANNER);" \
- X $< >$@
- X @chmod 444 $@
- X
- Xall: psif-text psif-ps $(PROGS) textps.n psrev.n lprps.n psif.n psof.n
- X
- Xinstall: all
- X -test -d $(LIBDIR) || mkdir $(LIBDIR)
- X -test -d $(BINDIR) || mkdir $(BINDIR)
- X $(INSTALL_PROGRAM) psif $(LIBDIR)/psif
- X $(INSTALL_PROGRAM) lprps $(LIBDIR)/lprps
- X $(INSTALL_PROGRAM) psof $(LIBDIR)/psof
- X $(INSTALL_DATA) banner.ps $(BANNER)
- X $(INSTALL_PROGRAM) textps $(BINDIR)/textps
- X $(INSTALL_PROGRAM) psrev $(BINDIR)/psrev
- X $(INSTALL_PROGRAM) psif-text $(TEXT_FILTER)
- X $(INSTALL_PROGRAM) psif-ps $(PS_FILTER)
- X $(INSTALL_DATA) textps.n $(MAN1DIR)/textps.$(MAN1EXT)
- X $(INSTALL_DATA) psrev.n $(MAN1DIR)/psrev.$(MAN1EXT)
- X $(INSTALL_DATA) lprps.n $(MAN8DIR)/lprps.$(MAN8EXT)
- X $(INSTALL_DATA) psif.n $(MAN8DIR)/psif.$(MAN8EXT)
- X $(INSTALL_DATA) psof.n $(MAN8DIR)/psof.$(MAN8EXT)
- X @echo Now edit /etc/printcap
- X
- Xlprps: lprps.c
- X $(CC) $(CFLAGS) -o $@ lprps.c
- X
- Xpsif: psif.c
- X $(CC) $(CFLAGS) -DTEXT_FILTER=\"$(TEXT_FILTER)\" \
- X -DPS_FILTER=\"$(PS_FILTER)\" -o $@ psif.c
- X
- Xtextps: textps.c
- X $(CC) $(CFLAGS) -o $@ textps.c
- X
- Xpsrev: psrev.c
- X $(CC) $(CFLAGS) -o $@ psrev.c
- X
- Xpsof: psof.c
- X $(CC) $(CFLAGS) -DLPRPS=\"$(LIBDIR)/lprps\" \
- X -DBANNER=\"$(BANNER)\" -o $@ psof.c
- X
- Xpsif-text: Makefile
- X @echo Creating $@
- X @-rm -f $@
- X @echo "#! /bin/sh" > $@
- X @echo "$(TEXT_TO_PS) | $(REV_COMMAND) $(LIBDIR)/lprps \"\$$@\"" >>$@
- X @chmod +x $@
- X
- Xpsif-ps: Makefile
- X @echo Creating $@
- X @-rm -f $@
- X @echo "#! /bin/sh" > $@
- X @echo "$(REV_COMMAND) $(LIBDIR)/lprps \"\$$@\"" >>$@
- X @chmod +x $@
- X
- Xdist: part01 part02
- X
- Xpart01: $(DIST1)
- X rm -f $@
- X $(SHAR) -n1 -e2 $(DIST1) >$@
- X
- Xpart02: $(DIST2)
- X rm -f $@
- X $(SHAR) -n2 -e2 $(DIST2) >$@
- X
- Xclean:
- X -rm -f $(PROGS) psif-text psif-ps *.n
- END_OF_FILE
- if test 3437 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'textps.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'textps.man'\"
- else
- echo shar: Extracting \"'textps.man'\" \(1311 characters\)
- sed "s/^X//" >'textps.man' <<'END_OF_FILE'
- X.\" -*- nroff -*-
- X.TH TEXTPS @MAN1EXT@
- X.\" $Id: textps.man,v 1.2 1992/02/01 12:38:45 jjc Exp $
- X.SH NAME
- Xtextps \- text to PostScript filter
- X.SH SYNOPSIS
- X.B textps
- X[
- X.BI \-c n
- X]
- X[
- X.BI \-l n
- X]
- X[
- X.BI \-m n
- X]
- X[
- X.BI \-t n
- X]
- X[
- X.BI \-v n
- X]
- X[
- X.I filename\|.\|.\|.
- X]
- X.SH DESCRIPTION
- X.B textps
- Xis a simple text to PostScript filter.
- XIt is usually invoked automatically by a spooler.
- XInput files can use ISO Latin-1.
- XTwo or more identical overstruck characters are rendered using a bold font.
- XTabs are assumed to be set every 8 character positions.
- X.B textps
- Xis designed to produce good output with
- X.B lpr\ \-p
- Xor
- X.BR pr\ |\ lpr ;
- Xif you print unpaginated text,
- Xyou will need to increase the
- X.B \-t
- Xoption and decrease the
- X.B \-v
- Xor
- X.B \-l
- Xoption.
- X.SH OPTIONS
- XThe arguments for all options except
- X.B \-l
- Xare floating-point numbers.
- XThe argument for
- X.B \-l
- Xmust be a positive integer.
- X.TP
- X.BI \-c n
- XUse
- X.I n
- Xcharacters to the inch.
- X.TP
- X.BI \-l n
- XUse
- X.I n
- Xlines per page.
- X.TP
- X.BI \-m n
- XUse a left margin of
- X.I n
- Xpoints.
- X.TP
- X.BI \-t n
- XPosition the baseline of the first line of text
- X.I n
- Xpoints below the top of the page.
- X.TP
- X.BI \-v n
- XUse a vertical spacing of
- X.I n
- Xpoints.
- X.LP
- XThe default behaviour is
- X.BR \-c12\ \-l66\ \-m18\ \-t8\ \-v12 .
- X.SH "SEE ALSO"
- X.BR psrev (@MAN1EXT@),
- X.BR lprps (@MAN8EXT@),
- X.BR psif (@MAN8EXT@)
- END_OF_FILE
- if test 1311 -ne `wc -c <'textps.man'`; then
- echo shar: \"'textps.man'\" unpacked with wrong size!
- fi
- # end of 'textps.man'
- fi
- if test -f 'psrev.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'psrev.man'\"
- else
- echo shar: Extracting \"'psrev.man'\" \(778 characters\)
- sed "s/^X//" >'psrev.man' <<'END_OF_FILE'
- X.\" -*- nroff -*-
- X.\" $Id: psrev.man,v 1.1 1991/07/14 14:05:28 jjc Exp $
- X.TH PSREV @MAN1EXT@
- X.SH NAME
- Xpsrev \- PostScript page reversal filter
- X.SH SYNOPSIS
- X.B psrev
- X[
- X.I filename
- X]
- X.SH DESCRIPTION
- X.B psrev
- Xreverses the order of the pages of a PostScript document.
- XUsually
- X.B psrev
- Xis used with printers that stack face up
- Xand is run automatically by the spooler.
- XThe document must conform to the Adobe Document Structuring Conventions,
- Xpreferably version 3.0.
- X.LP
- X.B psrev
- Xrespects the
- X.B %%PageOrder:
- Xcomment:
- Xif this comment is present and has an argument other than
- X.B Ascend
- Xthe document will not be reversed.
- XA document reversed by
- X.B psrev
- Xwill contain a
- X.B %%PageOrder:\ Descend
- Xcomment.
- X.SH "SEE ALSO"
- X.BR textps (@MAN1EXT@),
- X.BR lprps (@MAN8EXT@),
- X.BR psif (@MAN8EXT@)
- END_OF_FILE
- if test 778 -ne `wc -c <'psrev.man'`; then
- echo shar: \"'psrev.man'\" unpacked with wrong size!
- fi
- # end of 'psrev.man'
- fi
- if test -f 'lprps.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lprps.man'\"
- else
- echo shar: Extracting \"'lprps.man'\" \(4380 characters\)
- sed "s/^X//" >'lprps.man' <<'END_OF_FILE'
- X.\" -*- nroff -*-
- X.\" $Id: lprps.man,v 1.3 1992/02/01 12:45:35 jjc Exp $
- X.de TQ
- X.br
- X.ns
- X.TP \\$1
- X..
- X.TH LPRPS @MAN8EXT@
- X.SH NAME
- Xlprps \- lpr PostScript communication filter
- X.SH SYNOPSIS
- X.B lprps
- X[
- X.B \-M
- X]
- X[
- X.BI \-U user
- X]
- X[
- X.B \-c
- X]
- X[
- X.BI \-w n
- X]
- X[
- X.BI \-l n
- X]
- X[
- X.BI \-x n
- X]
- X[
- X.BI \-y n
- X]
- X[
- X.BI \-i n
- X]
- X[
- X.BI \-n \ login_name
- X]
- X[
- X.BI \-h \ host
- X]
- X[
- X.BI \-j \ job
- X]
- X[
- X.BI \-p \ printer
- X]
- X[
- X.BI \-s \ status_file
- X]
- X[
- X.I accounting_file
- X]
- X.SH DESCRIPTION
- X.B lprps
- Xhandles communication with a PostScript printer for lpr output filters.
- XThe PostScript printer must be connected using a bidirectional serial channel.
- XEach output filter should be a pipeline with
- X.B lprps\ "$@"
- Xas the last command.
- XThe other commands in the pipeline should handle conversion into PostScript
- Xand possibly page reversal.
- XThe command-line syntax of
- X.B lprps
- Xis such that any argument vector
- Xwhich
- X.B lpd
- Xmight pass to an output file is a legal argument vector for
- X.BR lprps .
- XThe
- X.B psof
- Xoutput filter can be used in conjunction with
- X.BR lprps .
- X.LP
- XOutput generated by the PostScript document and errors caused by
- Xdefects in the PostScript file are mailed back to the user
- X(identified by the
- X.B \-n
- Xand
- X.B \-h
- Xoptions).
- XIf the
- X.B \-M
- Xoption is given, this output will instead be written
- Xto the standard error file,
- Xwhich the spooling system will copy
- Xto the error logging file specified by the
- X.B lf
- Xcapability
- X(some versions of lpr have a bug which prevents this happening.)
- XOther errors
- X(such as `out of paper' errors)
- Xare logged using syslog with the
- X.B LOG_LPR
- Xfacility.
- X.B lprps
- Xattempts to update the status file
- X(the contents of which are displayed by lpq)
- Xwith the printer's status.
- X.LP
- X.B lprps
- Xsupports printer accounting.
- XIf this facility is required,
- Xa file to contain the accounting information must be specified in
- X.B af
- Xcapability in the printcap file.
- XThis file should exist, have mode 644 and be owned by daemon.
- XThe name of this file will be passed to
- X.B lprps
- Xin the
- X.I accounting_file
- Xargument.
- XFor each job,
- X.B lprps
- Xwill append to this file an accounting record specifying the user's name
- Xand host together with the number of pages used.
- XThe
- X.BR pac (8)
- Xcommand can then be used to generate an accounting report.
- XThe accounting information should be reliable except when
- Xthe printer has been turned off or disconnected in the middle of a job.
- X.SH OPTIONS
- X.LP
- XThe following options can be supplied by the output filter script
- Xthat calls
- X.BR lprps :
- X.TP \w'\fB\-U\fIuser'u+3n
- X.BI \-U user
- X.I user
- Xis not a real user;
- Xerrors from jobs for
- X.I user
- Xwill not be mailed back to
- X.IR user
- Xbut will instead be written to stderr.
- XThis option is intended for sites that
- Xhave software packages (eg Interleaf) that spool user's jobs using
- Xanother userid (eg daemon).
- X.TP
- X.B \-M
- XDon't mail errors back to the user;
- Xerrors will be written to stderr.
- X.LP
- XThe following options are automatically supplied by the spooling system:
- X.TP \w'\fB\-n\ \fIname'u+3n
- X.BI \-n \ name
- XThe user's login name is
- X.IR name .
- X.TP
- X.BI \-h \ host
- XThe user's host machine is
- X.IR host .
- X.TP
- X.B \-c
- X.TQ
- X.BI \-x n
- X.TQ
- X.BI \-y n
- X.TQ
- X.BI \-w n
- X.TQ
- X.BI \-l n
- X.TQ
- X.BI \-i n
- XThese options are ignored.
- X.LP
- XThe following options are not supplied by the standard version of
- Xthe lpr spooling system and
- X.B lprps
- Xdoes not require them.
- XHowever, the lpr system can be modified to supply these options;
- X.B lprps
- Xwill work slightly better with such a system.
- X.TP \w'\fB\-s\fI\ status_file'u+3n
- X.BI \-j \ job
- XThe job name is
- X.IR job .
- X.B lprps
- Xwill include this in messages mailed to the user.
- X.TP
- X.BI \-p \ printer
- XThe printer name is
- X.IR printer .
- X.B lprps
- Xwill use this in some error messages,
- Xand in messages written to the status file.
- XIf this option is not specified,
- X.B lprps
- Xwill attempt to deduce the printer name from the contents of
- Xthe status file.
- XThis option might also be specified in the output filter script.
- X.TP
- X.BI \-s \ status_file
- XThe name of the status file is
- X.IR status_file .
- XThe name used by the spooling system for the status file
- Xcan be changed by the
- X.B st
- Xcapability in the printcap entry.
- XIf this option is not specified,
- X.B lprps
- Xwill assume that the name is the default
- X.BR status .
- XThis option might also be specified in the output filter script.
- X.SH "SEE ALSO"
- X.BR textps (@MAN1EXT@),
- X.BR psrev (@MAN1EXT@),
- X.BR syslog.conf (5),
- X.BR psif (@MAN8EXT@),
- X.BR psof (@MAN8EXT@),
- X.BR pac (8),
- X.BR lpd (8)
- END_OF_FILE
- if test 4380 -ne `wc -c <'lprps.man'`; then
- echo shar: \"'lprps.man'\" unpacked with wrong size!
- fi
- # end of 'lprps.man'
- fi
- if test -f 'psif.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'psif.man'\"
- else
- echo shar: Extracting \"'psif.man'\" \(1271 characters\)
- sed "s/^X//" >'psif.man' <<'END_OF_FILE'
- X.\" -*- nroff -*-
- X.\" $Id: psif.man,v 1.1 1991/07/14 14:05:13 jjc Exp $
- X.TH PSIF @MAN8EXT@
- X.SH NAME
- Xpsif \- PostScript input filter splitter for lpr
- X.SH SYNOPSIS
- X.B psif
- X[
- X.I args\|.\|.\|.
- X]
- X.SH DESCRIPTION
- X.B psif
- Xexecutes either
- X.B @PS_FILTER@
- Xor
- X.B @TEXT_FILTER@
- Xaccording to whether or not the first two characters of its standard
- Xinput are
- X.BR %! .
- X.B psif
- Xwill arrange that the process that it executes sees the same standard
- Xinput that it did,
- Xand will pass the process the same arguments that it received.
- X.LP
- XUsually
- X.B psif
- Xwill be specified as the value of
- X.B if
- Xcapability in the printcap entry for a PostScript printer;
- X.B @TEXT_FILTER@
- Xwill be a shell script that runs a text to PostScript filter
- Xsuch as
- X.BR textps (@MAN1EXT@),
- Xfollowed by a PostScript page reversal filter such as
- X.BR psrev (@MAN1EXT@)
- X(only needed for PostScript printers that stack face up),
- Xfollowed by PostScript communication filter such as
- X.BR lprps (@MAN8EXT@);
- X.B @PS_FILTER@
- Xwill be similar except that it will not run the text to PostScript filter.
- X.SH FILES
- X.TP \w'\fB@TEXT_FILTER@'u+3n
- X.B @TEXT_FILTER@
- XFilter for text files.
- X.TP
- X.B @PS_FILTER@
- XFilter for PostScript files.
- X.SH "SEE ALSO"
- X.BR textps (@MAN1EXT@),
- X.BR psrev (@MAN1EXT@),
- X.BR printcap (5),
- X.BR lprps (@MAN8EXT@)
- END_OF_FILE
- if test 1271 -ne `wc -c <'psif.man'`; then
- echo shar: \"'psif.man'\" unpacked with wrong size!
- fi
- # end of 'psif.man'
- fi
- if test -f 'psof.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'psof.man'\"
- else
- echo shar: Extracting \"'psof.man'\" \(1292 characters\)
- sed "s/^X//" >'psof.man' <<'END_OF_FILE'
- X.\" -*- nroff -*-
- X.\" $Id: psof.man,v 1.1 1992/02/01 12:36:32 jjc Exp $
- X.TH PSOF @MAN8EXT@
- X.SH NAME
- Xpsof \- PostScript output/banner filter for lpr
- X.SH SYNOPSIS
- X.B psof
- X[
- X.I args\|.\|.\|.
- X]
- X.SH DESCRIPTION
- X.B psof
- Xis a PostScript output/banner filter for thr lpr spooling system.
- XTo enable banner printing
- X.B psof
- Xis specified as the
- X.B of
- Xfilter in the printcap entry;
- Xthere must also be an
- X.B if
- Xfilter,
- Xusually
- X.BR psif (@MAN8EXT@);
- X.B psof
- Xrequires that the printcap entry includes the
- X.B sb
- Xcapability
- Xbut does not include the
- X.B sh
- Xcapability.
- XTo disable banner printing, remove the
- X.B of
- Xcapability and include a
- X.B sh
- Xcapability.
- XThe
- X.B lpr
- Xsystem supplies various command line arguments to
- X.B of
- Xfilters;
- Xthese are ignored by
- X.BR psof .
- X.LP
- X.B psof
- Xwill send the file
- X.B @BANNER@
- Xto the printer using
- X.BR lprps
- Xpreceded by definitions of strings
- X.BR Job ,
- X.BR Class ,
- X.B User
- Xand
- X.BR Date ;
- X.B @BANNER@
- Xshould contain PostScript code that uses the definitions
- Xto print a suitable banner page.
- X.LP
- XNo accounting information is generated for banner pages.
- X.SH FILES
- X.B @BANNER@
- X\ \ PostScript code to print banner.
- X.SH BUGS
- XThe banner page will be printed before the job even on printers
- Xthat stack face up.
- X.SH "SEE ALSO"
- X.BR printcap (5),
- X.BR lprps (@MAN8EXT@),
- X.BR psif (@MAN8EXT@)
- END_OF_FILE
- if test 1292 -ne `wc -c <'psof.man'`; then
- echo shar: \"'psof.man'\" unpacked with wrong size!
- fi
- # end of 'psof.man'
- fi
- if test -f 'banner.ps' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'banner.ps'\"
- else
- echo shar: Extracting \"'banner.ps'\" \(428 characters\)
- sed "s/^X//" >'banner.ps' <<'END_OF_FILE'
- X% $Id: banner.ps,v 1.1 1992/02/01 12:42:23 jjc Exp $
- X% This prints a banner.
- X% psof.c will prepend definitions of Job, User, Class, and Date.
- X
- X/point-size 36 def
- X/line-spacing point-size 1.2 mul def
- X/left-margin 18 def
- X/first-baseline 720 def
- X
- X/Helvetica findfont point-size scalefont setfont
- X
- X
- X/i 0 def
- X
- X[User Job Class Date] {
- X left-margin first-baseline i line-spacing mul sub moveto
- X show
- X /i i 1 add def
- X} forall
- X
- Xshowpage
- END_OF_FILE
- if test 428 -ne `wc -c <'banner.ps'`; then
- echo shar: \"'banner.ps'\" unpacked with wrong size!
- fi
- # end of 'banner.ps'
- fi
- if test -f 'lpr.diff' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lpr.diff'\"
- else
- echo shar: Extracting \"'lpr.diff'\" \(17125 characters\)
- sed "s/^X//" >'lpr.diff' <<'END_OF_FILE'
- XThis file contains some changes to the version of lpr in the second
- XBerkeley networking distribution. This is available for anonymous ftp
- Xfrom ftp.uu.net in the directory packages/bsd-sources/usr.sbin/lpr.
- X
- XThese changes have been tested only under SunOS 4.1.1. Only lpd has
- Xbeen tested.
- X
- XIn order to compile this version of lpd under SunOS 4.1.1, you may in
- Xaddition need lib/libutil/daemon.c, lib/libc/stdio/strerror.c and
- Xinclude/paths.h. You will probably also need to adapt the Makefile.
- X
- XThe changes are as follows:
- X
- X1. Use an int rather than a short to store the baud rate. A short
- Xdoesn't work too well for 38400 baud.
- X
- X2. Implement the `ms' capability as in SunOS. This a string valued
- Xcapability. The value is a comma separated list of tty modes
- Xspecified as for stty(1). Combination modes are not supported. The
- Ximplementation is based on code from stty.
- X
- X3. The code uses `sun' as a variable name in several places, but this
- Xis defined as a preprocessor name by cc. Fixed by undefing `sun' where
- Xnecessary.
- X
- X4. Add a new `ex' capability. This is a boolean capability. If it's
- Xpresent, then the new options (-j, -p and -s) supported by lprps will
- Xbe passed to the filter.
- X
- X5. The SunOS statfs() requires the <sys/vfs.h> rather than
- X<sys/mount.h>.
- X
- X6. In SunOS the fundamental filesystem block size is stored in the
- Xf_bsize rather than the f_fsize member of struct stafs.
- X
- X7. Several pathnames need to be changed for SunOS.
- X
- XJames Clark
- Xjjc@jclark.com
- X
- Xdiff -rcN ../dist-lpr/common_source/common.c ./common_source/common.c
- X*** ../dist-lpr/common_source/common.c Tue Jan 28 09:59:25 1992
- X--- ./common_source/common.c Tue Jan 28 10:43:55 1992
- X***************
- X*** 64,69 ****
- X--- 64,70 ----
- X char *PF; /* name of vrast filter (per job) */
- X char *FF; /* form feed string */
- X char *TR; /* trailer string to be output when Q empties */
- X+ char *MS; /* list of tty modes to set or clear */
- X short SC; /* suppress multiple copies */
- X short SF; /* suppress FF on each print job */
- X short SH; /* suppress header page */
- X***************
- X*** 74,85 ****
- X short PL; /* page length */
- X short PX; /* page width in pixels */
- X short PY; /* page length in pixels */
- X! short BR; /* baud rate if lp is a tty */
- X int FC; /* flags to clear if lp is a tty */
- X int FS; /* flags to set if lp is a tty */
- X int XC; /* flags to clear for local mode */
- X int XS; /* flags to set for local mode */
- X short RS; /* restricted to those with local accounts */
- X
- X char line[BUFSIZ];
- X char pbuf[BUFSIZ/2]; /* buffer for printcap strings */
- X--- 75,87 ----
- X short PL; /* page length */
- X short PX; /* page width in pixels */
- X short PY; /* page length in pixels */
- X! int BR; /* baud rate if lp is a tty */
- X int FC; /* flags to clear if lp is a tty */
- X int FS; /* flags to set if lp is a tty */
- X int XC; /* flags to clear for local mode */
- X int XS; /* flags to set for local mode */
- X short RS; /* restricted to those with local accounts */
- X+ short EX; /* use extended interface */
- X
- X char line[BUFSIZ];
- X char pbuf[BUFSIZ/2]; /* buffer for printcap strings */
- Xdiff -rcN ../dist-lpr/common_source/lp.h ./common_source/lp.h
- X*** ../dist-lpr/common_source/lp.h Tue Jan 28 09:59:50 1992
- X--- ./common_source/lp.h Tue Jan 28 10:43:28 1992
- X***************
- X*** 78,83 ****
- X--- 78,84 ----
- X extern char *CF; /* name of cifplot filter (per job) */
- X extern char *FF; /* form feed string */
- X extern char *TR; /* trailer string to be output when Q empties */
- X+ extern char *MS; /* list of tty modes to set or clear */
- X extern short SC; /* suppress multiple copies */
- X extern short SF; /* suppress FF on each print job */
- X extern short SH; /* suppress header page */
- X***************
- X*** 88,99 ****
- X extern short PX; /* page width in pixels */
- X extern short PY; /* page length in pixels */
- X extern short PL; /* page length */
- X! extern short BR; /* baud rate if lp is a tty */
- X extern int FC; /* flags to clear if lp is a tty */
- X extern int FS; /* flags to set if lp is a tty */
- X extern int XC; /* flags to clear for local mode */
- X extern int XS; /* flags to set for local mode */
- X extern short RS; /* restricted to those with local accounts */
- X
- X extern char line[BUFSIZ];
- X extern char pbuf[]; /* buffer for printcap entry */
- X--- 89,101 ----
- X extern short PX; /* page width in pixels */
- X extern short PY; /* page length in pixels */
- X extern short PL; /* page length */
- X! extern int BR; /* baud rate if lp is a tty */
- X extern int FC; /* flags to clear if lp is a tty */
- X extern int FS; /* flags to set if lp is a tty */
- X extern int XC; /* flags to clear for local mode */
- X extern int XS; /* flags to set for local mode */
- X extern short RS; /* restricted to those with local accounts */
- X+ extern short EX; /* use extended interface */
- X
- X extern char line[BUFSIZ];
- X extern char pbuf[]; /* buffer for printcap entry */
- Xdiff -rcN ../dist-lpr/common_source/pathnames.h ./common_source/pathnames.h
- X*** ../dist-lpr/common_source/pathnames.h Tue Jan 28 10:00:15 1992
- X--- ./common_source/pathnames.h Tue Jan 28 11:22:23 1992
- X***************
- X*** 36,50 ****
- X #include <paths.h>
- X
- X #define _PATH_DEFDEVLP "/dev/lp"
- X! #define _PATH_DEFSPOOL "/var/spool/output/lpd"
- X #define _PATH_HOSTSEQUIV "/etc/hosts.equiv"
- X #define _PATH_HOSTSLPD "/etc/hosts.lpd"
- X! #define _PATH_MASTERLOCK "/var/spool/output/lpd.lock"
- X #define _PATH_PR "/usr/bin/pr"
- X #define _PATH_PRINTCAP "/etc/printcap"
- X! #define _PATH_SOCKETNAME "/var/run/printer"
- X! #define _PATH_VFONT "/usr/libdata/vfont/"
- X! #define _PATH_VFONTB "/usr/libdata/vfont/B"
- X! #define _PATH_VFONTI "/usr/libdata/vfont/I"
- X! #define _PATH_VFONTR "/usr/libdata/vfont/R"
- X! #define _PATH_VFONTS "/usr/libdata/vfont/S"
- X--- 36,50 ----
- X #include <paths.h>
- X
- X #define _PATH_DEFDEVLP "/dev/lp"
- X! #define _PATH_DEFSPOOL "/var/spool/lpd"
- X #define _PATH_HOSTSEQUIV "/etc/hosts.equiv"
- X #define _PATH_HOSTSLPD "/etc/hosts.lpd"
- X! #define _PATH_MASTERLOCK "/var/spool/lpd.lock"
- X #define _PATH_PR "/usr/bin/pr"
- X #define _PATH_PRINTCAP "/etc/printcap"
- X! #define _PATH_SOCKETNAME "/dev/printer"
- X! #define _PATH_VFONT "/usr/lib/vfont/"
- X! #define _PATH_VFONTB "/usr/lib/vfont/B"
- X! #define _PATH_VFONTI "/usr/lib/vfont/I"
- X! #define _PATH_VFONTR "/usr/lib/vfont/R"
- X! #define _PATH_VFONTS "/usr/lib/vfont/S"
- Xdiff -rcN ../dist-lpr/common_source/startdaemon.c ./common_source/startdaemon.c
- X*** ../dist-lpr/common_source/startdaemon.c Tue Jan 28 10:01:03 1992
- X--- ./common_source/startdaemon.c Tue Jan 28 10:42:22 1992
- X***************
- X*** 46,51 ****
- X--- 46,55 ----
- X #include "lp.local.h"
- X #include "pathnames.h"
- X
- X+ #ifdef sun
- X+ #undef sun
- X+ #endif
- X+
- X startdaemon(printer)
- X char *printer;
- X {
- Xdiff -rcN ../dist-lpr/lpd/lpd.c ./lpd/lpd.c
- X*** ../dist-lpr/lpd/lpd.c Tue Jan 28 10:03:22 1992
- X--- ./lpd/lpd.c Tue Jan 28 10:32:51 1992
- X***************
- X*** 72,77 ****
- X--- 72,80 ----
- X
- X #include "lp.h"
- X #include "pathnames.h"
- X+ #ifdef sun
- X+ #undef sun
- X+ #endif
- X
- X int lflag; /* log requests flag */
- X int from_remote; /* from remote socket */
- Xdiff -rcN ../dist-lpr/lpd/modes.c ./lpd/modes.c
- X*** ../dist-lpr/lpd/modes.c
- X--- ./lpd/modes.c Tue Jan 28 15:25:21 1992
- X***************
- X*** 0 ****
- X--- 1,232 ----
- X+ /*-
- X+ * Copyright (c) 1991 The Regents of the University of California.
- X+ * All rights reserved.
- X+ *
- X+ * Redistribution and use in source and binary forms, with or without
- X+ * modification, are permitted provided that the following conditions
- X+ * are met:
- X+ * 1. Redistributions of source code must retain the above copyright
- X+ * notice, this list of conditions and the following disclaimer.
- X+ * 2. Redistributions in binary form must reproduce the above copyright
- X+ * notice, this list of conditions and the following disclaimer in the
- X+ * documentation and/or other materials provided with the distribution.
- X+ * 3. All advertising materials mentioning features or use of this software
- X+ * must display the following acknowledgement:
- X+ * This product includes software developed by the University of
- X+ * California, Berkeley and its contributors.
- X+ * 4. Neither the name of the University nor the names of its contributors
- X+ * may be used to endorse or promote products derived from this software
- X+ * without specific prior written permission.
- X+ *
- X+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X+ * SUCH DAMAGE.
- X+ */
- X+
- X+ /* This is slightly hacked version of bin/stty/modes.c. */
- X+
- X+ #ifndef lint
- X+ static char sccsid[] = "@(#)modes.c 5.4 (Berkeley) 6/10/91";
- X+ #endif /* not lint */
- X+
- X+ #include <termios.h>
- X+ #include <string.h>
- X+
- X+ struct modes {
- X+ char *name;
- X+ long set;
- X+ long unset;
- X+ };
- X+
- X+ static struct modes cmodes[] = {
- X+ "cs5", CS5, CSIZE,
- X+ "cs6", CS6, CSIZE,
- X+ "cs7", CS7, CSIZE,
- X+ "cs8", CS8, CSIZE,
- X+ "cstopb", CSTOPB, 0,
- X+ "-cstopb", 0, CSTOPB,
- X+ "cread", CREAD, 0,
- X+ "-cread", 0, CREAD,
- X+ "parenb", PARENB, 0,
- X+ "-parenb", 0, PARENB,
- X+ "parodd", PARODD, 0,
- X+ "-parodd", 0, PARODD,
- X+ "parity", PARENB | CS7, PARODD | CSIZE,
- X+ "-parity", CS8, PARODD | PARENB | CSIZE,
- X+ "evenp", PARENB | CS7, PARODD | CSIZE,
- X+ "-evenp", CS8, PARODD | PARENB | CSIZE,
- X+ "oddp", PARENB | CS7 | PARODD, CSIZE,
- X+ "-oddp", CS8, PARODD | PARENB | CSIZE,
- X+ "pass8", CS8, PARODD | PARENB | CSIZE,
- X+ "hupcl", HUPCL, 0,
- X+ "-hupcl", 0, HUPCL,
- X+ "hup", HUPCL, 0,
- X+ "-hup", 0, HUPCL,
- X+ "clocal", CLOCAL, 0,
- X+ "-clocal", 0, CLOCAL,
- X+ "crtscts", CRTSCTS, 0,
- X+ "-crtscts", 0, CRTSCTS,
- X+ NULL
- X+ };
- X+
- X+ static struct modes imodes[] = {
- X+ "ignbrk", IGNBRK, 0,
- X+ "-ignbrk", 0, IGNBRK,
- X+ "brkint", BRKINT, 0,
- X+ "-brkint", 0, BRKINT,
- X+ "ignpar", IGNPAR, 0,
- X+ "-ignpar", 0, IGNPAR,
- X+ "parmrk", PARMRK, 0,
- X+ "-parmrk", 0, PARMRK,
- X+ "inpck", INPCK, 0,
- X+ "-inpck", 0, INPCK,
- X+ "istrip", ISTRIP, 0,
- X+ "-istrip", 0, ISTRIP,
- X+ "inlcr", INLCR, 0,
- X+ "-inlcr", 0, INLCR,
- X+ "igncr", IGNCR, 0,
- X+ "-igncr", 0, IGNCR,
- X+ "icrnl", ICRNL, 0,
- X+ "-icrnl", 0, ICRNL,
- X+ "ixon", IXON, 0,
- X+ "-ixon", 0, IXON,
- X+ "flow", IXON, 0,
- X+ "-flow", 0, IXON,
- X+ "ixoff", IXOFF, 0,
- X+ "-ixoff", 0, IXOFF,
- X+ "tandem", IXOFF, 0,
- X+ "-tandem", 0, IXOFF,
- X+ "ixany", IXANY, 0,
- X+ "-ixany", 0, IXANY,
- X+ "decctlq", 0, IXANY,
- X+ "-decctlq", IXANY, 0,
- X+ "imaxbel", IMAXBEL, 0,
- X+ "-imaxbel", 0, IMAXBEL,
- X+ NULL
- X+ };
- X+
- X+ static struct modes lmodes[] = {
- X+ "echo", ECHO, 0,
- X+ "-echo", 0, ECHO,
- X+ "echoe", ECHOE, 0,
- X+ "-echoe", 0, ECHOE,
- X+ "crterase", ECHOE, 0,
- X+ "-crterase", 0, ECHOE,
- X+ "crtbs", ECHOE, 0, /* crtbs not supported, close enough */
- X+ "-crtbs", 0, ECHOE,
- X+ "echok", ECHOK, 0,
- X+ "-echok", 0, ECHOK,
- X+ "echoke", ECHOKE, 0,
- X+ "-echoke", 0, ECHOKE,
- X+ "crtkill", ECHOKE, 0,
- X+ "-crtkill", 0, ECHOKE,
- X+ #ifdef ALTWERASE
- X+ "altwerase", ALTWERASE, 0,
- X+ "-altwerase", 0, ALTWERASE,
- X+ #endif
- X+ "iexten", IEXTEN, 0,
- X+ "-iexten", 0, IEXTEN,
- X+ "echonl", ECHONL, 0,
- X+ "-echonl", 0, ECHONL,
- X+ "echoctl", ECHOCTL, 0,
- X+ "-echoctl", 0, ECHOCTL,
- X+ "ctlecho", ECHOCTL, 0,
- X+ "-ctlecho", 0, ECHOCTL,
- X+ "echoprt", ECHOPRT, 0,
- X+ "-echoprt", 0, ECHOPRT,
- X+ "prterase", ECHOPRT, 0,
- X+ "-prterase", 0, ECHOPRT,
- X+ "isig", ISIG, 0,
- X+ "-isig", 0, ISIG,
- X+ "icanon", ICANON, 0,
- X+ "-icanon", 0, ICANON,
- X+ "noflsh", NOFLSH, 0,
- X+ "-noflsh", 0, NOFLSH,
- X+ "tostop", TOSTOP, 0,
- X+ "-tostop", 0, TOSTOP,
- X+ #ifdef MDMBUF
- X+ "mdmbuf", MDMBUF, 0,
- X+ "-mdmbuf", 0, MDMBUF,
- X+ #endif
- X+ "flusho", FLUSHO, 0,
- X+ "-flusho", 0, FLUSHO,
- X+ "pendin", PENDIN, 0,
- X+ "-pendin", 0, PENDIN,
- X+ "crt", ECHOE|ECHOKE|ECHOCTL, ECHOK|ECHOPRT,
- X+ "-crt", ECHOK, ECHOE|ECHOKE|ECHOCTL,
- X+ "newcrt", ECHOE|ECHOKE|ECHOCTL, ECHOK|ECHOPRT,
- X+ "-newcrt", ECHOK, ECHOE|ECHOKE|ECHOCTL,
- X+ #ifdef NOKERNINFO
- X+ "nokerninfo", NOKERNINFO, 0,
- X+ "-nokerninfo", 0, NOKERNINFO,
- X+ "kerninfo", 0, NOKERNINFO,
- X+ "-kerninfo", NOKERNINFO, 0,
- X+ #endif
- X+ NULL
- X+ };
- X+
- X+ static struct modes omodes[] = {
- X+ "opost", OPOST, 0,
- X+ "-opost", 0, OPOST,
- X+ "litout", 0, OPOST,
- X+ "-litout", OPOST, 0,
- X+ "onlcr", ONLCR, 0,
- X+ "-onlcr", 0, ONLCR,
- X+ #ifdef OXTABS
- X+ "tabs", 0, OXTABS, /* "preserve" tabs */
- X+ "-tabs", OXTABS, 0,
- X+ "xtabs", OXTABS, 0,
- X+ "-xtabs", 0, OXTABS,
- X+ "oxtabs", OXTABS, 0,
- X+ "-oxtabs", 0, OXTABS,
- X+ #else
- X+ "tabs", 0, TABDLY,
- X+ "-tabs", XTABS, TABDLY,
- X+ #endif
- X+ NULL
- X+ };
- X+
- X+ #define CHK(s) (*name == s[0] && !strcmp(name, s))
- X+
- X+ /* Return 0 for OK, -1 on error (analogous to cfset[oi]speed.) */
- X+
- X+ setmode(tp, name)
- X+ struct termios *tp;
- X+ char *name;
- X+ {
- X+ register struct modes *mp;
- X+
- X+ for (mp = cmodes; mp->name; ++mp)
- X+ if (CHK(mp->name)) {
- X+ tp->c_cflag &= ~mp->unset;
- X+ tp->c_cflag |= mp->set;
- X+ return(0);
- X+ }
- X+ for (mp = imodes; mp->name; ++mp)
- X+ if (CHK(mp->name)) {
- X+ tp->c_iflag &= ~mp->unset;
- X+ tp->c_iflag |= mp->set;
- X+ return(0);
- X+ }
- X+ for (mp = lmodes; mp->name; ++mp)
- X+ if (CHK(mp->name)) {
- X+ tp->c_lflag &= ~mp->unset;
- X+ tp->c_lflag |= mp->set;
- X+ return(0);
- X+ }
- X+ for (mp = omodes; mp->name; ++mp)
- X+ if (CHK(mp->name)) {
- X+ tp->c_oflag &= ~mp->unset;
- X+ tp->c_oflag |= mp->set;
- X+ return(0);
- X+ }
- X+ return(-1);
- X+ }
- Xdiff -rcN ../dist-lpr/lpd/ms.c ./lpd/ms.c
- X*** ../dist-lpr/lpd/ms.c
- X--- ./lpd/ms.c Tue Jan 28 15:39:30 1992
- X***************
- X*** 0 ****
- X--- 1,48 ----
- X+ /*
- X+ * Implement ms capability. Uses POSIX termios interface.
- X+ */
- X+
- X+ /*
- X+ * We don't want to include lp.h because of conflicts between
- X+ * <termios.h> and <sgtty> in SunOS.
- X+ */
- X+
- X+ #include <termios.h>
- X+ #include <syslog.h>
- X+
- X+ extern char *printer;
- X+ extern int pfd;
- X+ extern char *MS;
- X+
- X+ setms()
- X+ {
- X+ struct termios t;
- X+ char *s;
- X+
- X+ if (!MS)
- X+ return;
- X+ if (tcgetattr(pfd, &t) < 0) {
- X+ syslog(LOG_ERR, "%s: tcgetattr: %m", printer);
- X+ exit(1);
- X+ }
- X+
- X+ s = MS;
- X+ for (;;) {
- X+ char *p;
- X+ char saved;
- X+
- X+ for (p = s; *p != '\0' && *p != ','; p++)
- X+ ;
- X+ saved = *p;
- X+ *p = '\0';
- X+ if (*s && setmode(&t, s) < 0)
- X+ syslog(LOG_ERR, "%s: unknown mode: %s", printer, s);
- X+ if ((*p = saved) == '\0')
- X+ break;
- X+ s = ++p;
- X+ }
- X+ if (tcsetattr(pfd, TCSADRAIN, &t) < 0) {
- X+ syslog(LOG_ERR, "%s: tcsetattr: %m", printer);
- X+ exit(1);
- X+ }
- X+ }
- Xdiff -rcN ../dist-lpr/lpd/printjob.c ./lpd/printjob.c
- X*** ../dist-lpr/lpd/printjob.c Tue Jan 28 10:04:03 1992
- X--- ./lpd/printjob.c Tue Jan 28 15:36:41 1992
- X***************
- X*** 445,451 ****
- X register char *prog;
- X int fi, fo;
- X FILE *fp;
- X! char *av[15], buf[BUFSIZ];
- X int pid, p[2], stopped = 0;
- X union wait status;
- X struct stat stb;
- X--- 445,451 ----
- X register char *prog;
- X int fi, fo;
- X FILE *fp;
- X! char *av[21], buf[BUFSIZ];
- X int pid, p[2], stopped = 0;
- X union wait status;
- X struct stat stb;
- X***************
- X*** 576,581 ****
- X--- 576,589 ----
- X av[0]++;
- X else
- X av[0] = prog;
- X+ if (EX) {
- X+ av[n++] = "-j";
- X+ av[n++] = jobname;
- X+ av[n++] = "-p";
- X+ av[n++] = printer;
- X+ av[n++] = "-s";
- X+ av[n++] = ST;
- X+ }
- X av[n++] = "-n";
- X av[n++] = logname;
- X av[n++] = "-h";
- X***************
- X*** 1102,1107 ****
- X--- 1110,1116 ----
- X VF = pgetstr("vf", &bp);
- X CF = pgetstr("cf", &bp);
- X TR = pgetstr("tr", &bp);
- X+ MS = pgetstr("ms", &bp);
- X RS = pgetflag("rs");
- X SF = pgetflag("sf");
- X SH = pgetflag("sh");
- X***************
- X*** 1108,1113 ****
- X--- 1117,1123 ----
- X SB = pgetflag("sb");
- X HL = pgetflag("hl");
- X RW = pgetflag("rw");
- X+ EX = pgetflag("ex");
- X BR = pgetnum("br");
- X if ((FC = pgetnum("fc")) < 0)
- X FC = 0;
- X***************
- X*** 1268,1273 ****
- X--- 1278,1284 ----
- X exit(1);
- X }
- X }
- X+ setms();
- X }
- X
- X /*VARARGS1*/
- Xdiff -rcN ../dist-lpr/lpd/recvjob.c ./lpd/recvjob.c
- X*** ../dist-lpr/lpd/recvjob.c Tue Jan 28 10:04:17 1992
- X--- ./lpd/recvjob.c Fri Jan 31 19:29:30 1992
- X***************
- X*** 42,48 ****
- X
- X #include "lp.h"
- X #include "pathnames.h"
- X! #include <sys/mount.h>
- X
- X char *sp = "";
- X #define ack() (void) write(1, sp, 1);
- X--- 42,48 ----
- X
- X #include "lp.h"
- X #include "pathnames.h"
- X! #include <sys/vfs.h>
- X
- X char *sp = "";
- X #define ack() (void) write(1, sp, 1);
- X***************
- X*** 251,257 ****
- X syslog(LOG_ERR, "%s: %m", "statfs(\".\")");
- X return (1);
- X }
- X! spacefree = sfb.f_bavail * (sfb.f_fsize / 512);
- X size = (size + 511) / 512;
- X if (minfree + size > spacefree)
- X return(0);
- X--- 251,257 ----
- X syslog(LOG_ERR, "%s: %m", "statfs(\".\")");
- X return (1);
- X }
- X! spacefree = sfb.f_bavail * (sfb.f_bsize / 512);
- X size = (size + 511) / 512;
- X if (minfree + size > spacefree)
- X return(0);
- END_OF_FILE
- if test 17125 -ne `wc -c <'lpr.diff'`; then
- echo shar: \"'lpr.diff'\" unpacked with wrong size!
- fi
- # end of 'lpr.diff'
- fi
- echo shar: End of archive 1 \(of 2\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked both archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
-