From decwrl!pacbell.com!lll-winken!uunet!allbery Sat May 19 20:37:00 PDT 1990 Article 1587 of comp.sources.misc: Path: decwrl!pacbell.com!lll-winken!uunet!allbery From: tony@ajfcal.UUCP (Tony Field) Newsgroups: comp.sources.misc Subject: v12i105: psf2.0 source 2/6 Message-ID: <89505@uunet.UU.NET> Date: 19 May 90 20:25:06 GMT Sender: allbery@uunet.UU.NET Lines: 1706 Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) Posting-number: Volume 12, Issue 105 Submitted-by: tony@ajfcal.UUCP (Tony Field) Archive-name: psf2/part02 psf2.0 source 2/6 ================= #! /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 'Makefile' <<'END_OF_FILE' X# Make the psf postscript filter system X# X# usage: make all -> to compile all source X# X# make def -> make the .def files from .ppd X# X# X# - - - - Begin configuration - - - - - X# X.c.o: X cc $(CFLAGS) $*.c $(LDFLAGS) X X# Location of binaries X# ^^^^^^^^^^^^^^^^^^^^ X XBINDIR=/usr/local/bin XMANDIR=/usr/man/man.1 X X# Location of printer definition file X# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ X# Modify the DEFDIR in Install.xenix or Install.unix files to match this X# Use another directory (/usr/local/lib ??) if psf is not being used X# as part of the lp spooler system. X XDEFDIR=/usr/spool/lp/model/psfprint.def X X# Underline parametrics within FontInfo is not absolutely guaranteed. X# If you have implemented non-standard fonts without underline information X# in FontInfo, the provide the -DFONTINFO manifest. X X# Provide -DHOPPER if your printer has 2 paper hoppers X# that you will allow to be used for double sided printing. (see psd.1) X X# e.g.: CFLAGS = -O -DFONTINFO -DHOPPER -DBINDIR="$(BINDIR)" -DPDEF="\"$(DEFDIR)\"" X X XCFLAGS = -O -DHOPPER -DBINDIR="\"$(BINDIR)\"" -DPDEF="\"$(DEFDIR)\"" X XLDFLAGS = -lm X X X# Set CFLAGS for either '286 or '386 environments in xenix X X# CFLAGS = -Ml2t32 -F 4000 -DPDEF="\"$(DEFDIR)\"" -DBINDIR="\"$(BINDIR)\"" X# CFLAGS = -O -DBINDIR="\"$(BINDIR)\"" -DPDEF="\"$(DEFDIR)\"" X X# - - - - - end configuration - - - - - - - - X X XSOURCES = psf.c pnf.c pmf.c psd.c psbanner.c psdetect.c selectdef.c table.c psf.h XOBJECTS = psf.o pnf.o pmf.o psd.o psbanner.o psdetect.o XBINARIES = psf pnf pmf psd psbanner psdetect XEXTRA = selectdef table XMANS = psf.1 pnf.1 pmf.1 psd.1 psmbox.1 psman.1 psnroff.1 XDOCS = psf.doc pnf.doc pmf.doc psd.doc psmbox.doc psman.doc psnroff.doc XSCRIPTS = psmbox psman psmandouble psnroff XOTHERS = Makefile README NOTICE Readme.Install Readme.Unix Readme.Xenix \ X Install.unix Install.xenix Testfile psfunix.LP psfxenix.LP \ X psfsample.LP Roadmap query sample.def patchlevel.h X X# Compile all sources X# ^^^^^^^ Xall: $(BINARIES) $(EXTRA) X Xpsf: psf.c X cc $(CFLAGS) psf.c -o psf $(LDFLAGS) X X# Binary installation only X# ^^^^^^^^^^^^^^^^^^^^^^^^ Xinstall: X cp $(BINARIES) $(BINDIR) X cp psfprint.def $(DEFDIR) X X X# Create .def files from .ppd X# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ X Xdef: X table ./ppd/*.ppd defs X Xman: X cp *.1 $(MANDIR) X man psf > /dev/null X man pnf > /dev/null X man pmf > /dev/null X man psd > /dev/null X man psmbox > /dev/null X man psman > /dev/null X man psnroff > /dev/null X Xdoc: X man -b psf > psf.doc X man -b pnf > pnf.doc X man -b pmf > pmf.doc X man -b psd > psd.doc X man -b psmbox > psmbox.doc X man -b psman > psman.doc X man -b psnroff > psnroff.doc X X Xtouch: X touch $(SOURCES) X Xclean: X rm -f $(BINARIES) X rm -f *.o X rm -f *.B X rm -f *.doc END_OF_FILE if test 2714 -ne `wc -c <'Makefile'`; then echo shar: \"'Makefile'\" unpacked with wrong size! fi # end of 'Makefile' fi if test -f 'Roadmap' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Roadmap'\" else echo shar: Extracting \"'Roadmap'\" \(2967 characters\) sed "s/^X//" >'Roadmap' <<'END_OF_FILE' XFile name Usage X============= ====================================================== X X./defs/* directory containing printer definitions X The .def files are derived from the Adobe .ppd files X by using programme "table" to translate the .ppd format X into the .def format required by psf. X XReadme General manual installation instructions. X XReadme.Unix Installation instructions for Unix 3.2 X XReadme.Xenix Installation instructions for Xenix X XMakefile Make all binaries and distribution files X XRoadmap This document X XInstall.unix XInstall.xenix install script for Xenix or Unix. Amongst other things, X these scripts prepare the "model" file based on X the prototype file "postscript.LP" file. This file is X copied into "model" directory after editing is done. X X In addition, the selected printer defintion file from X the /defs/*.def directory is copied into appropriate X directories. X X Of course, all binaries and scripts must be copied to X the users chosen directory. If the user has installed X the on-line man page system, he may also set up the X psf man pages into a chosen directory. X Xpatchlevel.h current version indentification X Xpmf* filter mailboxes (binary) Xpmf.1 man page for pmf Xpmf.c source for mailbox filter X Xpnf* filter nroff ouput to allow bold, underline, italic (binary) Xpnf.1 man page for pnf Xpnf.c source for pnf filter X Xpostscript.EG prototype psf printer model file for use with manual X psf installation X Xpostscript.LP prototype psf printer model (for /usr/spool/lp/model) X Install.xxx will edit this file with "sed" to put in X the chosen BINARY directory and also the default X psf printer OPTIONS. X Xpsbanner* print job banner page (binary) Xpsbanner.c source for psbanner X Xpsd* print double sided pages (binary) Xpsd.1 man page for psd Xpsd.c source for psd. X Xpsdetect* detect if print file is already in postscript (binary) Xpsdetect.c source for psdetect X Xpsf* psf filter to wrap ascii file into postscript (binary) Xpsf.1 man page for psf Xpsf.c source for psf Xpsf.h include file (basic psf system parameters) X Xpsman* print man pages with psf (bourne shell script) Xpsman.1 man page for psman Xpsmandouble sample script to print double sided man pages (bourne shell) X Xpsmbox* print user mailbox (bourne shell script) Xpsmbox.1 man page for psmbox X Xpsnroff* filter nroff output for use with psf (bourne shell script) Xpsnroff.1 man page for psnroff X X*.doc formatted versions of *.1 files for those systems X without nroff and/or man pages X Xquery* utility shell script used by installpsf X Xsample.def "documentation" file to describe the .def file format X Xselectdef* allow user to select printer type in installpsf (binary) Xselectdef.c source for selectdef X Xtable* generate .def printer definitions from Adobe .ppd's (binary) Xtable.c source for table X XTestfile print this with psf to show font facilities. X (The file need editing with 'sed'. See the Readme files X for notes on how this must be done) X END_OF_FILE if test 2967 -ne `wc -c <'Roadmap'`; then echo shar: \"'Roadmap'\" unpacked with wrong size! fi # end of 'Roadmap' fi if test -f 'defs/dp_us470.def' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'defs/dp_us470.def'\" else echo shar: Extracting \"'defs/dp_us470.def'\" \(2343 characters\) sed "s/^X//" >'defs/dp_us470.def' <<'END_OF_FILE' XDataproducts LZR 1260 v47.0 XLetter Xstatusdict begin lettertray end X 612 792 15 8 597 784 XLegal Xstatusdict begin legaltray end X 612 1008 15 15 597 993 XStatement Xstatusdict begin statementtray end X 396 612 14 8 382 604 XEnvelope.612.792 Xstatusdict begin 3 setpapertray letterenvelope end X 612 792 15 8 597 784 XEnvelope.612.1008 Xstatusdict begin 3 setpapertray legalenvelope end X 612 1008 15 15 597 993 XEnvelope.396.612 Xstatusdict begin 3 setpapertray statementenvelope end X 396 612 14 8 382 604 XEnvelope.595.842 Xstatusdict begin 3 setpapertray a4envelope end X 595 842 14 8 581 834 XEnvelope.420.595 Xstatusdict begin 3 setpapertray a5envelope end X 420 595 15 8 405 588 XEnvelope.516.729 Xstatusdict begin 3 setpapertray b5envelope end X 516 729 13 8 503 721 XEnvelope.567.903 Xstatusdict begin 3 setpapertray folioenvelope end X 567 903 14 8 581 928 XEnvelope.279.639 Xstatusdict begin 3 setpapertray 3.875x8.875envelope end X 279 639 13 15 266 624 XEnvelope.297.684 Xstatusdict begin 3 setpapertray 4.125x9.5envelope end X 297 684 15 15 282 669 XEnvelope.324.747 Xstatusdict begin 3 setpapertray 4.5x10.375envelope end X 324 747 17 15 307 732 XEnvelope.342.792 Xstatusdict begin 3 setpapertray 4.75x11envelope end X 342 792 14 15 328 777 XEnvelope.360.828 Xstatusdict begin 3 setpapertray 5x11.5envelope end X 360 828 15 15 344 813 XEnvelope.468.684 Xstatusdict begin 3 setpapertray 6.5x9.5envelope end X 468 684 16 15 452 669 XEnvelope.540.756 Xstatusdict begin 3 setpapertray 7.5x10.5envelope end X 540 756 13 15 527 741 XEnvelope.630.810 Xstatusdict begin 3 setpapertray 8.75x11.25envelope end X 630 810 16 15 614 795 XA4 X X 595 842 14 8 581 834 XA5 X X 420 595 15 8 405 588 XB5 X X 516 729 13 8 503 721 XFolio X X 567 903 14 8 581 928 X*fonts XAvantGarde-Book XAvantGarde-Demi XBookman-Demi XBookman-Light XCourier XHelvetica XHelvetica-Narrow XNewCenturySchlbk-Roman XPalatino-Roman XSymbol XTimes-Roman XZapfChancery-MediumItalic XZapfDingbats X*slots Xstatusdict begin 0 setpapertray end Xstatusdict begin 1 setpapertray end Xstatusdict begin 2 setpapertray end Xstatusdict begin 3 setpapertray end X*eof END_OF_FILE if test 2343 -ne `wc -c <'defs/dp_us470.def'`; then echo shar: \"'defs/dp_us470.def'\" unpacked with wrong size! fi # end of 'defs/dp_us470.def' fi if test -f 'defs/ibm20470.def' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'defs/ibm20470.def'\" else echo shar: Extracting \"'defs/ibm20470.def'\" \(2541 characters\) sed "s/^X//" >'defs/ibm20470.def' <<'END_OF_FILE' XIBM 4216-020 v47.0 XLetter Xletter X 612 792 17 19 595 774 XLegal Xlegal X 612 1008 17 19 595 990 XA4 Xa4 X 595 842 18 19 577 823 XA5 Xa5 X 420 595 18 19 401 577 XB5 Xb5 X 516 729 18 19 481 690 XStatement Xstatement X 396 612 18 19 378 594 XEnvelope.612.792 Xstatusdict begin /envelopewidth 612 def /envelopeheight 792 def envelope end X 612 792 15 8 597 784 XEnvelope.612.1008 Xstatusdict begin /envelopewidth 612 def /envelopeheight 1008 def envelope end X 612 1008 15 15 597 993 XEnvelope.396.612 Xstatusdict begin /envelopewidth 396 def /envelopeheight 612 def envelope end X 396 612 14 8 382 604 XEnvelope.595.842 Xstatusdict begin /envelopewidth 595 def /envelopeheight 842 def envelope end X 595 842 14 8 581 834 XEnvelope.420.595 Xstatusdict begin /envelopewidth 420 def /envelopeheight 595 def envelope end X 420 595 15 8 405 588 XEnvelope.516.729 Xstatusdict begin /envelopewidth 516 def /envelopeheight 729 def envelope end X 516 729 13 8 503 721 XEnvelope.567.903 Xstatusdict begin /envelopewidth 567 def /envelopeheight 903 def envelope end X 567 903 14 8 581 928 XEnvelope.279.639 Xstatusdict begin /envelopewidth 279 def /envelopeheight 639 def envelope end X 279 639 13 15 266 624 XEnvelope.297.684 Xstatusdict begin /envelopewidth 297 def /envelopeheight 684 def envelope end X 297 684 15 15 282 669 XEnvelope.324.747 Xstatusdict begin /envelopewidth 324 def /envelopeheight 747 def envelope end X 324 747 17 15 307 732 XEnvelope.342.792 Xstatusdict begin /envelopewidth 342 def /envelopeheight 792 def envelope end X 342 792 14 15 328 777 XEnvelope.360.828 Xstatusdict begin /envelopewidth 360 def /envelopeheight 828 def envelope end X 360 828 15 15 344 813 XEnvelope.468.684 Xstatusdict begin /envelopewidth 468 def /envelopeheight 684 def envelope end X 468 684 16 15 452 669 XEnvelope.540.756 Xstatusdict begin /envelopewidth 540 def /envelopeheight 756 def envelope end X 540 756 13 15 527 741 XEnvelope.630.810 Xstatusdict begin /envelopewidth 630 def /envelopeheight 810 def envelope end X 630 810 16 15 614 795 X*fonts XAvantGarde-Book XAvantGarde-Demi XBookman-Demi XBookman-Light XCourier XEmulatorfont XGaramond-Light XHelvetica XHelvetica-Black XHelvetica-Light XKorinna-KursivRegular XKorinna-Regular XNewCenturySchlbk-Roman XPalatino-Roman XSymbol XTimes-Roman XZapfChancery-MediumItalic XZapfDingbats X*slots X*eof END_OF_FILE if test 2541 -ne `wc -c <'defs/ibm20470.def'`; then echo shar: \"'defs/ibm20470.def'\" unpacked with wrong size! fi # end of 'defs/ibm20470.def' fi if test -f 'pmf.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pmf.1'\" else echo shar: Extracting \"'pmf.1'\" \(1665 characters\) sed "s/^X//" >'pmf.1' <<'END_OF_FILE' X.TH PMF 1 "" X.SH NAME Xpmf \- postscript mail pre-filter X.SH SYNOPSIS X.nf X Xpmf [ -s ] file... >out.file X X where -s = show all header lines X file = input files (or stdin) X.fi X X.SH DESCRIPTION X X.B Pmf Xis a very simple filter for mail documents. It italicizes the X'Subject:' and attempts to place peoples names in boldface. It can be Xused to print entire mail boxes while suppressing unnecessary mail Xheaders. X XMail box message file may be printed with: X X.nf X pmf mail.file | psf -2 | lp X.fi X XIf X.B psf Xhas been installed as part of the print spooling system, Xthen the output from pmf may be passed directly to the X.B lp Xspooler with: X X.nf X pmf mail.file | lp X.fi X XIf multiple mailboxes are printed, it might be preferable to use the Xcommand (refer to the man pages for psmbox): X.nf X X psmbox file file ... X.fi X XThis date-stamps and identifies the mail box name. Each mailbox file Xis treated as a separate print job. This may result in printer banner Xpages for each file. X XIf X.B pmf Xand X.B psf Xare used with X.B ELM Xthe user's elmrc file should be modified Xto specify the following "print" line (or reasonable approximation): X X.nf X print = /usr/bin/pmf %s | /usr/bin/psf -2 | /usr/bin/lp X.fi X X.SH OPTIONS X X.TP .9i X.B \-s Xcauses all mail headers to be printed. If this option is not Xspecified, then pmf will suppress "meaningless" headers such as: X X.nf X Received: X References: X Path: X Message-ID: X.fi X Xand other. If additional headers are to be ignored, the source for Xpmf.c must be modified. X X.SH SEE ALSO Xpsf pnf psmbox psnroff psman X.fi X X.SH AUTHOR XTony Field. tony@ajfcal END_OF_FILE if test 1665 -ne `wc -c <'pmf.1'`; then echo shar: \"'pmf.1'\" unpacked with wrong size! fi # end of 'pmf.1' fi if test -f 'pmf.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pmf.doc'\" else echo shar: Extracting \"'pmf.doc'\" \(1797 characters\) sed "s/^X//" >'pmf.doc' <<'END_OF_FILE' X X X X PMF(1) UNIX System V PMF(1) X X X X NAME X pmf - postscript mail pre-filter X X SYNOPSIS X pmf [ -s ] file... >out.file X X where -s = show all header lines X file = input files (or stdin) X X X DESCRIPTION X Pmf is a very simple filter for mail documents. It X italicizes the used to print entire mail boxes while X suppressing unnecessary mail headers. X X Mail box message file may be printed with: X X pmf mail.file | psf -2 | lp X X If psf has been installed as part of the print spooling X system, then the output from pmf may be passed directly to X the lp spooler with: X X pmf mail.file | lp X X If multiple mailboxes are printed, it might be preferable to X use the command (refer to the man pages for psmbox): X X psmbox file file ... X X This date-stamps and identifies the mail box name. Each X mailbox file is treated as a separate print job. This may X result in printer banner pages for each file. X X If pmf and psf are used with ELM the user's elmrc file X should be modified to specify the following "print" line (or X reasonable approximation): X X print = /usr/bin/pmf %s | /usr/bin/psf -2 | /usr/bin/lp X X X OPTIONS X -s causes all mail headers to be printed. If this X option is not specified, then pmf will suppress X "meaningless" headers such as: X X Received: X References: X Path: X Message-ID: X X and other. If additional headers are to be X X X X Page 1 (printed 5/14/90) X X X X X X X PMF(1) UNIX System V PMF(1) X X X X ignored, the source for pmf.c must be modified. X X X SEE ALSO X psf pnf psmbox psnroff psman X X X AUTHOR X Tony Field. tony@ajfcal X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Page 2 (printed 5/14/90) X X X END_OF_FILE if test 1797 -ne `wc -c <'pmf.doc'`; then echo shar: \"'pmf.doc'\" unpacked with wrong size! fi # end of 'pmf.doc' fi if test -f 'pnf.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pnf.1'\" else echo shar: Extracting \"'pnf.1'\" \(3600 characters\) sed "s/^X//" >'pnf.1' <<'END_OF_FILE' X.TH PNF 1 "" X.SH NAME Xpnf \- postscript nroff pre-filter for use with psf X X.SH SYNOPSIS X.nf X Xpnf [ -i ] [ -f ] [ -l n ] [ -r n ] file... >out.file X X where -i = use italic font instead of underline X -f = document has formfeeds, ignore line count X -l n = nroff generated "n" ine pages X (default = 66 lines) X -r n = number of lines to remove (default = 3) X file = input files (or stdin) X.fi X X.SH DESCRIPTION X X.B Pnf Xis a filter that converts "backspaced text" generated by X.B nroff Xinto underlined or bold text. Nroff'ed documents should be filtered by X.B pnf Xbefore they are passed to X.B psf Xfor processing. If X.B troff Xsupport is unavailable, then X.B pnf/psf Xmay provide reasonable print quality on a PostScript printer. X XNroff'ed documents normally generate blank lines to separate pages (not Xform feeds). Various nroff'ed document may have different page lengths. X XNroff'ed documents normally use 66 line pages. Since X.B psf Xdefaults to 63 lines on Letter size paper (3 lines are unprintable), three Xblank lines are removed between nroff'ed pages. X XFor example, you could Xprint the "psf" man page "2-up" with: X X.nf X nroff -man psf.1 | pnf -r 3 | psf -2 | lp X Xor 1-up with with italic conversion X X nroff -man psf.1 | pnf -ir 3 | psf -2 | lp X.fi X XMultiple man pages may be conveniently printed directly from Xthe X.B man Xsystem with the script file "psman". XRefer to the man page for psman. X X.SH OPTIONS X X.TP .9i X.B \-i XSince the text from X.B nroff Xusually substitutes underlines for Xitalics, you may use the -i option to generate the "italic" instead of X"underline" escape sequence whenever an underline is detected in the Xinput text. Italics character may be more pleasing than underlined Xtext. X X.RE X.TP .9i X.B \-f XIf the document uses form feeds for page separation, the -f option Xshould be specified. Any line count specified by -l is ignored. X X.RE X.TP .9i X.B \-l n XThe -l option specifies the nominal number of lines generated by X.B nroff Xfor the page. If the -l option is used, the -r option probably must Xbe specified also. X XIf "-l" is not specified, then 66 line nroff pages are assumed. X X.RE X.TP .9i X.B \-r n XThe -r option allows you to specify the number blank lines to be Xremoved between each page generated by nroff. XIf "-r" is not specified, then 3 blank lines are removed between pages. X XThe removed lines account for the "unprintable" top an bottom Xareas of the postscript page. X X.SH PNF NOTES X X.B Pnf Xconverts "backspaced text" generated by X.B nroff Xinto escape sequences Xthat can be used by psf to generate underlined or bold text. The algorithm Xused is quite simple: it simply scans for the "backspace" character and Xattempts determine if the backspace is used in the contex of an "underline" Xor "multi-strike boldface". In some circumstances, it may not correctly Xdetect the print operation (for example, italic-bold is not recognized). X XThe conversion results in the following generated sequences that can Xbe recognized by X.B psf X(were ^E is E or the octal value \\005): X.nf X X ^EB..text..^Eb for bold X ^EU..text..^Eu for underline Xor X ^EI..text..^Ei for italics X X(italics instead of underline selected with -i option) X X.fi XThe logic cannot handle bold-underlined (nor italic-underlined). X XA shell script X.B psman Xis provided to print man pages conveniently without the need of X.B nroff Xand friends. XThe man pages for psf could be printed with: X.nf X X psman psf X X.fi X.SH SEE ALSO Xpsf pmf psman psnroff psmbox X X.SH AUTHOR X XTony Field. tony@ajfcal END_OF_FILE if test 3600 -ne `wc -c <'pnf.1'`; then echo shar: \"'pnf.1'\" unpacked with wrong size! fi # end of 'pnf.1' fi if test -f 'pnf.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pnf.doc'\" else echo shar: Extracting \"'pnf.doc'\" \(3970 characters\) sed "s/^X//" >'pnf.doc' <<'END_OF_FILE' X X X X PNF(1) UNIX System V PNF(1) X X X X NAME X pnf - postscript nroff pre-filter for use with psf X X X SYNOPSIS X pnf [ -i ] [ -f ] [ -l n ] [ -r n ] file... >out.file X X where -i = use italic font instead of underline X -f = document has formfeeds, ignore line count X -l n = nroff generated "n" ine pages X (default = 66 lines) X -r n = number of lines to remove (default = 3) X file = input files (or stdin) X X X DESCRIPTION X Pnf is a filter that converts "backspaced text" generated by X nroff into underlined or bold text. Nroff'ed documents X should be filtered by pnf before they are passed to psf for X processing. If troff support is unavailable, then pnf/psf X may provide reasonable print quality on a PostScript X printer. X X Nroff'ed documents normally generate blank lines to separate X pages (not form feeds). Various nroff'ed document may have X different page lengths. X X Nroff'ed documents normally use 66 line pages. Since psf X defaults to 63 lines on Letter size paper (3 lines are X unprintable), three blank lines are removed between nroff'ed X pages. X X For example, you could print the "psf" man page "2-up" with: X X nroff -man psf.1 | pnf -r 3 | psf -2 | lp X X or 1-up with with italic conversion X X nroff -man psf.1 | pnf -ir 3 | psf -2 | lp X X Multiple man pages may be conveniently printed directly from X the man system with the script file "psman". Refer to the X man page for psman. X X X OPTIONS X -i Since the text from nroff usually substitutes X underlines for italics, you may use the -i option X to generate the "italic" instead of "underline" X escape sequence whenever an underline is detected X in the input text. Italics character may be more X pleasing than underlined text. X X X X Page 1 (printed 5/15/90) X X X X X X X PNF(1) UNIX System V PNF(1) X X X X -f If the document uses form feeds for page X separation, the -f option should be specified. Any X line count specified by -l is ignored. X X X -l n The -l option specifies the nominal number of lines X generated by nroff for the page. If the -l option X is used, the -r option probably must be specified X also. X X If "-l" is not specified, then 66 line nroff pages X are assumed. X X X -r n The -r option allows you to specify the number X blank lines to be removed between each page X generated by nroff. If "-r" is not specified, then X 3 blank lines are removed between pages. X X The removed lines account for the "unprintable" top X an bottom areas of the postscript page. X X X PNF NOTES X Pnf converts "backspaced text" generated by nroff into X escape sequences that can be used by psf to generate X underlined or bold text. The algorithm used is quite simple: X it simply scans for the "backspace" character and attempts X determine if the backspace is used in the contex of an X "underline" or "multi-strike boldface". In some X circumstances, it may not correctly detect the print X operation (for example, italic-bold is not recognized). X X The conversion results in the following generated sequences X that can be recognized by psf (were ^E is E or the X octal value \005): X X ^EB..text..^Eb for bold X ^EU..text..^Eu for underline X or X ^EI..text..^Ei for italics X X (italics instead of underline selected with -i option) X X The logic cannot handle bold-underlined (nor italic- X underlined). X X A shell script psman is provided to print man pages X conveniently without the need of nroff and friends. The man X pages for psf could be printed with: X X psman psf X X X X Page 2 (printed 5/15/90) X X X X X X X PNF(1) UNIX System V PNF(1) X X X X SEE ALSO X psf pmf psman psnroff psmbox X X X AUTHOR X Tony Field. tony@ajfcal X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Page 3 (printed 5/15/90) X X X END_OF_FILE if test 3970 -ne `wc -c <'pnf.doc'`; then echo shar: \"'pnf.doc'\" unpacked with wrong size! fi # end of 'pnf.doc' fi if test -f 'psd.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'psd.1'\" else echo shar: Extracting \"'psd.1'\" \(2000 characters\) sed "s/^X//" >'psd.1' <<'END_OF_FILE' X.TH PSD 1 "" X.SH NAME Xpsd \- print double sided X.SH SYNOPSIS X.nf X Xpsd -n file X X where n is the number 1, 2, or 3 X 1 = print first side X 2 = print second side X 3 = print both sides (must have second print tray) X.fi X X.SH DESCRIPTION X XIf the postscript filter X.B psf Xis used with the -d (double sided) Xoption, the output from X.B psf Xmust be passed to X.B psd Xto print Xthe generated file in "double sided" format. (See NOTE below.) X XThe printing must be done in two passes: first to print side one, Xsecond to print side two. X XThe general sequence of commands must be: X X.nf X psf -d my.file > temp.file X psd -1 temp.file | lp X <-- re-feed the paper for 2nd pass X psd -2 temp.file | lp X.fi X XThe first invocation of X.B psd Xwith the -1 option prints only the front side Xof the pages. After the printing is complete, the paper must be Xre-fed into the print hopper. The psd -2 command is then issued to print Xon the back side of the pages. X XIf X.B psd Xis used with the -3 option, the front sides are printed. Automatically, Xthe printer is switched to accept input from the alternate print tray. XAs soon as the alternate print tray is loaded, the second side is printed. XE.g.: X.nf X psf -d my.file > temp.file X psd -3 temp.file | lp X.fi X XThe -3 option may be used only if the printer has two print trays. X X.SH NOTE X XIf X.B psf Xwas compiled with the "-DHOPPER" option and the postscript printer Xhas at least two paper hoppers, X.B psf Xautomatically calls X.B psd Xto perform Xdouble sided printing. Manual invocation of X.B psd Xis not necessary. X XIf X.B psf Xwas not compiled with "-DHOPPER" or if the postscript printer does Xnot have at least two paper hoppers, then X.B psd Xmust be used as described Xabove. X XThe use of option "-3" assumes that X.B psf Xwas compiled X.B without Xthe "-DHOPPER" Xoption, however the printer does, in fact, have at least two paper Xhoppers. X X.SH SEE ALSO X Xpsf psmbox pmf pnf psman psnroff END_OF_FILE if test 2000 -ne `wc -c <'psd.1'`; then echo shar: \"'psd.1'\" unpacked with wrong size! fi # end of 'psd.1' fi if test -f 'psd.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'psd.doc'\" else echo shar: Extracting \"'psd.doc'\" \(2200 characters\) sed "s/^X//" >'psd.doc' <<'END_OF_FILE' X X X X PSD(1) UNIX System V PSD(1) X X X X NAME X psd - print double sided X X SYNOPSIS X psd -n file X X where n is the number 1, 2, or 3 X 1 = print first side X 2 = print second side X 3 = print both sides (must have second print tray) X X X DESCRIPTION X If the postscript filter psf is used with the -d (double X sided) option, the output from psf must be passed to psd to X print the generated file in "double sided" format. (See X NOTE below.) X X The printing must be done in two passes: first to print X side one, second to print side two. X X The general sequence of commands must be: X X psf -d my.file > temp.file X psd -1 temp.file | lp X <-- re-feed the paper for 2nd pass X psd -2 temp.file | lp X X The first invocation of psd with the -1 option prints only X the front side of the pages. After the printing is X complete, the paper must be re-fed into the print hopper. X The psd -2 command is then issued to print on the back side X of the pages. X X If psd is used with the -3 option, the front sides are X printed. Automatically, the printer is switched to accept X input from the alternate print tray. As soon as the X alternate print tray is loaded, the second side is printed. X E.g.: X psf -d my.file > temp.file X psd -3 temp.file | lp X X The -3 option may be used only if the printer has two print X trays. X X X NOTE X If psf was compiled with the "-DHOPPER" option and the X postscript printer has at least two paper hoppers, psf X automatically calls psd to perform double sided printing. X Manual invocation of psd is not necessary. X X X X X Page 1 (printed 5/14/90) X X X X X X X PSD(1) UNIX System V PSD(1) X X X X If psf was not compiled with "-DHOPPER" or if the postscript X printer does not have at least two paper hoppers, then psd X must be used as described above. X X The use of option "-3" assumes that psf was compiled without X the "-DHOPPER" option, however the printer does, in fact, X have at least two paper hoppers. X X X SEE ALSO X psf psmbox pmf pnf psman psnroff X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Page 2 (printed 5/14/90) X X X END_OF_FILE if test 2200 -ne `wc -c <'psd.doc'`; then echo shar: \"'psd.doc'\" unpacked with wrong size! fi # end of 'psd.doc' fi if test -f 'psfsample.LP' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'psfsample.LP'\" else echo shar: Extracting \"'psfsample.LP'\" \(2182 characters\) sed "s/^X//" >'psfsample.LP' <<'END_OF_FILE' X# Postscript serial or parallel printer using psf filters X# X# the call to "psbanner" and "psf" below should reflect the X# default paper size (given as "-g Letter" in this example.) X X# where are the psf binaries? X XBINDIR="/usr/local/bin" X X# The following parameters are passed from "lp" at print time. X Xprinter=`basename $0` Xrequest=$1 Xname=$2 Xtitle=$3 Xcopies=$4 Xoptions=$5 Xshift; shift; shift; shift; shift X X# Modify the following for required stty settings. X Xstty onlcr ixon ixoff 0<&1 X X# get the banner count from what ever file tells you about banners. X# see if the user is allowed to override the banner spec. X# The "Banner: on" and "Banner: on:Always" can be specified by lpadmin. X# The "Banner: off" must be manually edited into the configuration file. X Xbanner="yes" Xbanopt=`sed -n 's/^Banner: *\(.*\).*$/\1/p' /usr/spool/lp/admins/lp/printers/$printer/configuration` Xmustbanner="no" Xfor i in ${banopt} Xdo X case "${i}" in X X on) banner="yes" X mustbanner="no" X ;; X on:Always) banner="yes" X mustbanner="yes" X ;; X off) banner="no" X mustbanner="no" X ;; X *) banner="yes" X mustbanner="no" X ;; X esac Xdone X Xoptions= Xfor i in ${option_list} Xdo X case "${i}" in X X nobanner) X case "${mustbanner}" in X yes) ;; X *) banner="no" X ;; X esac X ;; X banner) X banner="yes" X ;; X *) X options="${options} ${i}" X ;; X esac; Xdone X X Xtoday=`date` X X[ "$banner" = yes ] && { X X sysid=`uname -n` X X# get the user name from the GCOS field in /etc/passwd X X user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd` X X $BINDIR/psbanner "$name" "$user" "$request" "$printer" "$options" "$today" "$sysid" "$title" -g Letter X} X X# If the input text file contains %! in the first line, X# then assume that it has already been wrapped in postscript X# code. If the %! is missing, then filter through psf X# X# The "-g Letter" is the default paper size, however the user X# may override it with another specification X# X# The "$options" are passed by lp with -o"opions" X Xwhile [ "$copies" -gt 0 ] Xdo X for file X do X $BINDIR/psdetect < "$file" X X case $? in X X 0) cat "$file" 2>&1;; X X 1) $BINDIR/psf -g Letter $options "$file" 2>&1;; X X esac X done X copies=`expr $copies - 1` Xdone Xexit 0 END_OF_FILE if test 2182 -ne `wc -c <'psfsample.LP'`; then echo shar: \"'psfsample.LP'\" unpacked with wrong size! fi # end of 'psfsample.LP' fi if test -f 'psfunix.LP' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'psfunix.LP'\" else echo shar: Extracting \"'psfunix.LP'\" \(2338 characters\) sed "s/^X//" >'psfunix.LP' <<'END_OF_FILE' X#ident "x(#)lp:model/postscript 1.3.1.2 X# Postscript serial or parallel printer using psf filters X# X# The Install.unix script will use sed to replace "BINARY" with X# the binary library directory name such as /local/bin. X# "OPTIONS" will be replaced by the desired default X# options - usually the page size (-g Letter) generated X# with Install.unix. X X# The following parameters are passed from "lp" at print time. X Xprinter=`basename $0` Xrequest=$1 Xname=$2 Xtitle=$3 Xcopies=$4 Xoptions=$5 Xshift; shift; shift; shift; shift X X# Modify the following for required stty settings. X Xstty onlcr ixon ixoff 0<&1 X X# get the banner option from the configuration file. X# see if the user is allowed to override the banner spec. X# The "Banner: on" and "Banner: on:Always" can be specified by lpadmin. X# The "Banner: off" must be manually edited into the configuration file. X Xbanner="yes" Xbanopt=`sed -n 's/^Banner: *\(.*\).*$/\1/p' /usr/spool/lp/admins/lp/printers/$printer/configuration` Xmustbanner="no" Xfor i in ${banopt} Xdo X case "${i}" in X X on) banner="yes" X mustbanner="no" X ;; X on:Always) banner="yes" X mustbanner="yes" X ;; X off) banner="no" X mustbanner="no" X ;; X *) banner="yes" X mustbanner="no" X ;; X esac Xdone X Xoptions= Xfor i in ${option_list} Xdo X case "${i}" in X X nobanner) X case "${mustbanner}" in X yes) ;; X *) banner="no" X ;; X esac X ;; X banner) X banner="yes" X ;; X *) X options="${options} ${i}" X ;; X esac; Xdone X X Xtoday=`date` X X[ "$banner" = yes ] && { X X# get the machine name uname. X X sysid=`uname -n` X X# get the user name from the GCOS field in /etc/passwd X X user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd` X X BINARY/psbanner "$name" "$user" "$request" "$printer" "$options" "$today" "$sysid" "$title" BANNER X} X X# If the input text file contains %! in the first line, X# then assume that it has already been wrapped in postscript X# code. If the %! is missing, then filter through psf X# X# The "OPTIONS" are default options forced in during "Install.unix" X# Typically, this specifies the default paper size e.g.: X# X# -g Letter X# X# The "$options" are passed by lp with -o"opions" X Xwhile [ "$copies" -gt 0 ] Xdo X for file X do X BINARY/psdetect < "$file" X X case $? in X X 0) cat "$file" 2>&1;; X X 1) BINARY/psf OPTIONS $options "$file" 2>&1;; X X esac X done X copies=`expr $copies - 1` Xdone Xexit 0 END_OF_FILE if test 2338 -ne `wc -c <'psfunix.LP'`; then echo shar: \"'psfunix.LP'\" unpacked with wrong size! fi # end of 'psfunix.LP' fi if test -f 'psfxenix.LP' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'psfxenix.LP'\" else echo shar: Extracting \"'psfxenix.LP'\" \(2058 characters\) sed "s/^X//" >'psfxenix.LP' <<'END_OF_FILE' X: X# X#! Postscript serial or parallel printer using psf filters X# X# NOTE: the above line is displayed on the "mkdev lp" printer X# ^^^^^ selection list. If you create multiple printer models, X# edit the above to signify the options invoked with psf. X# X# This print model works with Xenix 2.2.3, 2.3.2. It is the printer X# back-end that is called by lp for physical printing. X# X# The installpsf script will use sed to replace "BINARY" with X# the binary library directory name. X# "OPTIONS" will be replaced by the desired default X# options specified in the Makefile. X X# The following parameters are passed from "lp" at print time. X Xprinter=`basename $0` Xrequest=$1 Xname=$2 Xtitle=$3 Xcopies=$4 Xoptions=$5 Xshift; shift; shift; shift; shift X X# Modify the following for required stty settings. X Xstty onlcr ixon ixoff 0<&1 X Xbanner=yes Xtoday=`date` Xfor i in $options; do X case $i in X b) banner=no ;; X esac Xdone X X[ "$banner" = yes ] && { X X# get the machine name X X if test -r /etc/systemid; then X sysid=`sed 1q /etc/systemid` X else X sysid=`uname -n` X fi X X# get the user name from the GCOS field in /etc/passwd X X user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd` X X# get the count of the number of banner pages from /etc/default/lpd X X bannercount=`sed -n 's/^BANNERS=//p' /etc/default/lpd` X [ "$bannercount" -ge 0 -a "$bannercount" -le 5 ] || bannercount=1 X while [ "$bannercount" -gt 0 ] X do X BINARY/psbanner "$name" "$user" "$request" "$printer" "$options" "$today" "$sysid" "$title" BANNER X bannercount=`expr $bannercount - 1` X done X} X X# If the input text file contains %! in the first line, X# then assume that it has already been wrapped in postscript X# code. If the %! is missing, then filter through psf X# X# The "OPTIONS" are default options forced in during "installpsf" X# The "$options" are passed by lp with -o"opions" X Xwhile [ "$copies" -gt 0 ] Xdo X for file X do X BINARY/psdetect < "$file" X X case $? in X X 0) cat "$file" 2>&1;; X X 1) BINARY/psf OPTIONS $options "$file" 2>&1;; X X esac X done X copies=`expr $copies - 1` Xdone Xexit 0 END_OF_FILE if test 2058 -ne `wc -c <'psfxenix.LP'`; then echo shar: \"'psfxenix.LP'\" unpacked with wrong size! fi # end of 'psfxenix.LP' fi if test -f 'sample.def' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'sample.def'\" else echo shar: Extracting \"'sample.def'\" \(2373 characters\) sed "s/^X//" >'sample.def' <<'END_OF_FILE' XThis is a commented sample of a printer "def" file. X XThe contents are distilled from the Adobe .ppd files for each printer Xtype. Since the .ppd files are do not necessarily describe each printer Xaccurately, you should run the "psizes.ps" programme (generated by X"selectdef") to the printer to determine the imageable area actually Xrecorded in your printer roms. You may then change your psfprint.def Xcontrol file to identify the accurate imageable area. X XThe various sections of the file are separated by a line starting Xwith "*". The first section describes the page sizes known to Xthe printer. X X X XNEC LC-890 v47.0 (modified) <-- printer name for selectdef XLetter <-- user name (e.g. psf -g Letter) Xstatusdict begin lettertray end <-- actual postscript to select size X 612 792 18 15 599 776 <-- page dimensions X | | | | | +- upper right y-coord (points) X | | | | +------- upper right x-coord X | | | +------------ lower left y-coord X | | +------------------ lower left x-coord X | +------------------------- total page height in points X +------------------------------- total page width in points X XLegal <-+-- the above is repeated for Xstatusdict begin legaltray end | each page size known X 612 1008 18 19 593 990 <-+-- to the printer XA4 Xstatusdict begin a4tray end X 595 842 10 8 585 813 XB5 Xstatusdict begin b5tray end X 516 729 18 7 482 702 X*fonts <-- marker for fonts XAvantGarde-Book <-- real font names in font dictionary XAvantGarde-Demi ( these font names are shown XBookman-Demi to the user on the psf XBookman-Light usage with: psf -? ) XCourier XHelvetica XHelvetica-Narrow XNewCenturySchlbk-Roman XPalatino-Roman XSymbol XTimes-Roman XZapfChancery-MediumItalic XZapfDingbats X*slots <-- marker for paper trays Xstatusdict begin 1 setpapertray end <-- how to select first tray Xstatusdict begin 2 setpapertray end <-- how to select second tray etc.. X*eof <-- logical eof END_OF_FILE if test 2373 -ne `wc -c <'sample.def'`; then echo shar: \"'sample.def'\" unpacked with wrong size! fi # end of 'sample.def' fi echo shar: End of archive 2 \(of 6\). cp /dev/null ark2isdone MISSING="" for I in 1 2 3 4 5 6 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 6 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