home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume30 / psf3 / patch03b < prev    next >
Encoding:
Text File  |  1992-06-19  |  48.5 KB  |  1,478 lines

  1. Newsgroups: comp.sources.misc
  2. From: tony@ajfcal.cuc.ab.ca (Tony Field)
  3. Subject:  v30i051:  psf3 - Postscript print filter system, Patch03b/4
  4. Message-ID: <1992Jun14.201822.2224@sparky.imd.sterling.com>
  5. X-Md4-Signature: 1a7002375e5ded19880076aee40d6b4a
  6. Date: Sun, 14 Jun 1992 20:18:22 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: tony@ajfcal.cuc.ab.ca (Tony Field)
  10. Posting-number: Volume 30, Issue 51
  11. Archive-name: psf3/patch03b
  12. Environment: ISC, SUNOS, SYSVR3, DOS
  13. Patch-To: psf3: Volume 27, Issue 91-100
  14.  
  15. *** net/psf.h    Sun Apr 19 13:32:14 1992
  16. --- psf.h    Tue Jun  2 02:18:51 1992
  17. ***************
  18. *** 1,11 ****
  19.   /* ta=4
  20.                   p s f . h
  21.           general configuration for psf.
  22.   */
  23.   /*
  24. !  * $Id: psf.h,v 3.2 1992/01/19 05:50:33 ajf Exp ajf $
  25.   */
  26.   /**** Configuration information:  if not defined in the makefile *****
  27.    *
  28.    *    DOS users:  modify these defaults, no other #defines are necessary
  29.    *                 for msdos users.
  30. --- 1,11 ----
  31.   /* ta=4
  32.                   p s f . h
  33.           general configuration for psf.
  34.   */
  35.   /*
  36. !  * $Id: psf.h,v 3.4 1992/02/24 06:48:59 ajf Exp ajf $
  37.   */
  38.   /**** Configuration information:  if not defined in the makefile *****
  39.    *
  40.    *    DOS users:  modify these defaults, no other #defines are necessary
  41.    *                 for msdos users.
  42. ***************
  43. *** 25,45 ****
  44.   #else
  45.   #define BINDIR "/local/bin"
  46.   #endif
  47.   #endif
  48.   
  49. ! /* where is your printer definition file located? */
  50.   #ifndef PDEF
  51. ! #if defined(MSDOS) || defined(__MSDOS__)
  52. ! #define PDEF "psfprint.def"
  53. ! #else
  54. ! #define PDEF "/local/lib/psfprint.def"
  55.   #endif
  56.   #endif
  57.   
  58.   
  59.   /* if two paper trays are available, and you want to use them for
  60.    * double sided printing, then make HOPPER defined.
  61.    */
  62.   
  63.   /* #define HOPPER  */
  64. --- 25,52 ----
  65.   #else
  66.   #define BINDIR "/local/bin"
  67.   #endif
  68.   #endif
  69.   
  70. ! /* MSDOS users may wish to always generate CTL/D at end of print job */
  71. ! /* 
  72. ! #define CTLDALWAYS 
  73. ! */
  74. ! #if defined(MSDOS)  ||  defined(__MSDOS__)
  75. ! #ifndef BINDIR
  76. ! #define BINDIR "c:/bin"
  77. ! #endif
  78.   #ifndef PDEF
  79. ! #define PDEF "c:/lib/psfprint.def"
  80.   #endif
  81.   #endif
  82.   
  83. + #ifndef PSFDOUB
  84. + #define PSFDOUB "psfdoub"
  85. + #endif
  86.   
  87.   /* if two paper trays are available, and you want to use them for
  88.    * double sided printing, then make HOPPER defined.
  89.    */
  90.   
  91.   /* #define HOPPER  */
  92. ***************
  93. *** 107,111 ****
  94. --- 114,125 ----
  95.   #define MAX_PAGES    1000        /* max pages in a book */
  96.   #define LONG_STR    1000        /* max bytes in an input text line */
  97.   
  98.   #define    NSLOTS        6
  99.   #define NPAGE        30
  100. + /*    exit codes */
  101. + #define JOB_IS_DONE     0
  102. + #define REPEAT_JOB         1
  103. + #define DISCARD_JOB     2
  104. + #define ERROR             -2
  105. *** net/Changes    Sun Apr 19 13:32:05 1992
  106. --- Changes    Tue Jun  2 02:19:08 1992
  107. ***************
  108. *** 1,6 ****
  109. !         Psf changes between version 2 and 3
  110.   
  111.        1.    Page rotation and scaling has been corrected. In particular,
  112.       problems with landscape printing have been fixed.
  113.   
  114.        2.    Changes have been made to allow psf to work with the lpr/lpd
  115. --- 1,34 ----
  116. ! Changes between V3 patchlevel 4 and patchlevel 5  (May 1992)
  117. !      1. fixed loss of first line if "language feature" used.
  118. !      
  119. !      2. psf can print to a pipe with the -O option.  Hopefully,
  120. !         this allows printing to an apple network.  Usually, this
  121. !         is installed as a print option in psfprint.def (for lpr/lpd).
  122. !      
  123. ! Changes between psf V3 patchlevel 3 and patchlevel 4  (April 1992)
  124. !      1. ISO-Latin1 encoding supportd.
  125. !      
  126. !      2. Page usage accounting added (printcap "af" support)
  127. !      
  128. !      3. Psf can read page statistics from a serial/ethernet printer
  129. !         (printcap "rw" support).
  130. !      
  131. !      4. If the printer supports duplex double sided printing,
  132. !         the feature is invoked with -D
  133. !      
  134. !      5. Printing a ctl/D at eoj is not done unless psf is
  135. !         printing to a printer device.
  136. !      
  137. !      6. the -u option to select alternate printer definition files
  138. !         now works if psf is used as part of the spooler filter system.
  139. !      
  140. !      7. Some printer definitions in ./def have been fixed.
  141. ! Psf changes between version 2 and 3
  142.   
  143.        1.    Page rotation and scaling has been corrected. In particular,
  144.       problems with landscape printing have been fixed.
  145.   
  146.        2.    Changes have been made to allow psf to work with the lpr/lpd
  147. *** net/Install.def    Sun Apr 19 13:32:24 1992
  148. --- Install.def    Tue Jun  2 02:19:02 1992
  149. ***************
  150. *** 209,218 ****
  151. --- 209,224 ----
  152.   Normal                    <-- either "Normal" if the pages are
  153.                           stacked face down, or
  154.                           "Reverse" if the pages are
  155.                           stacked face up.
  156.                           
  157. + *duplex 1                <-- marker for duplex command
  158. + statusdict begin true setduplexmode end    <-- commend to enable duplex mode
  159. +                         (If the printer does not support
  160. +                          duplex mode, use "duplex 0"
  161. +                          or remove both lines )
  162. +                       
  163.   *fonts 10                               <-- marker and count for fonts
  164.   AvantGarde-Book                         <-- real font names in your printer
  165.   Bookman-Light
  166.   Courier                      
  167.   Helvetica                    fonts available on your printer
  168. *** net/Install.lpd    Sun Apr 19 13:32:29 1992
  169. --- Install.lpd    Tue Jun  2 02:19:02 1992
  170. ***************
  171. *** 6,16 ****
  172.           make all
  173.           make printer
  174.           make scripts
  175.           make install
  176.   
  177. !     filters and a suitable /etc/printcap file should be constructed
  178.       as outlined below.
  179.   
  180.       The "make install" process set links to psflpd for a few page
  181.       layouts. Since the the sample set of links may not be
  182.       appropriate, the links may be deleted and/or a new set of links
  183. --- 6,16 ----
  184.           make all
  185.           make printer
  186.           make scripts
  187.           make install
  188.   
  189. !     Filters and a suitable /etc/printcap file should be constructed
  190.       as outlined below.
  191.   
  192.       The "make install" process set links to psflpd for a few page
  193.       layouts. Since the the sample set of links may not be
  194.       appropriate, the links may be deleted and/or a new set of links
  195. ***************
  196. *** 64,86 ****
  197.       
  198.           *psflpd <linkname> <opt> <opt> ... #comment
  199.       
  200.       where  *psflpd     identifies the line for psflpd option selection.
  201.              <linkname>  the name of the link to psflpd
  202. !            <opt>       any psf(1) option  (except that quoted
  203. !                       options are not allowed. e.g. -H "text line"
  204. !                       is not permitted)
  205.       
  206.       A selection of (hopefully) useful link names and option entries
  207.       was created by "make printer" and placed in psfprint.def.  The
  208.       associated links to lpd were created by "make install"
  209.       
  210.       Edit psfprint.def, create new links to psflpd, and modify the
  211.       print cap entries for different print options.  For example,
  212.       If you have a "General Accounting" package that requires special
  213.       print formatting, a link to psflpd could be set up with the
  214. !     exact options neccesary for the print layout.  Typically,
  215.       such reports print 66 lines on a page, 6 of which are used
  216.       to emulate a "skip to head of forms".  A suitable set of
  217.       print options for such a report would be:
  218.       
  219.           *psflpd paccount -c132 -l60 -R2 -r6 -w
  220. --- 64,88 ----
  221.       
  222.           *psflpd <linkname> <opt> <opt> ... #comment
  223.       
  224.       where  *psflpd     identifies the line for psflpd option selection.
  225.              <linkname>  the name of the link to psflpd
  226. !            <opt>       any psf(1) option 
  227.       
  228. +     (NOTE: if a serial printer is used, the "-a" option should be
  229. +     specified to process information generated by the printer. The
  230. +     printcap "rw" should be used to enable the port for read/write)
  231.       A selection of (hopefully) useful link names and option entries
  232.       was created by "make printer" and placed in psfprint.def.  The
  233.       associated links to lpd were created by "make install"
  234.       
  235.       Edit psfprint.def, create new links to psflpd, and modify the
  236.       print cap entries for different print options.  For example,
  237.       If you have a "General Accounting" package that requires special
  238.       print formatting, a link to psflpd could be set up with the
  239. !     exact options necessary for the print layout.  Typically,
  240.       such reports print 66 lines on a page, 6 of which are used
  241.       to emulate a "skip to head of forms".  A suitable set of
  242.       print options for such a report would be:
  243.       
  244.           *psflpd paccount -c132 -l60 -R2 -r6 -w
  245. ***************
  246. *** 153,173 ****
  247.       executed once for a group of files, while the input (if=) filer
  248.       is invoked for every file being printed in a group.)
  249.   
  250.       If banner printing IS desired, use psflpd and friends as an "of="
  251.       filter. Beware that the banner page will probably be truncated if
  252. !     printing is in portrat layout.
  253.   
  254.       If banner printing is NOT desired, use psflpd and friends as an
  255.       "if=" or "of=" filter and suppress banners with :sh.
  256.   
  257.       If you are not happy with the banner page layout printed by your
  258.       postscript printer, then the only suggestion I have is to modify
  259.       the sources for lpd!
  260.   
  261.   
  262. !    5.    PRINTING POSTSCRIPT SOURCE
  263.      
  264.       If Postscript code must be printed, filter the source manually
  265.       with psf - otherwise the psflpd will pass the code to the
  266.       printer for execution:
  267.   
  268. --- 155,221 ----
  269.       executed once for a group of files, while the input (if=) filer
  270.       is invoked for every file being printed in a group.)
  271.   
  272.       If banner printing IS desired, use psflpd and friends as an "of="
  273.       filter. Beware that the banner page will probably be truncated if
  274. !     printing is in portrait layout.
  275.   
  276.       If banner printing is NOT desired, use psflpd and friends as an
  277.       "if=" or "of=" filter and suppress banners with :sh.
  278.   
  279.       If you are not happy with the banner page layout printed by your
  280.       postscript printer, then the only suggestion I have is to modify
  281.       the sources for lpd!
  282.   
  283. +    5.    PRINTING TO A PIPE (for apple networks??)
  284. +    
  285. +        If the spooler should print to a pipe rather than stdout
  286. +        (such as printing to the "papif" daemon for apple network
  287. +        printing), the option "-O pipe-cmd" may be inserted into
  288. +        the link options:
  289. +        
  290. +            *psfprint applepipe -u apple.def -O "papif"
  291. +                                      ^^^^^^^^^^
  292. +     Rather than passing the filtered output to stdout, the
  293. +     "applepipe" link opens a pipe to "papif" to handle the final
  294. +     printing. Often, an alternate printer file is specified (-u =
  295. +     apple.def) to define the printer configuration for the foreign
  296. +     printer.
  297. +     The printcap "lp=/dev/null" should be used if printing
  298. +     across a "foreign network" connection.
  299. +    6.   ACCOUNTING (by page count)
  300. +     If the "af" printcap is used to specify an accounting
  301. +     file, page count entries are written in the following
  302. +     format:
  303. +             <pagecount><tab><host>:<user>
  304. +         e.g.
  305. +             37      trifid:ajf
  306. +    7.    SERIAL PRINTER ERROR MESSAGES AND CONTROL CHARACTER ECHOES
  307. +    
  308. +        The default printcap and psfprint.def files are set up assuming
  309. +        that a parallel printer is being used.  If a serial or ethernet
  310. +        printer is used, then some provisions must be made to allow
  311. +        the various filters to process the printer responses.  Parallel
  312. +        printers do not send responses back to the filters.
  313. +        
  314. +        For serial printers, the "rw" printcap allows the printer
  315. +        line to be opened for read/write and the "-a" option must
  316. +        be specified (in psfprint.def) to allow the filters to process
  317. +        the information generated by the printer.
  318. +        
  319. +     If this is done, the psf filters read (and flush) most control
  320. +     echoed characters (such as CTL/C and CTL/D). Any other printer
  321. +     messages are written to stderr (which is usually attached to an
  322. +     error logging file). If an accounting file is specified, psf
  323. +     reads the printer status dictionary to compute the number of
  324. +     pages printed. The results are written to the accounting file.
  325.   
  326. !    8.    PRINTING POSTSCRIPT SOURCE
  327.      
  328.       If Postscript code must be printed, filter the source manually
  329.       with psf - otherwise the psflpd will pass the code to the
  330.       printer for execution:
  331.   
  332. ***************
  333. *** 180,215 ****
  334.       the install process.  Usage:
  335.       
  336.           lpr -Ppost mycode.ps
  337.   
  338.   
  339. !    6.    MULTIPLE PRINTER SUPPORT
  340.   
  341.             If these filters are to control multiple different postscript
  342. !     printers on the same system, then separate editions of psflpd
  343. !     and friends should be compiled an placed in different directores:
  344. !     one for each different printer.  For example, if you have a
  345. !     Nec and and Apple postscript printer, place the binaries and
  346. !     psfprint.def files in a directory that reflects each printer:
  347. !     
  348. !         /usr/lib/lpdfilters/nec/*
  349. !        -and-
  350. !            /usr/lib/lpdfilters/apple/*
  351. !     Modify the Makefile to compile for each set of directories.
  352. !     
  353. !     Rename each version of psf (for interactive use) to an
  354. !     appropriate unique name (psfn and psfa). An alternative is ask
  355. !     the user to use the "-u alt.def" option of psf when selecting
  356. !     different printers.
  357. !     The Makefile allows you to change target directories and binary
  358. !     programme names. Be careful when you "make install" after
  359. !     major changes (use "make -n installbsd" to check things out).
  360.   
  361.   
  362. !     7.  HOW DOES A USER ACCESS THE APPROPRIATE PRINTER?
  363.      
  364.       Any of the printers defined in /etc/printcap may be selected
  365.       depending upon the desired page layout! General printing to the
  366.       default printer "lp" would be done with:
  367.   
  368. --- 228,269 ----
  369.       the install process.  Usage:
  370.       
  371.           lpr -Ppost mycode.ps
  372.   
  373.   
  374. !    9.    MULTIPLE PRINTER SUPPORT
  375.   
  376.             If these filters are to control multiple different postscript
  377. !     printers on the same system, entries for each printer and option
  378. !     combination must be placed in psfprint.def with appropriate
  379. !     link names.   The printer definition associated with the target
  380. !     printer is indicated with the -u option.  For example, if
  381. !     two different print layouts are desired for three different
  382. !     printers, something similar to the following might be
  383. !     appropriate:
  384. !     
  385. !         *psflpd 2upapple -2x -u apple.def
  386. !         *psflpd accapple -c132 -l60 -R2 -r6 -w -u apple.def
  387. !         *psflpd 2upnec -2x -u nec.def
  388. !         *psflpd accnec -c132 -l60 -R2 -r6 -w -u nec.def
  389. !         *psflpd 2uphp -2x -u hp.def
  390. !         *psflpd acchp -c132 -l60 -R2 -r6 -w -u hp.def
  391. !         
  392. !     Appropriate printer names in /etc/printcap must call the
  393. !     corresponding link as an if or of filter.
  394. !     
  395. !     Printer definitions for each different printer must be placed in
  396. !     the file name specified by the -u option.  Usually, they
  397. !     are placed in the same directory that contains psfprint.def.
  398. !     
  399. !     Since the normal installation process assumes that you have
  400. !     only one printer, you will have to manually locate the
  401. !     appropriate printer definitions in the ./defs directory
  402. !     and copy the file to the directory containing psfprint.def.
  403.   
  404.   
  405. !    10.  HOW DOES A USER ACCESS THE APPROPRIATE PRINTER?
  406.      
  407.       Any of the printers defined in /etc/printcap may be selected
  408.       depending upon the desired page layout! General printing to the
  409.       default printer "lp" would be done with:
  410.   
  411. ***************
  412. *** 247,257 ****
  413.       sending to the dos print server:
  414.   
  415.           psf -4xh source.c | lpr -Pdoslpr
  416.   
  417.   
  418. !     8.    PRINTING PROBLEMS
  419.      
  420.           The most common problem associated with lpd and postscript
  421.       printers is the lack of printed output: files appear to be
  422.       printing, however the printer times out and nothing is actually
  423.       printed. Generally, this is caused by an invalid set of
  424. --- 301,311 ----
  425.       sending to the dos print server:
  426.   
  427.           psf -4xh source.c | lpr -Pdoslpr
  428.   
  429.   
  430. !    11.    PRINTING PROBLEMS
  431.      
  432.           The most common problem associated with lpd and postscript
  433.       printers is the lack of printed output: files appear to be
  434.       printing, however the printer times out and nothing is actually
  435.       printed. Generally, this is caused by an invalid set of
  436. ***************
  437. *** 277,287 ****
  438.       Since it is difficult to properly process lpd-generated banner
  439.       pages, the recommended process is to suppress banner printing
  440.       with the :sh printcap.
  441.   
  442.   
  443. !     9.  EXAMPLE OF A PSFPRINT.DEF FILE FOR USE WITH LPD
  444.       
  445.       # options for links to psflpd.
  446.       #       link  options        comments
  447.       #       ----  ----------------  -----------------------------
  448.       *psflpd    p2up -2            # 2-up printing, default landscape
  449. --- 331,341 ----
  450.       Since it is difficult to properly process lpd-generated banner
  451.       pages, the recommended process is to suppress banner printing
  452.       with the :sh printcap.
  453.   
  454.   
  455. !    12.  EXAMPLE OF A PSFPRINT.DEF FILE FOR USE WITH LPD
  456.       
  457.       # options for links to psflpd.
  458.       #       link  options        comments
  459.       #       ----  ----------------  -----------------------------
  460.       *psflpd    p2up -2            # 2-up printing, default landscape
  461. ***************
  462. *** 290,300 ****
  463.       *psflpd psource -2xn        # source listings, 2-up, portrait
  464.       *psflpd post -z2xn        # postscript source listings, 2-up
  465.       *psflpd plegal -g legal        # standard print, legal paper
  466.       *psflpd pspread -g legal -p 8 -w # spreadsheets: legal,8pt,landscape
  467.       #
  468. !     # printer definition for psf and friends
  469.       #
  470.       *printer
  471.       Sample Postscript Printer
  472.       *paper 2
  473.       Letter
  474. --- 344,354 ----
  475.       *psflpd psource -2xn        # source listings, 2-up, portrait
  476.       *psflpd post -z2xn        # postscript source listings, 2-up
  477.       *psflpd plegal -g legal        # standard print, legal paper
  478.       *psflpd pspread -g legal -p 8 -w # spreadsheets: legal,8pt,landscape
  479.       #
  480. !     # default printer definition for psf and friends
  481.       #
  482.       *printer
  483.       Sample Postscript Printer
  484.       *paper 2
  485.       Letter
  486. ***************
  487. *** 303,312 ****
  488. --- 357,367 ----
  489.       Legal
  490.       statusdict begin legaltray end
  491.         612  1008    18    15   593   993
  492.       *order 1
  493.       Normal
  494. +     *duplex 0
  495.       *fonts 4
  496.       Courier
  497.       Helvetica
  498.       Times-Roman
  499.       ZapfChancery-MediumItalic
  500. *** net/Install.unix    Sun Apr 19 13:33:08 1992
  501. --- Install.unix    Tue Jun  2 02:19:01 1992
  502. ***************
  503. *** 144,154 ****
  504. --- 144,234 ----
  505.               different names, then different default page
  506.               conditions apply (see Install.lpd).
  507.       
  508.       Only the appropriate binary versions are copied with "make install".
  509.   
  510. +      CUSTOMIZATION
  511. +      ^^^^^^^^^^^^^
  512. +         The following scripts or control files might be candidates
  513. +         for modification if you do not like the default conditions.
  514. +         Each file has a "prototype" that is edited into a runnable
  515. +         file or script.
  516. +         
  517. +         prototype    install name    edit to change features
  518. +         -------------   --------------  ----------------------------------
  519. +         printcap.ETC    printcap    set up various printer options
  520. +         printcap.NET    not installed    set up various printer options
  521. +         language.PSF    not installed    add non-English language support
  522. +         psfdouble.SH    not installed    sample usage of doublesided print
  523. +         psflpd.DEF    psfprint.def    basic lpd filter options
  524. +         psfman.SH    psfman        change for 2up or 1up printing
  525. +         psfmbox.SH    psfmbox        change for 2up or 4up printing
  526. +         psfnroff.SH    psfnroff    change default man options (-Tlp??)
  527. +         psfunix.LP    psf.model    add accounting support
  528. +         psfxen.ix.LP    psf.model    add accounting support
  529.   
  530. +         
  531. +      ACCOUNTING (for lp/lpsched)
  532. +      ^^^^^^^^^^
  533. +         Paper usage accounting is not configured by default for
  534. +         lp/lpsched systems.  If this feature is desired, the printer
  535. +         script "psf.model" should be modified to include the
  536. +         options "-A account.fil", "-y user" and "-Y host" options.
  537. +         (Examine psf.model and modify to suit).  Also, see below
  538. +         for use with a serial printer.
  539. +      SERIAL PRINTER READ/WRITE ACCESS (for lp/lpsched)
  540. +      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  541. +     The default setup for psf used as a filter for the lp/lpsched
  542. +     spooler assumes that a parallel printer is being used.
  543. +     Serial (and possibly ethernet) postscript printers usually echo
  544. +     control characters and information messages to the filter. This
  545. +     is not possible on parallel port printers. If you are using a
  546. +     serial printer, these messages should be handled by the filter
  547. +     with the "-a" option in the printer script.
  548. +     If an accounting file is specified with "-A acct.fil",
  549. +     printer-generated page usage is written to the specified file.
  550. +     If the "-A" option is not provided, then page usage is ignored.
  551. +     All other "informative" text generated by the printer is written
  552. +     to stderr and may be redirected to an error log file.
  553. +     The sample printer model file "psf.model" does not handle any
  554. +     information generated by the printer (i.e. it assumes that a
  555. +     parallel printer is used). You may wish to add the options "-a",
  556. +     "-A acct.fil", "-y user" and "-Y host" to your printer model for
  557. +     serial/ethernet printers and redirect stderr to a log file.
  558. +     
  559. +     If a serial printer is used and accounting is not desired,
  560. +     the "-a" option should be used:  -A, -y and -Y are not needed.
  561. +     
  562. +     A sample setup is illustrated as a comment line in psfunix.LP
  563. +     and the generated "psf.model" printer script.
  564. +      PRINING TO A PIPE
  565. +      ^^^^^^^^^^^^^^^^^
  566. +        If the spooler should print to a pipe rather than stdout
  567. +        (such as printing to the "papif" daemon for apple network
  568. +        printing), the option "-O pipe-cmd" may be inserted into
  569. +        the link options:
  570. +        
  571. +            -O "nextfilter -a -b -c 'text string' -d"
  572. +     Rather than passing the filtered output to stdout, the output is
  573. +     piped to "nextfilter" which may process to a foreigh network
  574. +     printing. Often, an alternate printer file is specified (-u =
  575. +     apple.def) to define the printer configuration for the foreign
  576. +     printer.
  577. +     
  578. +     If the spooler is lp/lpsched, this option could be
  579. +     added to the printer script.  If the spooler is lpr/lpd,
  580. +     read Install.lpd for further notes.
  581.        CONFIGURE PRINTER (for lp/lpsched on SysV R3)
  582.        ^^^^^^^^^^^^^^^^^
  583.       The printer model defined for psf is copied during the install
  584.       process to:
  585.   
  586. ***************
  587. *** 226,236 ****
  588.   
  589.       Copy the new psfprint.def file to it's target location as
  590.       set with "DEFFILE" in the Makefile.
  591.   
  592.        2.    Edit the file "Testfile" with sed (as below). This file is an
  593. !     example of how escape seqeuences can be imbedded in a text file
  594.       to allow direct font control within a text editor (See psf.1 for
  595.       details).
  596.   
  597.       The "Testfile" should contain many ^E characters (octal \005).
  598.       Since mail system may change the ^E character into the text
  599. --- 306,316 ----
  600.   
  601.       Copy the new psfprint.def file to it's target location as
  602.       set with "DEFFILE" in the Makefile.
  603.   
  604.        2.    Edit the file "Testfile" with sed (as below). This file is an
  605. !     example of how escape sequences can be imbedded in a text file
  606.       to allow direct font control within a text editor (See psf.1 for
  607.       details).
  608.   
  609.       The "Testfile" should contain many ^E characters (octal \005).
  610.       Since mail system may change the ^E character into the text
  611. ***************
  612. *** 240,250 ****
  613.       One easy way to correct this is with sed (Bourne shell only??)
  614.   
  615.           sed 's@005@<CTRL-E>@g' Testfile > example
  616.                  +------+
  617.                   actually type the CTRL-E character
  618. !                 to generate the octal charcter \005
  619.   
  620.       After editing, do the following:
  621.   
  622.           psf example | lp
  623.       
  624. --- 320,330 ----
  625.       One easy way to correct this is with sed (Bourne shell only??)
  626.   
  627.           sed 's@005@<CTRL-E>@g' Testfile > example
  628.                  +------+
  629.                   actually type the CTRL-E character
  630. !                 to generate the octal character \005
  631.   
  632.       After editing, do the following:
  633.   
  634.           psf example | lp
  635.       
  636. ***************
  637. *** 304,317 ****
  638.       should be used. In any case, each back end printer script used
  639.       by lpsched, psnroff or psmbox must reference the appropriate
  640.       version of psf or have the -u option set.
  641.   
  642.       See Install.lpd for considerations when using lpr/lpd.
  643. -     Some provisions are in the Makefile to allow changes to the
  644. -     target directories or the use of different binary programme
  645. -     names.
  646.   
  647.        PSF notes.
  648.        ^^^^^^^^^^ 
  649.       The printer definitions in defs/* are derived from the Adobe
  650.       ".ppd" files. These are available from the Adobe file server via
  651. --- 384,393 ----
  652. *** net/Makefile    Sun Apr 19 13:33:26 1992
  653. --- Makefile    Tue Jun  2 09:02:11 1992
  654. ***************
  655. *** 1,6 ****
  656. - # $Id: Makefile.dis,v 3.3 1992/02/07 15:10:57 ajf Exp ajf $
  657.   #
  658.   #    Make the psf v3 postscript filter system
  659.   #    ----------------------------------------
  660.   
  661.   #    display all "make" options with:
  662. --- 1,5 ----
  663. ***************
  664. *** 10,20 ****
  665.   #        make help
  666.   
  667.   SHELL = /bin/sh
  668.   
  669.   # - - - - Begin configuration - - - - -
  670. ! #
  671.   # set compiler, tar and nroff names
  672.   
  673.   CC=cc
  674.   # CC = gcc
  675.   # CC=lpicc -sys -xid
  676. --- 9,24 ----
  677.   #        make help
  678.   
  679.   SHELL = /bin/sh
  680.   
  681.   # - - - - Begin configuration - - - - -
  682. ! # peculiar systems setup.
  683. ! # set OS=-DISC22    to get around include file problems with pid_t
  684. ! #                   with Interactive Unix 2.2:  not needed if gcc is used.
  685. ! # OS=-DISC22
  686.   # set compiler, tar and nroff names
  687.   
  688.   CC=cc
  689.   # CC = gcc
  690.   # CC=lpicc -sys -xid
  691. ***************
  692. *** 35,46 ****
  693.   # suffix for man pages
  694.   MANSUF=l
  695.   # MANSUF=1
  696.   
  697.   # If catman/formatted pages should be filtered with col
  698. ! # COL=
  699. ! COL=| col -b 
  700.   
  701.   # user print interface
  702.   UPRINT =lpr
  703.   # UPRINT =lp
  704.   
  705. --- 39,50 ----
  706.   # suffix for man pages
  707.   MANSUF=l
  708.   # MANSUF=1
  709.   
  710.   # If catman/formatted pages should be filtered with col
  711. ! COL=
  712. ! # COL=| col -b 
  713.   
  714.   # user print interface
  715.   UPRINT =lpr
  716.   # UPRINT =lp
  717.   
  718. ***************
  719. *** 55,67 ****
  720. --- 59,84 ----
  721.   # Location of printer definition file   (for lpr/lpd or lp/lpsched)
  722.   DEFFILE=/usr/local/lib/psf/psfprint.def
  723.   # DEFFILE=/local/lib/psf/psfprint.def
  724.   # DEFFILE=/usr/spool/lp/model/psfprint.def
  725.   
  726. + # A CTL/D is sent to the printer at the end of every print job if psf
  727. + # is used as a spooler filter.  The "psf" binary does not generate
  728. + # a ctl/d if it is used in shell scripts or at the shell prompt.
  729. + # Enable CTLDALWAYS if the CTL/D must be generated in all cases.
  730. + CTLD=
  731. + # CTLD=-DCTLDALWAYS
  732.   # Set the default paper type  (letter, legal, a4, b5, etc.)
  733.   PSPTYPE = letter
  734.   
  735. + # By default, psf uses standard character set encoding and
  736. + # allows ISO Latin1 encoding with the -I option.  If ISO Latin1
  737. + # encoding is desired as the default, set ISOLATIN=-DISO
  738. + ISOLATIN=
  739. + # ISOLATIN=-DISO
  740.   # Psf assumes that the default paper tray is enabled by default
  741.   # in the printer.  If the default paper tray cannot be set as defined
  742.   # in PSTYPE above, or to always force tray selection, activate the following:
  743.   # FORCETYPE=-DFORCETYPE
  744.   
  745. ***************
  746. *** 70,80 ****
  747.   TRAYS=
  748.   # TRAYS=-DHOPPER
  749.   
  750.   # compile and library options
  751.   LDFLAGS = -lm
  752. ! CFLAGS = -O $(NAMES) $(PAPTYPE) $(TRAYS) $(FORCETYPE) -DBINDIR=\"$(BINDIR)\" -DPDEF=\"$(DEFFILE)\" 
  753.   
  754.   # extra things for SysV or Xenix with lp/lpsched
  755.   MODEL=/usr/spool/lp/model
  756.   
  757.   # if getopt isn't a standard part of your system
  758. --- 87,97 ----
  759.   TRAYS=
  760.   # TRAYS=-DHOPPER
  761.   
  762.   # compile and library options
  763.   LDFLAGS = -lm
  764. ! CFLAGS = -O $(NAMES) $(PAPTYPE) $(TRAYS) $(FORCETYPE) -DBINDIR=\"$(BINDIR)\" -DPDEF=\"$(DEFFILE)\"  $(CTLD) $(OS) $(ISOLATIN)
  765.   
  766.   # extra things for SysV or Xenix with lp/lpsched
  767.   MODEL=/usr/spool/lp/model
  768.   
  769.   # if getopt isn't a standard part of your system
  770. ***************
  771. *** 87,98 ****
  772.   PSFDOUB = psfdoub
  773.   PSFBANNER = psfbanner
  774.   PSFFILTER = psffilter
  775.   PSFLPD = psflpd
  776.   
  777. ! RCSVER = 3.3
  778. ! RCSCOM="psf3, patch 3"
  779.   
  780.   # - - - - - end configuration - - - - - - - -
  781.   #           ^^^^^^^^^^^^^^^^^
  782.   
  783.   # psf uses NAMES to find the current name of psfdoub
  784. --- 104,115 ----
  785.   PSFDOUB = psfdoub
  786.   PSFBANNER = psfbanner
  787.   PSFFILTER = psffilter
  788.   PSFLPD = psflpd
  789.   
  790. ! RCSVER = 3.5
  791. ! RCSCOM="psf3, patch 5"
  792.   
  793.   # - - - - - end configuration - - - - - - - -
  794.   #           ^^^^^^^^^^^^^^^^^
  795.   
  796.   # psf uses NAMES to find the current name of psfdoub
  797. ***************
  798. *** 157,176 ****
  799.   
  800.   # Compile all sources
  801.   # ^^^^^^^
  802.   all:    $(BINARIES) $(LPBIN) $(LPDBIN) $(SUPPORT) getsizes.ps
  803.   
  804. ! $(PSF):    psf.c psf.h ctp.h $(GETOPT)
  805.       $(CC) $(CFLAGS) psf.c $(GETOPT) -o $(PSF) $(LDFLAGS)
  806.   
  807.   $(PSFDOUB):    psfdoub.c psf.h $(GETOPT)
  808.       $(CC) $(CFLAGS) psfdoub.c $(GETOPT) -o $(PSFDOUB) $(LDFLAGS)
  809.   
  810. ! $(PSFFILTER):    psf.c psf.h $(GETOPT) ctp.h
  811.       $(CC) $(CFLAGS) -DPSFFILTER psf.c $(GETOPT) -o $(PSFFILTER) $(LDFLAGS)
  812.   
  813. ! $(PSFLPD):    psf.c $(GETOPT) ctp.h psf.h
  814.       $(CC) $(CFLAGS) -DFORLPD -DPSFFILTER $(GETOPT) psf.c -o $(PSFLPD) $(LDFLAGS)
  815.   
  816.   $(PSFBANNER):    psfbanner.c psf.h ctp.h $(GETOPT)
  817.       $(CC) $(CFLAGS) psfbanner.c $(GETOPT) -o $(PSFBANNER) $(LDFLAGS)
  818.   
  819. --- 174,193 ----
  820.   
  821.   # Compile all sources
  822.   # ^^^^^^^
  823.   all:    $(BINARIES) $(LPBIN) $(LPDBIN) $(SUPPORT) getsizes.ps
  824.   
  825. ! $(PSF):    psf.c psf.h ctp.h $(GETOPT) psfproto.h
  826.       $(CC) $(CFLAGS) psf.c $(GETOPT) -o $(PSF) $(LDFLAGS)
  827.   
  828.   $(PSFDOUB):    psfdoub.c psf.h $(GETOPT)
  829.       $(CC) $(CFLAGS) psfdoub.c $(GETOPT) -o $(PSFDOUB) $(LDFLAGS)
  830.   
  831. ! $(PSFFILTER):    psf.c psf.h $(GETOPT) ctp.h psfproto.h
  832.       $(CC) $(CFLAGS) -DPSFFILTER psf.c $(GETOPT) -o $(PSFFILTER) $(LDFLAGS)
  833.   
  834. ! $(PSFLPD):    psf.c $(GETOPT) ctp.h psf.h psfproto.h
  835.       $(CC) $(CFLAGS) -DFORLPD -DPSFFILTER $(GETOPT) psf.c -o $(PSFLPD) $(LDFLAGS)
  836.   
  837.   $(PSFBANNER):    psfbanner.c psf.h ctp.h $(GETOPT)
  838.       $(CC) $(CFLAGS) psfbanner.c $(GETOPT) -o $(PSFBANNER) $(LDFLAGS)
  839.   
  840. ***************
  841. *** 320,330 ****
  842.   # ^^^^^^^^^^^^^^^^^^^^^^^
  843.   tar:
  844.       $(TAR) cvf /tmp/psf.tar $(SOURCES) man $(OTHERS) defs Makefile.dis Makefile.ajf patchlevel.h
  845.   
  846.   shar:
  847. !     makekit -m -s59k defs man man/*.1 man/*.doc man/Makefile defs/* $(SOURCES) $(OTHERS) patchlevel.h
  848.   
  849.   dostar:
  850.       $(TAR) cvf /tmp/psfdos.tar $(DOSSRC) $(DOSMAN) $(DOSDOC) $(DOSOTHER) defs
  851.   
  852.   
  853. --- 337,350 ----
  854.   # ^^^^^^^^^^^^^^^^^^^^^^^
  855.   tar:
  856.       $(TAR) cvf /tmp/psf.tar $(SOURCES) man $(OTHERS) defs Makefile.dis Makefile.ajf patchlevel.h
  857.   
  858.   shar:
  859. !     makekit -m -s60k defs man man/*.1 man/*.doc man/Makefile defs/* $(SOURCES) $(OTHERS) patchlevel.h
  860. ! tardis:
  861. !     $(TAR) cvf /tmp/psf.tar man/*.1 man/*.doc man/Makefile defs/*.def $(SOURCES) $(OTHERS) patchlevel.h
  862.   
  863.   dostar:
  864.       $(TAR) cvf /tmp/psfdos.tar $(DOSSRC) $(DOSMAN) $(DOSDOC) $(DOSOTHER) defs
  865.   
  866.   
  867. ***************
  868. *** 337,347 ****
  869.   # RCS checkin and out
  870.   # ^^^^^^^^^^^^^^^^^^^
  871.   
  872.   ci:
  873.       ci -r$(RCSVER) patchlevel.h
  874. !     ci -r$(RCSVER) -m$(RCSCOM) $(SOURCES) $(OTHERS) Makefile.dis Makefile.ajf lines.c
  875.   
  876.   ciman:
  877.       cd man ; make ci RCSVER=$(RCSVER) RCSCOM=$(RCSCOM)
  878.       
  879.   
  880. --- 357,367 ----
  881.   # RCS checkin and out
  882.   # ^^^^^^^^^^^^^^^^^^^
  883.   
  884.   ci:
  885.       ci -r$(RCSVER) patchlevel.h
  886. !     ci -r$(RCSVER) -m$(RCSCOM) $(SOURCES) $(OTHERS) lines.c Makefile.dis Makefile.ajf
  887.   
  888.   ciman:
  889.       cd man ; make ci RCSVER=$(RCSVER) RCSCOM=$(RCSCOM)
  890.       
  891.   
  892. *** net/Makefile.dos    Sun Apr 19 13:33:13 1992
  893. --- Makefile.dos    Tue Jun  2 02:19:08 1992
  894. ***************
  895. *** 21,32 ****
  896.   # Loation of psfprint.def:
  897.   # ^^^^^^^^^^^^^^^^^^^^^^^
  898.   DEFFILE=c:/lib/psfprint.def
  899.   XCOPYDEF=c:\lib\
  900.   
  901.   
  902. ! CFLAGS =-DBINDIR=\"$(BINDIR)\" -DPDEF=\"$(DEFFILE)\"
  903.   
  904.   all:    psf.exe psfdoub.exe selectde.exe psfbs.exe
  905.   
  906.   psf.obj:    psf.h psf.c ctp.h
  907.   psf.exe:    psf.obj getopt.obj
  908. --- 21,36 ----
  909.   # Loation of psfprint.def:
  910.   # ^^^^^^^^^^^^^^^^^^^^^^^
  911.   DEFFILE=c:/lib/psfprint.def
  912.   XCOPYDEF=c:\lib\
  913.   
  914. + # Enable CTLDALWAYS if the CTL/D must be generated at the end of a print job.
  915. + CTLD=-DCTLDALWAYS
  916. + CTLD=
  917.   
  918. ! CFLAGS =-DBINDIR=\"$(BINDIR)\" -DPDEF=\"$(DEFFILE)\" $(CTLD)
  919.   
  920.   all:    psf.exe psfdoub.exe selectde.exe psfbs.exe
  921.   
  922.   psf.obj:    psf.h psf.c ctp.h
  923.   psf.exe:    psf.obj getopt.obj
  924. *** net/README    Sun Apr 19 13:33:14 1992
  925. --- README    Tue Jun  2 02:18:59 1992
  926. ***************
  927. *** 11,22 ****
  928. --- 11,26 ----
  929.           o  double sided printing
  930.           o  pages scaled by row and column count
  931.           o  lp banner page printing
  932.           o  reverse order printing
  933.           o  languages other than English
  934. +         o  optional ISO Latin1 character encoding
  935.           o  left, right, top, bottom margin sizes
  936.           o  line clipping or left/right justified line wrap
  937. +         o  page usage accounting
  938. +         o  printing to a pipe for multiple filtering in a spooler
  939. +            or for printing to an Apple network printer (via papif?)
  940.   
  941.      If the printer normally stacks output paper "face up", psf
  942.      automatically reverses the order of the printed pages to ensure
  943.      manual reordering is not needed.
  944.   
  945. ***************
  946. *** 45,55 ****
  947.      and BSD-type systems using lpr/lpd are described in Install.unix.
  948.      Installation for SysV r4 may different: you will have to adapt
  949.      the installation process for such systems.
  950.     
  951.       Install.unix    installation guide
  952. !     Install.lpd    additonal information for use with lpr/lpd
  953.       Install.def    how to create a printer definition for a
  954.               printer not know to psf.
  955.       Install.dos    installation notes for MSDOS
  956.   
  957.      Installed binaries and scripts should give usage help information
  958. --- 49,59 ----
  959.      and BSD-type systems using lpr/lpd are described in Install.unix.
  960.      Installation for SysV r4 may different: you will have to adapt
  961.      the installation process for such systems.
  962.     
  963.       Install.unix    installation guide
  964. !     Install.lpd    additional information for use with lpr/lpd
  965.       Install.def    how to create a printer definition for a
  966.               printer not know to psf.
  967.       Install.dos    installation notes for MSDOS
  968.   
  969.      Installed binaries and scripts should give usage help information
  970. ***************
  971. *** 85,101 ****
  972.      If the left or right ends of lines, the top of the first line, or the
  973.      bottom of the last line on a page are clipped, then try:
  974.   
  975.              psf -M1,1,1,1,c this.file | lp
  976.   
  977.   EUROPEAN LANGUAGES and PAPER SIZES
  978.   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  979. !    Rudimentary provision have been made for languages other than
  980. !    English. An example Scandinavian font setup is provided in file
  981. !    "language.PSF". This is NOT a working example: it must be modified
  982. !    for real use.  Any feedback and/or suggestions for modifications
  983. !    regarding the use of non-English languages would be appreciated.
  984.   
  985.      Documentation for this feature is minimal: some postscript knowledge
  986.      is assumed! Refer to the Blue Book, Postscript Language Tutorial and
  987.      Cookbook, page 111 (Program 18, Making small changes to encoding
  988.      vectors). If Interactive Unix is used (and probably AT&T SysV 3.2),
  989. --- 89,122 ----
  990.      If the left or right ends of lines, the top of the first line, or the
  991.      bottom of the last line on a page are clipped, then try:
  992.   
  993.              psf -M1,1,1,1,c this.file | lp
  994.   
  995. + CTL/D PROCESSING
  996. + ^^^^^^^^^^^^^^^^
  997. +    By default, the psf system does not generate a ctl/d at the end
  998. +    of a print job if psf is used from the command line or within
  999. +    a shell script.  A ctl/d is generated by psffilter (for lpsched)
  1000. +    or by psflpd (for lpd) spooler usage.
  1001. +    
  1002. +    If psf should generate a ctl/d in all cases, this may be set up
  1003. +    in the Makefile.
  1004.   EUROPEAN LANGUAGES and PAPER SIZES
  1005.   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1006. !    ISO Latin1 font encoding is be invoked automatically by
  1007. !    use of the -I option.  Alternatively, the ISO Latin1 encoding
  1008. !    may be set as a compile-time option in the Makefile.  This
  1009. !    feature may not be honoured by all (possibly old) postscript
  1010. !    printers.
  1011. !    If ISO Latin1 encoding is insufficient, complete control over
  1012. !    character encoding is provided in an external file. An example
  1013. !    Scandinavian font setup is provided in file "language.PSF". This is
  1014. !    NOT a working example: it must be modified for real use. Any feedback
  1015. !    and/or suggestions for modifications regarding the use of non-English
  1016. !    languages would be appreciated.
  1017.   
  1018.      Documentation for this feature is minimal: some postscript knowledge
  1019.      is assumed! Refer to the Blue Book, Postscript Language Tutorial and
  1020.      Cookbook, page 111 (Program 18, Making small changes to encoding
  1021.      vectors). If Interactive Unix is used (and probably AT&T SysV 3.2),
  1022. ***************
  1023. *** 143,153 ****
  1024.   ^^^^^^^^^^^^^^^^^^^^^
  1025.      DOUBLE SIDED PRINTING IS NOT RECOMMEDED UNLESS THE PRINTER
  1026.      IS SPECIFICALLY DESIGNED FOR TO ALLOW DOUBLE SIDE PRINTING.
  1027.   
  1028.      Double sided printing is more convenient on printers with two paper
  1029. !    trays. If two paper trays are avaliable, then psf could be compiled
  1030.      with "-DHOPPER" (see the Makefile).  Double sided printing may be
  1031.      done as part of the lp spooler system by passing the "-d" option. Psf
  1032.      internally calls psfdoub to print double sided. This assumes that the
  1033.      printer has at least two paper hoppers.
  1034.   
  1035. --- 164,174 ----
  1036.   ^^^^^^^^^^^^^^^^^^^^^
  1037.      DOUBLE SIDED PRINTING IS NOT RECOMMEDED UNLESS THE PRINTER
  1038.      IS SPECIFICALLY DESIGNED FOR TO ALLOW DOUBLE SIDE PRINTING.
  1039.   
  1040.      Double sided printing is more convenient on printers with two paper
  1041. !    trays. If two paper trays are available, then psf could be compiled
  1042.      with "-DHOPPER" (see the Makefile).  Double sided printing may be
  1043.      done as part of the lp spooler system by passing the "-d" option. Psf
  1044.      internally calls psfdoub to print double sided. This assumes that the
  1045.      printer has at least two paper hoppers.
  1046.   
  1047. ***************
  1048. *** 158,166 ****
  1049. --- 179,205 ----
  1050.      If psf was not compiled with "-DHOPPER", then double sided printing
  1051.      is done as described in psfdoub.1.  
  1052.      
  1053.      This feature should not be used unless the paper tray is essentially
  1054.      reserved for double sided printing.
  1055. + CREDITS
  1056. + ^^^^^^^
  1057. +    The spooler code to read printer-generated responses and echoes from
  1058. +    the printer was developed  by  Paul Eggert's (eggert@winsun.com).
  1059. +    The ISO Latin1 Encoding postscript code was developed by Magnus Hammerin 
  1060. +    and modified for usage with psf by Leif Hedstrom (leif@ifm.liu.se)
  1061. + FTP
  1062. + ^^^
  1063. +    The current version of psf may be obtained by ftp from the
  1064. +    University of Calgary:
  1065. +    
  1066. +     host:      fsa.cpsc.ucalgary.ca, cpsc.ucalgary.ca or 136.159.2.1
  1067. +     login:     anonymous
  1068. +     password:  is your mail address, by convention
  1069. +     files:     pub/psf/psf3.3.tar.Z
  1070.   
  1071.    ------------------------------------------
  1072.      Tony Field: tony@ajfcal.cuc.ab.ca
  1073.   
  1074. *** net/language.PSF    Sun Apr 19 13:33:27 1992
  1075. --- language.PSF    Tue Jun  2 02:19:11 1992
  1076. ***************
  1077. *** 1,8 ****
  1078.   %%PsfStart
  1079.   
  1080. ! $Id: language.PSF,v 3.3 1992/02/07 15:10:57 ajf Exp ajf $
  1081.   
  1082.       WARNING: This file must be edited to cause valid selection
  1083.       =======     of postscript characters for non-English languages.
  1084.            The sample "Scandinavian" translation table is
  1085.            used for testing purposes only and will not generate
  1086. --- 1,8 ----
  1087.   %%PsfStart
  1088.   
  1089. ! $Id: language.PSF,v 3.5 1992/06/02 08:16:01 ajf Exp ajf $
  1090.   
  1091.       WARNING: This file must be edited to cause valid selection
  1092.       =======     of postscript characters for non-English languages.
  1093.            The sample "Scandinavian" translation table is
  1094.            used for testing purposes only and will not generate
  1095. ***************
  1096. *** 18,51 ****
  1097.           cat psfprint.old.def language.PSF > psfprint.def
  1098.       
  1099.       The comments may remain in the final file, or may be removed as
  1100.       desired - they are ignored by psf and friends.
  1101.   
  1102. -     To set this code up for a different language, edit the lines
  1103. -     prefixed with "%%font" and "%%translate". Then modify the
  1104. -     section of postscript code following "ENCODE".
  1105.       The first section of the code must start with "%%PsfStart" and
  1106.       terminate with %%PsfEnd. The information within this section
  1107. !     contains new font defintion and character translation tables.
  1108.       This section may be empty, however the "%%PsfStart" and
  1109.       "%%PsfEnd" lines must exist.
  1110.   
  1111. -     This section is setup information processed by psf and psfbanner.
  1112.       Any postscript code following the "%%PsfEnd" marker is copied to
  1113. !     the printer as part of the postscript prologue.
  1114.   
  1115.       The key words %%PsfStart, %%fontX %%translate %%copy %%PsfEnd
  1116.       must start in the first column of this file.
  1117.   
  1118. !     ((( It might be possible to adapt this file to re-encode an
  1119. !     entire font for a different character set such as EBCDIC. Refer
  1120. !     to Adobe's Blue Book program #17 for hints on how this might be
  1121. !     accomplished. Entries for %%fontX would be needed, %%translate
  1122. !     would not be needed, and the postscript code after %%PsfEnd
  1123. !     would have to be replaced. )))
  1124.       --------------------------------------------------------------
  1125.   
  1126.       Set up new language font names. Fonts in psf are numbered
  1127.       as 0..9, a..z. The "%%fontX" numbers (where 'X' represents the
  1128.       font number used by psf) reflect the font to be updated or
  1129. --- 18,59 ----
  1130.           cat psfprint.old.def language.PSF > psfprint.def
  1131.       
  1132.       The comments may remain in the final file, or may be removed as
  1133.       desired - they are ignored by psf and friends.
  1134.   
  1135.       The first section of the code must start with "%%PsfStart" and
  1136.       terminate with %%PsfEnd. The information within this section
  1137. !     contains new font defintion and character translation tables
  1138. !     used by psf for internal processing.
  1139. !     
  1140.       This section may be empty, however the "%%PsfStart" and
  1141.       "%%PsfEnd" lines must exist.
  1142.   
  1143.       Any postscript code following the "%%PsfEnd" marker is copied to
  1144. !     the printer as part of the postscript prologue.  The actual
  1145. !     font reencoding is performed in this section.
  1146.   
  1147.       The key words %%PsfStart, %%fontX %%translate %%copy %%PsfEnd
  1148.       must start in the first column of this file.
  1149.   
  1150. !     --------------------------------------------------------------
  1151. !     The steps to reencode a font are:
  1152. !     
  1153. !         1. Create a new set of font names which will become
  1154. !            the names of the reencoded fonts.  This is set up
  1155. !            in the "%%fonX" lines below.
  1156. !         
  1157. !         2. If any character translation form ascii to printer
  1158. !            characters is needed, the translation is provided
  1159. !            in "%%translate" lines below.
  1160. !         
  1161. !         3. The actual print characters to be selected are
  1162. !            set up in the "languagevec".
  1163. !         
  1164. !         4. The "ENCODE" postscript code must be set up to
  1165. !            perform the font reencoding.
  1166.       --------------------------------------------------------------
  1167.   
  1168.       Set up new language font names. Fonts in psf are numbered
  1169.       as 0..9, a..z. The "%%fontX" numbers (where 'X' represents the
  1170.       font number used by psf) reflect the font to be updated or
  1171. *** net/patchlevel.h    Sun Apr 19 13:33:27 1992
  1172. --- patchlevel.h    Tue Jun  2 02:19:22 1992
  1173. ***************
  1174. *** 1,8 ****
  1175. ! /* $Id: patchlevel.h,v 3.3 1992/02/07 15:07:04 ajf Exp ajf $
  1176.    *
  1177.    * $Log: patchlevel.h,v $
  1178.    * Revision 3.3  1992/02/07  15:07:04  ajf
  1179.    * patch 3:
  1180.    *    1. add -e -E -M options for wrap and margins
  1181.    *    2. -i -m are physical page offsets
  1182.    *    3. fixup scaling with pointsize settings
  1183. --- 1,22 ----
  1184. ! /* $Id: patchlevel.h,v 3.5 1992/06/02 08:15:01 ajf Exp ajf $
  1185.    *
  1186.    * $Log: patchlevel.h,v $
  1187. +  * Revision 3.5  1992/06/02  08:15:01  ajf
  1188. +  * Patch 5:
  1189. +  *    1. allow printing to a pipe (apple network printer??)
  1190. +  *    2. fix problem with first line loss if language file used
  1191. +  *
  1192. +  * Revision 3.4  1992/02/24  06:40:55  ajf
  1193. +  * Patch 4:
  1194. +  *    1. force paper tray selection (makefile + user option) added
  1195. +  *    2. ctl/d is compile time option
  1196. +  *    3. fix problems with def file generation
  1197. +  *    4. allow psf to read printer device for responses
  1198. +  *    5. paper usage logged to accounting file
  1199. +  *    6. new options -a -A -y -Y
  1200. +  *
  1201.    * Revision 3.3  1992/02/07  15:07:04  ajf
  1202.    * patch 3:
  1203.    *    1. add -e -E -M options for wrap and margins
  1204.    *    2. -i -m are physical page offsets
  1205.    *    3. fixup scaling with pointsize settings
  1206. ***************
  1207. *** 17,22 ****
  1208.    *    3. correct problem with psfbs and underscore order.
  1209.    *    4. remove support for modified lpr/lpd
  1210.    *
  1211.   */
  1212.   
  1213. ! #define PATCHLEVEL 3
  1214. --- 31,36 ----
  1215.    *    3. correct problem with psfbs and underscore order.
  1216.    *    4. remove support for modified lpr/lpd
  1217.    *
  1218.   */
  1219.   
  1220. ! #define PATCHLEVEL 5
  1221. *** net/printcap.ETC    Sun Apr 19 13:32:03 1992
  1222. --- printcap.ETC    Tue Jun  2 02:19:09 1992
  1223. ***************
  1224. *** 35,39 ****
  1225. --- 35,49 ----
  1226.       :lf=/usr/adm/lpd-errs:sh:if=LPDFILTERS/plegal
  1227.   
  1228.   sheet|large spreadsheets, legal paper:\
  1229.       :lp=/dev/lp:sd=/usr/spool/lpd/lp:sf:\
  1230.       :lf=/usr/adm/lpd-errs:sh:if=LPDFILTERS/pspread
  1231. + # sample serial printer using Interactive Unix 3.2 lpr/lpd
  1232. + # with printcaps "rw" for read/write on stdout and "af"
  1233. + # for accounting information
  1234. + # serial|standard serial postscript printer:\
  1235. + #    :lp=/dev/cui1c:sd=/usr/spool/lpd/lp:sf:\
  1236. + #    :tt=B19200+CS7+PARENB+IXON+IXOFF+CREAD+CLOCAL\
  1237. + #    :af=/usr/adm/lpd-acct:sh:rw:\
  1238. + #    :lf=/usr/adm/lpd-errs:sh:if=LPDFILTERS/serial
  1239. *** net/psfbanner.c    Sun Apr 19 13:32:29 1992
  1240. --- psfbanner.c    Tue Jun  2 02:18:48 1992
  1241. ***************
  1242. *** 8,18 ****
  1243.   *                                                                            *
  1244.   *    Tony Field.       tony@ajfcal.cuc.ab.ca                                    *
  1245.   ****************************************************************************/
  1246.   
  1247.   /*
  1248. !  * $Id: psfbanner.c,v 3.2 1992/01/19 05:50:33 ajf Exp ajf $
  1249.    *
  1250.   */
  1251.   
  1252.   #include <stdio.h>
  1253.   #include <string.h>
  1254. --- 8,18 ----
  1255.   *                                                                            *
  1256.   *    Tony Field.       tony@ajfcal.cuc.ab.ca                                    *
  1257.   ****************************************************************************/
  1258.   
  1259.   /*
  1260. !  * $Id: psfbanner.c,v 3.4 1992/02/24 06:48:59 ajf Exp ajf $
  1261.    *
  1262.   */
  1263.   
  1264.   #include <stdio.h>
  1265.   #include <string.h>
  1266. ***************
  1267. *** 213,223 ****
  1268.           switch (c)
  1269.           {
  1270.           case 'b':
  1271.               if ((set_paper_bin = atoi (argv[i+1])) > nslots)
  1272.               {    fprintf (stderr, "paper bin greater than %d\n", nslots);
  1273. !                 exit (1);
  1274.               }
  1275.               i++;
  1276.               break;
  1277.   
  1278.           case 'g':
  1279. --- 213,223 ----
  1280.           switch (c)
  1281.           {
  1282.           case 'b':
  1283.               if ((set_paper_bin = atoi (argv[i+1])) > nslots)
  1284.               {    fprintf (stderr, "paper bin greater than %d\n", nslots);
  1285. !                 exit (DISCARD_JOB);
  1286.               }
  1287.               i++;
  1288.               break;
  1289.   
  1290.           case 'g':
  1291. ***************
  1292. *** 228,238 ****
  1293.                       break;
  1294.                   }
  1295.               }
  1296.               if (page_types[set_paper_tray].paper_name[0] == '\0')
  1297.               {    fprintf (stderr, "Invalid paper size\n");
  1298. !                 exit (1);
  1299.               }
  1300.               i++;
  1301.               break;
  1302.   
  1303.           case 'u':            /* already processed */
  1304. --- 228,238 ----
  1305.                       break;
  1306.                   }
  1307.               }
  1308.               if (page_types[set_paper_tray].paper_name[0] == '\0')
  1309.               {    fprintf (stderr, "Invalid paper size\n");
  1310. !                 exit (DISCARD_JOB);
  1311.               }
  1312.               i++;
  1313.               break;
  1314.   
  1315.           case 'u':            /* already processed */
  1316. ***************
  1317. *** 343,353 ****
  1318.       sendnormal ("Machine:    ");
  1319.       sendbold (Machineid);
  1320.   
  1321.       send ("showpage pg restore\n");
  1322.       send ("%%Trailer\n");    
  1323. !     exit (0);
  1324.   }
  1325.   
  1326.   
  1327.   /****************************************************************************
  1328.   *    send font selection information and text.                                *
  1329. --- 343,353 ----
  1330.       sendnormal ("Machine:    ");
  1331.       sendbold (Machineid);
  1332.   
  1333.       send ("showpage pg restore\n");
  1334.       send ("%%Trailer\n");    
  1335. !     exit (JOB_IS_DONE);
  1336.   }
  1337.   
  1338.   
  1339.   /****************************************************************************
  1340.   *    send font selection information and text.                                *
  1341. ***************
  1342. *** 400,410 ****
  1343.   ****************************************************************************/
  1344.   
  1345.   bad_file()
  1346.   {
  1347.       fprintf (stderr, "Bad %s file\n", defref);
  1348. !     exit (1);
  1349.   }
  1350.   
  1351.   /****************************************************************************
  1352.   *    compare ()                                                                *
  1353.   *    partial compare of two strings.                                            *
  1354. --- 400,410 ----
  1355.   ****************************************************************************/
  1356.   
  1357.   bad_file()
  1358.   {
  1359.       fprintf (stderr, "Bad %s file\n", defref);
  1360. !     exit (DISCARD_JOB);
  1361.   }
  1362.   
  1363.   /****************************************************************************
  1364.   *    compare ()                                                                *
  1365.   *    partial compare of two strings.                                            *
  1366. ***************
  1367. *** 527,533 ****
  1368.       fprintf (stderr, "                   Machineid Title [-b n] [-g size] [-u f.def]\n");
  1369.       fprintf (stderr, "        where:   Userid, Name, etc are passed by lpsched\n");
  1370.       fprintf (stderr, "                 -b n    = select paper bin n\n");
  1371.       fprintf (stderr, "                 -g size = select paper size (letter, b5, etc)\n");
  1372.       fprintf (stderr, "                -u f.def = use this printer definition file\n");    
  1373. !     exit (1);
  1374.   }        
  1375. --- 527,533 ----
  1376.       fprintf (stderr, "                   Machineid Title [-b n] [-g size] [-u f.def]\n");
  1377.       fprintf (stderr, "        where:   Userid, Name, etc are passed by lpsched\n");
  1378.       fprintf (stderr, "                 -b n    = select paper bin n\n");
  1379.       fprintf (stderr, "                 -g size = select paper size (letter, b5, etc)\n");
  1380.       fprintf (stderr, "                -u f.def = use this printer definition file\n");    
  1381. !     exit (DISCARD_JOB);
  1382.   }        
  1383. *** net/psfbs.c    Sun Apr 19 13:32:22 1992
  1384. --- psfbs.c    Tue Jun  2 02:18:46 1992
  1385. ***************
  1386. *** 8,18 ****
  1387.   *    for psf usage                                                            *
  1388.   *                                                                            *
  1389.   *    Tony Field.       tony@ajfcal.cuc.ab.ca                                    *
  1390.   ****************************************************************************/
  1391.   /*
  1392. !  * $Id: psfbs.c,v 3.2 1992/01/19 05:50:33 ajf Exp ajf $
  1393.    *
  1394.    */
  1395.   
  1396.   /*    For each line in of input text, scan for backspaces.  Determine if
  1397.       the operation is an underline (i.e. the preceeding character is
  1398. --- 8,18 ----
  1399.   *    for psf usage                                                            *
  1400.   *                                                                            *
  1401.   *    Tony Field.       tony@ajfcal.cuc.ab.ca                                    *
  1402.   ****************************************************************************/
  1403.   /*
  1404. !  * $Id: psfbs.c,v 3.4 1992/02/24 06:48:59 ajf Exp ajf $
  1405.    *
  1406.    */
  1407.   
  1408.   /*    For each line in of input text, scan for backspaces.  Determine if
  1409.       the operation is an underline (i.e. the preceeding character is
  1410. ***************
  1411. *** 64,74 ****
  1412.       outfp = stdout;
  1413.       pgmname = argv[0];
  1414.       underline_on  = BEGIN_UNDERLINE;
  1415.       underline_off = END_UNDERLINE;
  1416.   
  1417. !     if (strcmp (argv[1], "-") == 0)
  1418.           usage();
  1419.       while ((c = getopt(argc, argv, "ifr:l:-")) != -1)
  1420.       {    switch (c)
  1421.           {
  1422.           case 'i':
  1423. --- 64,74 ----
  1424.       outfp = stdout;
  1425.       pgmname = argv[0];
  1426.       underline_on  = BEGIN_UNDERLINE;
  1427.       underline_off = END_UNDERLINE;
  1428.   
  1429. !     if (argc > 1  &&  strcmp (argv[1], "-") == 0)
  1430.           usage();
  1431.       while ((c = getopt(argc, argv, "ifr:l:-")) != -1)
  1432.       {    switch (c)
  1433.           {
  1434.           case 'i':
  1435.  
  1436. exit 0 # Just in case...
  1437.