home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume16 / plp / part01 next >
Internet Message Format  |  1988-09-22  |  69KB

  1. Path: uunet!bbn.com!rsalz
  2. From: rsalz@uunet.uu.net (Rich Salz)
  3. Newsgroups: comp.sources.unix
  4. Subject: v16i014:  Public lineprinter spooler package, Part01/16
  5. Message-ID: <1067@fig.bbn.com>
  6. Date: 14 Sep 88 20:12:25 GMT
  7. Lines: 1999
  8. Approved: rsalz@uunet.UU.NET
  9.  
  10. Submitted-by: papowell@julius.cs.umn.edu
  11. Posting-number: Volume 16, Issue 14
  12. Archive-name: plp/part01
  13.  
  14.               PLP - The Public Line Printer Spooler
  15.                A Portable UNIX Line Printer Spooler
  16.                      Release 2.0, 1 June 1988
  17.                        Prof. Patrick Powell
  18.                     Dept. of Computer Science
  19.          University of Minnesota, Minneapolis, Minnesota
  20.      PLP is a public domain version of the Berkeley LPD software.
  21. The  functional  resemblance  between  PLP  and the Berkeley Line
  22. Printer Spooler (LPD) is intentional; the source code was written
  23. without  reference  to the original Berkeley LPD software, except
  24. for  some  very  small sections concerned with networking and the
  25. large  characters used for banner printing.  The PLP software has
  26. the following features:
  27. 1).The  PLP  software is intended to be  used in a Networked File
  28.    System  (NFS)  environment,  in which there is a common set of
  29.    spool  queues,  as well as in a loosely coupled environment in
  30.    which  each  host transfers print jobs to a host which has the
  31.    printer.
  32. 2).Access  and  permission  to use PLP functions is controlled by
  33.    entries      in      a      printer      permissions      file
  34.    (/usr/spool/lpd/printer_perms.<hostname>)  which  can restrict
  35.    use  by  user  name, host, spooler, page useage, and a host of
  36.    other         factors.         The        printcap        file
  37.    (/usr/spool/lpd/printcap.<hostname>)  is  used  to specify the
  38.    printer queues and their operation.
  39. 3).Jobs  can now be prioritized.  The maximum priority a user can
  40.    specify is set in the printer permissions file.
  41. 4).In  addition  to  the  general  printer permissions file, each
  42.    spool  queue  can  have  its  own addition printer permissions
  43.    file.
  44. 5).Line  printer control functions can be exercised from a remote
  45.    host.   Hosts  and  users  with  remote control permission are
  46.    specified by entries in the printer permissions file.
  47. 6).Unspooling  of  jobs  can be performed by a printcap specified
  48.    program, rather than by the PLP unspooler.  This allows PLP to
  49.    be used as a spooler and to have spool queues used for various
  50.    purposes.
  51. 7).Extremely  verbose  and chatty error messages have been added.
  52.    These  greatly  ease debugging and installation.  In addition,
  53.    the  checkpc  utility  can be used to set file permissions and
  54.    other items for use by the PLP software.
  55. 8).The code is quite portable, with as few system dependencies in
  56.    it as possible.  It has run on a VAX 4.2, 4.3, and ULTRIX, SUN
  57.    3.0, and DG-UX.
  58. ____________
  59. * UNIX is a trademark of ATT Bell Laboratories.
  60.  
  61. #! /bin/sh
  62. # This is a shell archive.  Remove anything before this line, then unpack
  63. # it by saving it into a file and typing "sh file".  To overwrite existing
  64. # files, type "sh file -c".  You can also feed this as standard input via
  65. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  66. # will see the following message at the end:
  67. #        "End of archive 1 (of 16)."
  68. # Contents:  MANIFEST Makefile README backup backup/Makefile
  69. #   backup/lpr.remove backup/lpr.save backup/restore.lpr
  70. #   backup/save.lpr doc doc/PLP doc/PLP/08.t doc/PLP/Makefile
  71. #   doc/PLP/README doc/PLP/dict doc/PLP/macros filters
  72. #   filters/Makefile man man/Makefile man/README printcap
  73. #   printcap/Makefile printcap/README printcap/genpc printcap/hosts
  74. #   printcap/hosts/dg printcap/hosts/julius printcap/hosts/umn-cs
  75. #   printcap/printcap printcap/printers
  76. #   printcap/printers/apple_lind26a.local
  77. #   printcap/printers/apple_lind26a.remote
  78. #   printcap/printers/dg1_lind1.forward
  79. #   printcap/printers/dg1_lind1.remote
  80. #   printcap/printers/dg2_lind25.forward
  81. #   printcap/printers/dg2_lind25.remote
  82. #   printcap/printers/dg3_lind25.forward
  83. #   printcap/printers/dg3_lind25.remote
  84. #   printcap/printers/dgt_lind27.forward
  85. #   printcap/printers/dgt_lind27.remote
  86. #   printcap/printers/diablo_lind136.local
  87. #   printcap/printers/diablo_lind136.remote
  88. #   printcap/printers/epson_lind27.remote
  89. #   printcap/printers/hp2563_lind25.forward
  90. #   printcap/printers/hp2563_lind25.remote
  91. #   printcap/printers/hp_lind54.forward
  92. #   printcap/printers/hp_lind54.remote
  93. #   printcap/printers/imagen_lind27.local
  94. #   printcap/printers/imagen_lind27.remote
  95. #   printcap/printers/laserjetplus_lind25.forward
  96. #   printcap/printers/laserjetplus_lind25.remote src src/IDENT
  97. #   src/README src/patchlevel.h src/setstatus.c src/setup_test.c test
  98. #   test/Makefile test/README test/filter.sh test/linetest.c
  99. #   test/printcap.proto test/printer_perms.proto test/qh.sh utilities
  100. #   utilities/IDENT utilities/Makefile utilities/cpr
  101. #   utilities/cpr/Makefile utilities/print utilities/print/Makefile
  102. #   utilities/print/print.1 utilities/print/print.sh
  103. # Wrapped by papowell@attila on Wed Aug 10 10:44:40 1988
  104. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  105. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  106.   echo shar: Will not clobber existing file \"'Makefile'\"
  107. else
  108. echo shar: Extracting \"'Makefile'\" \(1091 characters\)
  109. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  110. X# ***************************************************************************
  111. X# * U. Minnesota LPD Software * Copyright 1987, 1988, Patrick Powell
  112. X# ***************************************************************************
  113. X# * MODULE: Top level makefile:
  114. X# * Make a tar tape for distribution
  115. X# ***************************************************************************
  116. X# * Revision History: Created Thu Mar 24 12:42:00 CST 1988
  117. X# * $Log$
  118. X# ***************************************************************************
  119. X##ifndef lint
  120. X#static char id_str1[] =
  121. X#    "$Header$ PLP Copyright 1988 Patrick Powell";
  122. X#endif lint
  123. OUTPUT = /tmp/PLP.tar
  124. X
  125. all:
  126. X    @echo 'distr: make distribution'
  127. X    @echo 'progs: create stuff for installation'
  128. X    @echo 'see the documentation in doc, and README files'
  129. X
  130. distr:
  131. X    tar cf $(OUTPUT) `cat FILES`
  132. install:
  133. X    -mkdir bin 
  134. X    -mkdir lint 
  135. X    cp src/Makefile bin/Makefile
  136. X    @echo "edit bin/Makefile for your site"
  137. clean:
  138. X    for i in src test backup filters printcap utilities bin; do \
  139. X        echo "----- cleaning " $$i "----------" ; \
  140. X        (cd $$i; make clean ); \
  141. X    done
  142. X    -rm -f lint/*
  143. END_OF_FILE
  144. if test 1091 -ne `wc -c <'Makefile'`; then
  145.     echo shar: \"'Makefile'\" unpacked with wrong size!
  146. fi
  147. # end of 'Makefile'
  148. fi
  149. if test -f 'README' -a "${1}" != "-c" ; then 
  150.   echo shar: Will not clobber existing file \"'README'\"
  151. else
  152. echo shar: Extracting \"'README'\" \(4485 characters\)
  153. sed "s/^X//" >'README' <<'END_OF_FILE'
  154. X/***************************************************************************
  155. X * U. Minnesota LPD Software * Copyright 1987, 1988, Patrick Powell
  156. X ***************************************************************************
  157. X * MODULE: README
  158. X * Comments about the use of the LPD software
  159. X ***************************************************************************
  160. X * Revision History: Created Fri Mar 11 14:31:45 CST 1988 Patrick Powell
  161. X * $Log$
  162. X ***************************************************************************/
  163. This directory contains the source  of the PLP software.
  164. This software is functionally  compatible with the 1983 Berkeley LPD software,
  165. but with enhanced capabilites.  See  "PLP - Public Line Printer Spooler"
  166. in the doc directory.
  167. X
  168. Directories:
  169. RCS            bin            doc            filters        man
  170. printcap       src            test
  171. X
  172. XFiles:
  173. README
  174. X
  175. bin:    place to put binaries; cd bin; see Makefile
  176. doc:    documentation- PLP - Public Line Printer Spooler Manual
  177. filters:    basic set of filters
  178. man:    man pages for lpr, etc.
  179. printcap:    basic set of printcap entries.
  180. src:    source files for the PLP software
  181. test:    set of tests
  182. RCS:    RCS files for src- may not be supplied with distribution.
  183. imagen:    modified imagen support software- may not be supplied with distribution.
  184. Transcript:    modified Transcript support software- may not be
  185. X        supplied with distribution.
  186. X
  187. Brief Installation Guide.
  188. X
  189. X1.    make a ./bin directory, copy src/Makefile to ./bin.
  190. X2.    make a ./lint directory; this will be used by lint to put lint output
  191. X
  192. X3.  bin/: Check out the Makefile,  and select the system you are compiling for.
  193. The "IS_SUN" is for SUNs running UNIX 3.4 and up, the "IS_VAX" is for
  194. BSD 4.3,  and the "IS_DATAGEN" is for Data Generals.  These flags are
  195. used mainly to set some of the values of defines for lint and other
  196. things;  there are some diablical differences in determining what is
  197. an executable file.
  198. X    It is strongly suggested that you make a test version (XPERIMENT option
  199. in Makefile).  This version uses /tmp/printcap and /tmp/printerperms
  200. instead of /etc/printcap and /etc/printerperms.  In addition,  it does
  201. NOT run SUID root.  It is a safe,  clean,  and sane way to debug this
  202. stuff.  The remainder of this document assumes you try the test version
  203. first.
  204. X
  205. X4.  bin/: Pray for world peace and enlightenment.  While this probably won't
  206. help with the next step,  it will give you a perspective on problems.  Do:
  207. X
  208. make clean
  209. make test
  210. X
  211. You now have compiled everything.
  212. X
  213. X5.  Read the test procedures in ./doc/PLP,  and try them out.
  214. X    The test directory has a set of files and printcaps that
  215. X    can be used for test purposes.
  216. X
  217. X6.  backup/
  218. Still feeling brave?  You should save the exisiting version of LPD;
  219. the backup directory has a set of programs (shell scripts) to do this.
  220. The lpr.save file contains a list of things to save and 
  221. lpr.delete is a list of Berkelely things to delete.  Do:
  222. X
  223. cd ../backup
  224. save.lpr
  225. X
  226. If you want to restore things quickly,  you can do:
  227. cd ../backup
  228. restore.lpr <date of save file>
  229. X
  230. and you are back to where you were before.
  231. X
  232. X7.  Working verions: bin/Makefile
  233. X    comment out XPERIMENT flag, and do:
  234. X    make clean
  235. X    make all
  236. X
  237. X8.  Setting up printcap and printer perms
  238. X    The /etc/printcap and other files have been moved to a new location:
  239. X    /usr/spool/lpd/printcap.<host> - printcap for <host>
  240. X    /usr/spool/lpd/printer_perms.<host> - printer perms for <host>
  241. X    /usr/spool/lpd/lpd.lock.<host> - lock file for <host>
  242. X    /usr/spool/lpd/log.<host> - log file for <host>
  243. X    
  244. X    If you are running an NFS environment, this allows you to share
  245. X    a common spool directory for all of the lpd daemons.  Note that
  246. X    the use of symbolic links from /usr/spool/lpd/printcap.<host>
  247. X    to the old /etc/printcap file can be used temporarily to get
  248. X    you going.
  249. X
  250. X9.  After you have set up the printcap and other files,  you can try
  251. X    and installing the new version.
  252. X    make install
  253. X
  254. X10.  And what is a system without documentation?  install the man pages by
  255. hand.
  256. X
  257. X11. You will probably find that your filters need fumbling with.
  258. If you have problems with the Imagen stuff,  we have a version that is
  259. ALMOST civilized.  The standard Imagen installation procedures are TOO
  260. clever by half;  what we did was to rip out only the imprint,
  261. ipr, and the communications stuff.
  262. Contact us if you need these.  
  263. X
  264. X12. Similarly we have a somewhat civilized version of the Adobe Transcript
  265. software.  The existing version is (as far as we can tell) functionally
  266. compatible with PLP.
  267. END_OF_FILE
  268. if test 4485 -ne `wc -c <'README'`; then
  269.     echo shar: \"'README'\" unpacked with wrong size!
  270. fi
  271. # end of 'README'
  272. fi
  273. if test ! -d 'backup' ; then
  274.     echo shar: Creating directory \"'backup'\"
  275.     mkdir 'backup'
  276. fi
  277. if test -f 'backup/Makefile' -a "${1}" != "-c" ; then 
  278.   echo shar: Will not clobber existing file \"'backup/Makefile'\"
  279. else
  280. echo shar: Extracting \"'backup/Makefile'\" \(262 characters\)
  281. sed "s/^X//" >'backup/Makefile' <<'END_OF_FILE'
  282. X#
  283. X# Save, Delete, and Restore the UCB Printer Spooler
  284. X#
  285. X# Thu Mar 17 17:11:04 CST 1988 Patrick Powell
  286. X
  287. save:
  288. X    save.lpr
  289. X
  290. restore:
  291. X    restore.lpr `echo backup.lpr.* | sed -e 's/backup.lpr.//g' `
  292. X
  293. remove:
  294. X    rm -f `cat lpr.remove`
  295. X
  296. clean:
  297. X    -rm backup.lpr.* perms.lpr.*
  298. END_OF_FILE
  299. if test 262 -ne `wc -c <'backup/Makefile'`; then
  300.     echo shar: \"'backup/Makefile'\" unpacked with wrong size!
  301. fi
  302. # end of 'backup/Makefile'
  303. fi
  304. if test -f 'backup/lpr.remove' -a "${1}" != "-c" ; then 
  305.   echo shar: Will not clobber existing file \"'backup/lpr.remove'\"
  306. else
  307. echo shar: Extracting \"'backup/lpr.remove'\" \(66 characters\)
  308. sed "s/^X//" >'backup/lpr.remove' <<'END_OF_FILE'
  309. X/usr/ucb/lpr
  310. X/usr/ucb/lprm
  311. X/usr/ucb/lpq
  312. X/usr/lib/lpd
  313. X/usr/etc/lpc
  314. END_OF_FILE
  315. if test 66 -ne `wc -c <'backup/lpr.remove'`; then
  316.     echo shar: \"'backup/lpr.remove'\" unpacked with wrong size!
  317. fi
  318. # end of 'backup/lpr.remove'
  319. fi
  320. if test -f 'backup/lpr.save' -a "${1}" != "-c" ; then 
  321.   echo shar: Will not clobber existing file \"'backup/lpr.save'\"
  322. else
  323. echo shar: Extracting \"'backup/lpr.save'\" \(80 characters\)
  324. sed "s/^X//" >'backup/lpr.save' <<'END_OF_FILE'
  325. X/usr/ucb/lpr
  326. X/usr/ucb/lprm
  327. X/usr/ucb/lpq
  328. X/usr/lib/lpd
  329. X/usr/etc/lpc
  330. X/etc/printcap
  331. END_OF_FILE
  332. if test 80 -ne `wc -c <'backup/lpr.save'`; then
  333.     echo shar: \"'backup/lpr.save'\" unpacked with wrong size!
  334. fi
  335. # end of 'backup/lpr.save'
  336. fi
  337. if test -f 'backup/restore.lpr' -a "${1}" != "-c" ; then 
  338.   echo shar: Will not clobber existing file \"'backup/restore.lpr'\"
  339. else
  340. echo shar: Extracting \"'backup/restore.lpr'\" \(408 characters\)
  341. sed "s/^X//" >'backup/restore.lpr' <<'END_OF_FILE'
  342. X#!/bin/csh -f
  343. echo $0
  344. if (  ${?argv} == 0 || ${#argv} != 1 ) then
  345. X    echo "usage: $0 date  (date is in format ddMONyyyy)"
  346. X    exit 1
  347. endif
  348. set suffix=$1
  349. rm -f `cat lpr.save`
  350. tar xpvf backup.lpr.${suffix}
  351. ls -lg `cat lpr.save` > /tmp/perms$$
  352. diff perms.lpr.${suffix} /tmp/perms$$
  353. set stat=$status
  354. rm -f /tmp/perms$$
  355. if ($stat != 0) then
  356. X    echo WARNING: restored LPR is not the same as it should be
  357. endif
  358. exit $stat
  359. END_OF_FILE
  360. if test 408 -ne `wc -c <'backup/restore.lpr'`; then
  361.     echo shar: \"'backup/restore.lpr'\" unpacked with wrong size!
  362. fi
  363. chmod +x 'backup/restore.lpr'
  364. # end of 'backup/restore.lpr'
  365. fi
  366. if test -f 'backup/save.lpr' -a "${1}" != "-c" ; then 
  367.   echo shar: Will not clobber existing file \"'backup/save.lpr'\"
  368. else
  369. echo shar: Extracting \"'backup/save.lpr'\" \(156 characters\)
  370. sed "s/^X//" >'backup/save.lpr' <<'END_OF_FILE'
  371. X#!/bin/csh -f
  372. set df=(`date`)
  373. set suffix="${df[3]}${df[2]}${df[6]}"
  374. ls -lg `cat lpr.save` > perms.lpr.${suffix}
  375. tar cvf backup.lpr.${suffix} `cat lpr.save`
  376. END_OF_FILE
  377. if test 156 -ne `wc -c <'backup/save.lpr'`; then
  378.     echo shar: \"'backup/save.lpr'\" unpacked with wrong size!
  379. fi
  380. chmod +x 'backup/save.lpr'
  381. # end of 'backup/save.lpr'
  382. fi
  383. if test ! -d 'doc' ; then
  384.     echo shar: Creating directory \"'doc'\"
  385.     mkdir 'doc'
  386. fi
  387. if test ! -d 'doc/PLP' ; then
  388.     echo shar: Creating directory \"'doc/PLP'\"
  389.     mkdir 'doc/PLP'
  390. fi
  391. if test -f 'doc/PLP/08.t' -a "${1}" != "-c" ; then 
  392.   echo shar: Will not clobber existing file \"'doc/PLP/08.t'\"
  393. else
  394. echo shar: Extracting \"'doc/PLP/08.t'\" \(1064 characters\)
  395. sed "s/^X//" >'doc/PLP/08.t' <<'END_OF_FILE'
  396. X.ig
  397. X$Header: 08.t,v 1.1 88/05/21 18:39:46 papowell Locked $
  398. X$log$
  399. X..
  400. X.bp
  401. X.NH 1
  402. Shared or NFS File Systems
  403. X.PP
  404. In an NFS environment,
  405. a common or shared spool directory can be used to avoid needless
  406. copying or duplicate fules.
  407. The
  408. X.I lpr
  409. program places jobs in the shared spooling directory
  410. and then requests the
  411. X.I lpd
  412. daemon on the appropriate remote machine to start unspooling actions.
  413. The
  414. X.B nw
  415. X(networked file system)
  416. flag and
  417. X.B rm
  418. X(remote machine)
  419. are used to indicate this type of file system organization.
  420. X.PP
  421. In this environment,
  422. only machines which have printers attached or are acting as
  423. forwarding systems to other machines need to have an
  424. X.I lpd
  425. daemon running.
  426. X.PP
  427. One of the problems with the current implementation of the NFS
  428. distributed file system support is the current lack of support for
  429. X.I "file locking"
  430. across file systems.
  431. The current implemenation of PLP uses either the
  432. X.I lockf
  433. or
  434. X.I flock
  435. facility,
  436. selected at compilation time.
  437. Work is underway to use a network supported file locking facility to
  438. better support shared file systems.
  439. END_OF_FILE
  440. if test 1064 -ne `wc -c <'doc/PLP/08.t'`; then
  441.     echo shar: \"'doc/PLP/08.t'\" unpacked with wrong size!
  442. fi
  443. # end of 'doc/PLP/08.t'
  444. fi
  445. if test -f 'doc/PLP/Makefile' -a "${1}" != "-c" ; then 
  446.   echo shar: Will not clobber existing file \"'doc/PLP/Makefile'\"
  447. else
  448. echo shar: Extracting \"'doc/PLP/Makefile'\" \(287 characters\)
  449. sed "s/^X//" >'doc/PLP/Makefile' <<'END_OF_FILE'
  450. X#
  451. X#$Header: Makefile,v 1.1 88/05/21 18:39:56 papowell Locked $
  452. X#$Log:    Makefile,v $
  453. X# Revision 1.1  88/05/21  18:39:56  papowell
  454. X# Initial revision
  455. X# 
  456. X#    Make the manual.
  457. X#    needs tbl, -ms macros
  458. X#    tbl *.t | troff -ms 
  459. X#    typeset -t -ms -Tdumb *.t >paper.n
  460. all:
  461. X    typeset -rC1 -t -ms -Ti *.t
  462. END_OF_FILE
  463. if test 287 -ne `wc -c <'doc/PLP/Makefile'`; then
  464.     echo shar: \"'doc/PLP/Makefile'\" unpacked with wrong size!
  465. fi
  466. # end of 'doc/PLP/Makefile'
  467. fi
  468. if test -f 'doc/PLP/README' -a "${1}" != "-c" ; then 
  469.   echo shar: Will not clobber existing file \"'doc/PLP/README'\"
  470. else
  471. echo shar: Extracting \"'doc/PLP/README'\" \(186 characters\)
  472. sed "s/^X//" >'doc/PLP/README' <<'END_OF_FILE'
  473. X# Thu Dec 17 10:07:13 CST 1987 Patrick Powell
  474. The PLP manual is an updated version of the PLP documentation.
  475. It needs tbl to format properly.
  476. X
  477. There are many updates, read it carefully.
  478. END_OF_FILE
  479. if test 186 -ne `wc -c <'doc/PLP/README'`; then
  480.     echo shar: \"'doc/PLP/README'\" unpacked with wrong size!
  481. fi
  482. # end of 'doc/PLP/README'
  483. fi
  484. if test -f 'doc/PLP/dict' -a "${1}" != "-c" ; then 
  485.   echo shar: Will not clobber existing file \"'doc/PLP/dict'\"
  486. else
  487. echo shar: Extracting \"'doc/PLP/dict'\" \(319 characters\)
  488. sed "s/^X//" >'doc/PLP/dict' <<'END_OF_FILE'
  489. X(null)
  490. X(null)
  491. Aprinter
  492. Bprinter
  493. CS
  494. CW
  495. Dept
  496. Dprinter
  497. XEprinter
  498. XFC
  499. Imagen
  500. LPC
  501. LPD
  502. Ops
  503. SUID
  504. admin
  505. daemon
  506. daemons
  507. dev
  508. formatter
  509. gethostent
  510. host.equiv
  511. hostname
  512. inet
  513. lib
  514. lpc
  515. lpd
  516. perms
  517. printcap
  518. printer,tcp
  519. printerperms
  520. prioritize
  521. prioritized
  522. queueing
  523. rc
  524. rc.local
  525. rcmd
  526. rshd
  527. server.adm
  528. spoolqueues
  529. userid
  530. userids
  531. wildcard
  532. X(null)
  533. END_OF_FILE
  534. if test 319 -ne `wc -c <'doc/PLP/dict'`; then
  535.     echo shar: \"'doc/PLP/dict'\" unpacked with wrong size!
  536. fi
  537. # end of 'doc/PLP/dict'
  538. fi
  539. if test -f 'doc/PLP/macros' -a "${1}" != "-c" ; then 
  540.   echo shar: Will not clobber existing file \"'doc/PLP/macros'\"
  541. else
  542. echo shar: Extracting \"'doc/PLP/macros'\" \(129 characters\)
  543. sed "s/^X//" >'doc/PLP/macros' <<'END_OF_FILE'
  544. X.    \" CW - L - Helvetica
  545. X.de L
  546. X.nr pq \\n(.f
  547. X.if t .ft CW
  548. X.if n .ft 1
  549. X.if !\e\\$1\e\e \&\\s-\\n(Ls\\$1\|\\s+\\n(Ls\f\\n(pq\\$2
  550. X..
  551. END_OF_FILE
  552. if test 129 -ne `wc -c <'doc/PLP/macros'`; then
  553.     echo shar: \"'doc/PLP/macros'\" unpacked with wrong size!
  554. fi
  555. # end of 'doc/PLP/macros'
  556. fi
  557. if test ! -d 'filters' ; then
  558.     echo shar: Creating directory \"'filters'\"
  559.     mkdir 'filters'
  560. fi
  561. if test -f 'filters/Makefile' -a "${1}" != "-c" ; then 
  562.   echo shar: Will not clobber existing file \"'filters/Makefile'\"
  563. else
  564. echo shar: Extracting \"'filters/Makefile'\" \(848 characters\)
  565. sed "s/^X//" >'filters/Makefile' <<'END_OF_FILE'
  566. X# Public Domain LPD Copyright 1988 Patrick Powell
  567. X# Filters:
  568. X# Filters consist of a front end program (main.c), which sets up
  569. X# arguments and then calls filter(stopstr).  If filter hits the
  570. X# "stopstr" in its input,  is should suspend itself.  On resumption,
  571. X# it should take whatever actions are needed (ioctl call, etc.)
  572. X# to reset the printer to a known state.
  573. X#
  574. X
  575. CFLAGS=    -g
  576. LIB=    /usr/local/new/lib
  577. X
  578. PRINTER=lpf
  579. X
  580. VARIAN=    vpf vdmp
  581. X
  582. X
  583. ALL= ${PRINTER} ${VARIAN}
  584. X
  585. all:    ${ALL}
  586. X
  587. lpf:    main.o lpf.c
  588. X    ${CC} -o lpf -DPRINTRONIX ${CFLAGS} main.o lpf.c
  589. X
  590. X
  591. vpf:    main.o lpf.c
  592. X    ${CC} -o vpf -DVERSATEC ${CFLAGS} main.o lpf.c
  593. X
  594. vdmp:    main.o vdmp.c
  595. X    ${CC} -o vdmp ${CFLAGS} main.o vdmp.c
  596. X
  597. install: ${ALL}
  598. X    -for i in ${ALL}; \
  599. X    do \
  600. X        install -c $$i ${DESTDIR}${LIB}; \
  601. X    done;
  602. X
  603. clean:
  604. X    rm -f ${ALL} *.o
  605. X
  606. print:
  607. X    @pr Makefile
  608. X    @${CXREF} *.c | pr -h XREF
  609. X    @pr *.h *.c
  610. END_OF_FILE
  611. if test 848 -ne `wc -c <'filters/Makefile'`; then
  612.     echo shar: \"'filters/Makefile'\" unpacked with wrong size!
  613. fi
  614. # end of 'filters/Makefile'
  615. fi
  616. if test ! -d 'man' ; then
  617.     echo shar: Creating directory \"'man'\"
  618.     mkdir 'man'
  619. fi
  620. if test -f 'man/Makefile' -a "${1}" != "-c" ; then 
  621.   echo shar: Will not clobber existing file \"'man/Makefile'\"
  622. else
  623. echo shar: Extracting \"'man/Makefile'\" \(219 characters\)
  624. sed "s/^X//" >'man/Makefile' <<'END_OF_FILE'
  625. MAN=    /usr/man/
  626. all:
  627. clean:
  628. install:
  629. X    for i in *.1; \
  630. X    do    \
  631. X        install -c $i $(MAN)/man1;    \
  632. X    done;
  633. X    for i in *.5; \
  634. X    do    \
  635. X        install -c $i $(MAN)/man5;    \
  636. X    done;
  637. X    for i in *.8; \
  638. X    do    \
  639. X        install -c $i $(MAN)/man8;    \
  640. X    done;
  641. END_OF_FILE
  642. if test 219 -ne `wc -c <'man/Makefile'`; then
  643.     echo shar: \"'man/Makefile'\" unpacked with wrong size!
  644. fi
  645. # end of 'man/Makefile'
  646. fi
  647. if test -f 'man/README' -a "${1}" != "-c" ; then 
  648.   echo shar: Will not clobber existing file \"'man/README'\"
  649. else
  650. echo shar: Extracting \"'man/README'\" \(110 characters\)
  651. sed "s/^X//" >'man/README' <<'END_OF_FILE'
  652. Mon Nov  9 08:51:07 CST 1987 Patrick Powell
  653. Update printer.1 and printers.1 to reflect your local operations.
  654. END_OF_FILE
  655. if test 110 -ne `wc -c <'man/README'`; then
  656.     echo shar: \"'man/README'\" unpacked with wrong size!
  657. fi
  658. # end of 'man/README'
  659. fi
  660. if test ! -d 'printcap' ; then
  661.     echo shar: Creating directory \"'printcap'\"
  662.     mkdir 'printcap'
  663. fi
  664. if test -f 'printcap/Makefile' -a "${1}" != "-c" ; then 
  665.   echo shar: Will not clobber existing file \"'printcap/Makefile'\"
  666. else
  667. echo shar: Extracting \"'printcap/Makefile'\" \(184 characters\)
  668. sed "s/^X//" >'printcap/Makefile' <<'END_OF_FILE'
  669. X#Wed Nov 25 12:24:47 CST 1987 Patrick Powell
  670. X# This is an ugly file that will attempt to make your specified device
  671. X
  672. SHELL=/bin/sh
  673. X
  674. all:
  675. X    genpc hosts/*
  676. clean:
  677. X    -rm printcap/*.printcap
  678. END_OF_FILE
  679. if test 184 -ne `wc -c <'printcap/Makefile'`; then
  680.     echo shar: \"'printcap/Makefile'\" unpacked with wrong size!
  681. fi
  682. # end of 'printcap/Makefile'
  683. fi
  684. if test -f 'printcap/README' -a "${1}" != "-c" ; then 
  685.   echo shar: Will not clobber existing file \"'printcap/README'\"
  686. else
  687. echo shar: Extracting \"'printcap/README'\" \(1061 characters\)
  688. sed "s/^X//" >'printcap/README' <<'END_OF_FILE'
  689. Created Mon Nov 23 14:08:45 CST 1987 Patrick Powell and Scott Fischer
  690. X
  691. This directory contains two major directories involved in creating a
  692. printcap file for the Line Printer Spooler.
  693. X
  694. The "printers" directory contains printcap entries for each printer, to
  695. be used "locally" or "remotely"; if the printer is attached to the
  696. host, the "local" entry should be in the /etc/printcap; if it is not on
  697. the machine, then the "remote" entry should be present.
  698. X
  699. The "hosts" directory contains two entries for each host:
  700. X1.  a host.printcap file, generated by the genpc shell script
  701. X2.  a host printer description file which contains a list of
  702. X    printers available to the host
  703. X
  704. XFor example, the file ./hosts/cs contains a list of printers
  705. local to the VAX and remote:
  706. X    imagen_lind27.local diablo_lind136.local epson_lind27.local
  707. X    dgt_lind27.remote laserjet_lind25.remote
  708. X    ....
  709. Remote printers have the entry <printername>.remote, local use
  710. X<printername>.local
  711. X
  712. The genpc program will create the printcap file for the
  713. specified host and put it in host/<host>.printcap file
  714. END_OF_FILE
  715. if test 1061 -ne `wc -c <'printcap/README'`; then
  716.     echo shar: \"'printcap/README'\" unpacked with wrong size!
  717. fi
  718. # end of 'printcap/README'
  719. fi
  720. if test -f 'printcap/genpc' -a "${1}" != "-c" ; then 
  721.   echo shar: Will not clobber existing file \"'printcap/genpc'\"
  722. else
  723. echo shar: Extracting \"'printcap/genpc'\" \(743 characters\)
  724. sed "s/^X//" >'printcap/genpc' <<'END_OF_FILE'
  725. X#!/bin/csh -f
  726. set HOSTDIR = hosts/
  727. set PRINTCAP = printcap/
  728. set PRINTERDIR = printers/
  729. X
  730. foreach host ($*)
  731. X    set host = $host:t
  732. X    set host = $host:r
  733. X    if ( ! -e ${HOSTDIR}${host} || ! -f ${HOSTDIR}${host} ) then
  734. X        echo Host ${host} does not exist 
  735. X        exit 1
  736. X    endif
  737. X    echo Updating printcap for ${host}
  738. X    echo  "# printcap file created " `date` > ${PRINTCAP}${host}.printcap
  739. X    if( $status ) then
  740. X        echo "error creating ${HOSTDIR}${host}.printcap"
  741. X        exit 1
  742. X    endif
  743. X    echo host $host has the following printers:
  744. X    cat ${HOSTDIR}${host}
  745. X    foreach printer (`cat ${HOSTDIR}${host}`)
  746. X        if ( -f ${PRINTERDIR}${printer}) then
  747. X            cat ${PRINTERDIR}${printer} >> ${PRINTCAP}${host}.printcap
  748. X        else
  749. X            echo No printcap for ${printer}
  750. X            exit 1
  751. X        endif
  752. X    end
  753. end
  754. exit 0
  755. END_OF_FILE
  756. if test 743 -ne `wc -c <'printcap/genpc'`; then
  757.     echo shar: \"'printcap/genpc'\" unpacked with wrong size!
  758. fi
  759. chmod +x 'printcap/genpc'
  760. # end of 'printcap/genpc'
  761. fi
  762. if test ! -d 'printcap/hosts' ; then
  763.     echo shar: Creating directory \"'printcap/hosts'\"
  764.     mkdir 'printcap/hosts'
  765. fi
  766. if test -f 'printcap/hosts/dg' -a "${1}" != "-c" ; then 
  767.   echo shar: Will not clobber existing file \"'printcap/hosts/dg'\"
  768. else
  769. echo shar: Extracting \"'printcap/hosts/dg'\" \(220 characters\)
  770. sed "s/^X//" >'printcap/hosts/dg' <<'END_OF_FILE'
  771. imagen_lind27.remote
  772. diablo_lind136.remote
  773. epson_lind27.remote
  774. dgt_lind27.remote
  775. dg1_lind1.remote
  776. dg2_lind25.remote
  777. dg3_lind25.remote
  778. hp_lind54.remote
  779. laserjetplus_lind25.remote
  780. hp2563_lind25.remote
  781. apple_lind26a.remote
  782. END_OF_FILE
  783. if test 220 -ne `wc -c <'printcap/hosts/dg'`; then
  784.     echo shar: \"'printcap/hosts/dg'\" unpacked with wrong size!
  785. fi
  786. # end of 'printcap/hosts/dg'
  787. fi
  788. if test -f 'printcap/hosts/julius' -a "${1}" != "-c" ; then 
  789.   echo shar: Will not clobber existing file \"'printcap/hosts/julius'\"
  790. else
  791. echo shar: Extracting \"'printcap/hosts/julius'\" \(200 characters\)
  792. sed "s/^X//" >'printcap/hosts/julius' <<'END_OF_FILE'
  793. imagen_lind27.remote
  794. diablo_lind136.remote
  795. dgt_lind27.remote
  796. dg1_lind1.remote
  797. dg2_lind25.remote
  798. dg3_lind25.remote
  799. hp_lind54.remote
  800. laserjetplus_lind25.remote
  801. hp2563_lind25.remote
  802. apple_lind26a.remote
  803. END_OF_FILE
  804. if test 200 -ne `wc -c <'printcap/hosts/julius'`; then
  805.     echo shar: \"'printcap/hosts/julius'\" unpacked with wrong size!
  806. fi
  807. # end of 'printcap/hosts/julius'
  808. fi
  809. if test -f 'printcap/hosts/umn-cs' -a "${1}" != "-c" ; then 
  810.   echo shar: Will not clobber existing file \"'printcap/hosts/umn-cs'\"
  811. else
  812. echo shar: Extracting \"'printcap/hosts/umn-cs'\" \(184 characters\)
  813. sed "s/^X//" >'printcap/hosts/umn-cs' <<'END_OF_FILE'
  814. imagen_lind27.local
  815. dgt_lind27.forward
  816. dg1_lind1.forward
  817. dg2_lind25.forward
  818. dg3_lind25.forward
  819. hp_lind54.forward
  820. laserjetplus_lind25.forward
  821. hp2563_lind25.forward
  822. diablo_lind136.local
  823. END_OF_FILE
  824. if test 184 -ne `wc -c <'printcap/hosts/umn-cs'`; then
  825.     echo shar: \"'printcap/hosts/umn-cs'\" unpacked with wrong size!
  826. fi
  827. # end of 'printcap/hosts/umn-cs'
  828. fi
  829. if test ! -d 'printcap/printcap' ; then
  830.     echo shar: Creating directory \"'printcap/printcap'\"
  831.     mkdir 'printcap/printcap'
  832. fi
  833. if test ! -d 'printcap/printers' ; then
  834.     echo shar: Creating directory \"'printcap/printers'\"
  835.     mkdir 'printcap/printers'
  836. fi
  837. if test -f 'printcap/printers/apple_lind26a.local' -a "${1}" != "-c" ; then 
  838.   echo shar: Will not clobber existing file \"'printcap/printers/apple_lind26a.local'\"
  839. else
  840. echo shar: Extracting \"'printcap/printers/apple_lind26a.local'\" \(530 characters\)
  841. sed "s/^X//" >'printcap/printers/apple_lind26a.local' <<'END_OF_FILE'
  842. X# Apple laserwriter
  843. X# attached to whatever we have
  844. X# Thu Dec 10 21:51:54 CST 1987
  845. apple_lind26a|ai-laser|ai|ps|postscript|PostScript:\
  846. X    :lp=/dev/ai:sd=/usr/spool/lp-ai:\
  847. X    :lf=/usr/adm/ai-log:af=/usr/adm/ai.acct:\
  848. X    :br#9600:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:mx#0:sf:sb:\
  849. X    :if=/usr/local/lib/ps/psif:\
  850. X    :of=/usr/local/lib/ps/psof:gf=/usr/local/lib/ps/psgf:\
  851. X    :nf=/usr/local/lib/ps/psnf:tf=/usr/local/lib/ps/pstf:\
  852. X    :rf=/usr/local/lib/ps/psrf:vf=/usr/local/lib/ps/psvf:\
  853. X    :cf=/usr/local/lib/ps/pscf:df=/usr/local/lib/ps/psdf:
  854. END_OF_FILE
  855. if test 530 -ne `wc -c <'printcap/printers/apple_lind26a.local'`; then
  856.     echo shar: \"'printcap/printers/apple_lind26a.local'\" unpacked with wrong size!
  857. fi
  858. # end of 'printcap/printers/apple_lind26a.local'
  859. fi
  860. if test -f 'printcap/printers/apple_lind26a.remote' -a "${1}" != "-c" ; then 
  861.   echo shar: Will not clobber existing file \"'printcap/printers/apple_lind26a.remote'\"
  862. else
  863. echo shar: Extracting \"'printcap/printers/apple_lind26a.remote'\" \(189 characters\)
  864. sed "s/^X//" >'printcap/printers/apple_lind26a.remote' <<'END_OF_FILE'
  865. X# Apple laserwriter
  866. X# attached to whatever we have
  867. X# Thu Dec 10 21:51:54 CST 1987
  868. apple_lind26a|ai-laser|ai|ps|postscript|PostScript:\
  869. X    :lp=:rm=??:rp=apple_lind26a:\
  870. X    :sd=/usr/spool/lp-ai:
  871. END_OF_FILE
  872. if test 189 -ne `wc -c <'printcap/printers/apple_lind26a.remote'`; then
  873.     echo shar: \"'printcap/printers/apple_lind26a.remote'\" unpacked with wrong size!
  874. fi
  875. # end of 'printcap/printers/apple_lind26a.remote'
  876. fi
  877. if test -f 'printcap/printers/dg1_lind1.forward' -a "${1}" != "-c" ; then 
  878.   echo shar: Will not clobber existing file \"'printcap/printers/dg1_lind1.forward'\"
  879. else
  880. echo shar: Extracting \"'printcap/printers/dg1_lind1.forward'\" \(295 characters\)
  881. sed "s/^X//" >'printcap/printers/dg1_lind1.forward' <<'END_OF_FILE'
  882. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  883. X# The dglpf filter uses the name printer, must be of form "dgxxx"
  884. X# where xxx is destination line printer on dg.
  885. dglpr1|dg1_lind1|dg1|dg-lpr1:\
  886. X    :lp=/dev/null:sd=/usr/spool/lp-dglpr1:\
  887. X    :af=acct:if=/usr/local/new/lib/remotesite -prefix=dg -site=dg:
  888. END_OF_FILE
  889. if test 295 -ne `wc -c <'printcap/printers/dg1_lind1.forward'`; then
  890.     echo shar: \"'printcap/printers/dg1_lind1.forward'\" unpacked with wrong size!
  891. fi
  892. # end of 'printcap/printers/dg1_lind1.forward'
  893. fi
  894. if test -f 'printcap/printers/dg1_lind1.remote' -a "${1}" != "-c" ; then 
  895.   echo shar: Will not clobber existing file \"'printcap/printers/dg1_lind1.remote'\"
  896. else
  897. echo shar: Extracting \"'printcap/printers/dg1_lind1.remote'\" \(184 characters\)
  898. sed "s/^X//" >'printcap/printers/dg1_lind1.remote' <<'END_OF_FILE'
  899. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  900. X# send this to the vax, which forwards to the DG
  901. X# 
  902. dglpr1|dg1_lind1|dg1|dg-lpr1:\
  903. X    :lp=:rm=umn-cs:rp=dglpr1:\
  904. X    :sd=/usr/spool/lp-dglpr1:
  905. END_OF_FILE
  906. if test 184 -ne `wc -c <'printcap/printers/dg1_lind1.remote'`; then
  907.     echo shar: \"'printcap/printers/dg1_lind1.remote'\" unpacked with wrong size!
  908. fi
  909. # end of 'printcap/printers/dg1_lind1.remote'
  910. fi
  911. if test -f 'printcap/printers/dg2_lind25.forward' -a "${1}" != "-c" ; then 
  912.   echo shar: Will not clobber existing file \"'printcap/printers/dg2_lind25.forward'\"
  913. else
  914. echo shar: Extracting \"'printcap/printers/dg2_lind25.forward'\" \(296 characters\)
  915. sed "s/^X//" >'printcap/printers/dg2_lind25.forward' <<'END_OF_FILE'
  916. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  917. X# The dglpf filter uses the name printer, must be of form "dgxxx"
  918. X# where xxx is destination line printer on dg.
  919. dglpr2|dg2_lind25|dg2|dg-lpr2:\
  920. X    :lp=/dev/null:sd=/usr/spool/lp-dglpr2:\
  921. X    :af=acct:if=/usr/local/new/lib/remotesite -prefix=dg -site=dg:
  922. END_OF_FILE
  923. if test 296 -ne `wc -c <'printcap/printers/dg2_lind25.forward'`; then
  924.     echo shar: \"'printcap/printers/dg2_lind25.forward'\" unpacked with wrong size!
  925. fi
  926. # end of 'printcap/printers/dg2_lind25.forward'
  927. fi
  928. if test -f 'printcap/printers/dg2_lind25.remote' -a "${1}" != "-c" ; then 
  929.   echo shar: Will not clobber existing file \"'printcap/printers/dg2_lind25.remote'\"
  930. else
  931. echo shar: Extracting \"'printcap/printers/dg2_lind25.remote'\" \(246 characters\)
  932. sed "s/^X//" >'printcap/printers/dg2_lind25.remote' <<'END_OF_FILE'
  933. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  934. X# The dglpf filter uses the name printer, must be of form "dgxxx"
  935. X# where xxx is destination line printer on dg.
  936. dglpr2|dg2_lind25|dg2|dg-lpr2:\
  937. X    :lp=:rm=umn-cs:rp=dglpr2:\
  938. X    :sd=/usr/spool/lp-dglpr2:
  939. END_OF_FILE
  940. if test 246 -ne `wc -c <'printcap/printers/dg2_lind25.remote'`; then
  941.     echo shar: \"'printcap/printers/dg2_lind25.remote'\" unpacked with wrong size!
  942. fi
  943. # end of 'printcap/printers/dg2_lind25.remote'
  944. fi
  945. if test -f 'printcap/printers/dg3_lind25.forward' -a "${1}" != "-c" ; then 
  946.   echo shar: Will not clobber existing file \"'printcap/printers/dg3_lind25.forward'\"
  947. else
  948. echo shar: Extracting \"'printcap/printers/dg3_lind25.forward'\" \(296 characters\)
  949. sed "s/^X//" >'printcap/printers/dg3_lind25.forward' <<'END_OF_FILE'
  950. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  951. X# The dglpf filter uses the name printer, must be of form "dgxxx"
  952. X# where xxx is destination line printer on dg.
  953. dglpr3|dg3_lind25|dg3|dg-lpr3:\
  954. X    :lp=/dev/null:sd=/usr/spool/lp-dglpr3:\
  955. X    :af=acct:if=/usr/local/new/lib/remotesite -prefix=dg -site=dg:
  956. END_OF_FILE
  957. if test 296 -ne `wc -c <'printcap/printers/dg3_lind25.forward'`; then
  958.     echo shar: \"'printcap/printers/dg3_lind25.forward'\" unpacked with wrong size!
  959. fi
  960. # end of 'printcap/printers/dg3_lind25.forward'
  961. fi
  962. if test -f 'printcap/printers/dg3_lind25.remote' -a "${1}" != "-c" ; then 
  963.   echo shar: Will not clobber existing file \"'printcap/printers/dg3_lind25.remote'\"
  964. else
  965. echo shar: Extracting \"'printcap/printers/dg3_lind25.remote'\" \(246 characters\)
  966. sed "s/^X//" >'printcap/printers/dg3_lind25.remote' <<'END_OF_FILE'
  967. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  968. X# The dglpf filter uses the name printer, must be of form "dgxxx"
  969. X# where xxx is destination line printer on dg.
  970. dglpr3|dg3_lind25|dg3|dg-lpr3:\
  971. X    :lp=:rm=umn-cs:rp=dglpr3:\
  972. X    :sd=/usr/spool/lp-dglpr3:
  973. END_OF_FILE
  974. if test 246 -ne `wc -c <'printcap/printers/dg3_lind25.remote'`; then
  975.     echo shar: \"'printcap/printers/dg3_lind25.remote'\" unpacked with wrong size!
  976. fi
  977. # end of 'printcap/printers/dg3_lind25.remote'
  978. fi
  979. if test -f 'printcap/printers/dgt_lind27.forward' -a "${1}" != "-c" ; then 
  980.   echo shar: Will not clobber existing file \"'printcap/printers/dgt_lind27.forward'\"
  981. else
  982. echo shar: Extracting \"'printcap/printers/dgt_lind27.forward'\" \(317 characters\)
  983. sed "s/^X//" >'printcap/printers/dgt_lind27.forward' <<'END_OF_FILE'
  984. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  985. X# The dglpf filter uses the name printer, must be of form "dgxxx"
  986. X# where xxx is destination line printer on dg.
  987. dglpt|dgt_lind27|dgt|dg-lprt|dglprt|dg-lpt|lprt|lpt:\
  988. X    :lp=/dev/null:sd=/usr/spool/lp-dglpt:\
  989. X    :af=acct:if=/usr/local/new/lib/remotesite -prefix=dg -site=dg:
  990. END_OF_FILE
  991. if test 317 -ne `wc -c <'printcap/printers/dgt_lind27.forward'`; then
  992.     echo shar: \"'printcap/printers/dgt_lind27.forward'\" unpacked with wrong size!
  993. fi
  994. # end of 'printcap/printers/dgt_lind27.forward'
  995. fi
  996. if test -f 'printcap/printers/dgt_lind27.remote' -a "${1}" != "-c" ; then 
  997.   echo shar: Will not clobber existing file \"'printcap/printers/dgt_lind27.remote'\"
  998. else
  999. echo shar: Extracting \"'printcap/printers/dgt_lind27.remote'\" \(266 characters\)
  1000. sed "s/^X//" >'printcap/printers/dgt_lind27.remote' <<'END_OF_FILE'
  1001. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  1002. X# The dglpf filter uses the name printer, must be of form "dgxxx"
  1003. X# where xxx is destination line printer on dg.
  1004. dglpt|dgt_lind27|dgt|dg-lprt|dglprt|dg-lpt|lprt|lpt:\
  1005. X    :lp=:rm=umn-cs:rp=dglpt:\
  1006. X    :sd=/usr/spool/lp-dglpt:
  1007. END_OF_FILE
  1008. if test 266 -ne `wc -c <'printcap/printers/dgt_lind27.remote'`; then
  1009.     echo shar: \"'printcap/printers/dgt_lind27.remote'\" unpacked with wrong size!
  1010. fi
  1011. # end of 'printcap/printers/dgt_lind27.remote'
  1012. fi
  1013. if test -f 'printcap/printers/diablo_lind136.local' -a "${1}" != "-c" ; then 
  1014.   echo shar: Will not clobber existing file \"'printcap/printers/diablo_lind136.local'\"
  1015. else
  1016. echo shar: Extracting \"'printcap/printers/diablo_lind136.local'\" \(217 characters\)
  1017. sed "s/^X//" >'printcap/printers/diablo_lind136.local' <<'END_OF_FILE'
  1018. X# Diablo 630 printer
  1019. X# Wed Dec  9 11:01:09 CST 1987
  1020. X# Paper Feed Option
  1021. diablo_lind136|lp2|lind136|diablo:\
  1022. X    :sc:sf:\
  1023. X    :lp=/dev/lp2:br#1200:sd=/usr/spool/lp-lpd2:\
  1024. X    :if=/usr/local/lib/dpf:fc#00010:fs#00022:xs#040000:
  1025. END_OF_FILE
  1026. if test 217 -ne `wc -c <'printcap/printers/diablo_lind136.local'`; then
  1027.     echo shar: \"'printcap/printers/diablo_lind136.local'\" unpacked with wrong size!
  1028. fi
  1029. # end of 'printcap/printers/diablo_lind136.local'
  1030. fi
  1031. if test -f 'printcap/printers/diablo_lind136.remote' -a "${1}" != "-c" ; then 
  1032.   echo shar: Will not clobber existing file \"'printcap/printers/diablo_lind136.remote'\"
  1033. else
  1034. echo shar: Extracting \"'printcap/printers/diablo_lind136.remote'\" \(168 characters\)
  1035. sed "s/^X//" >'printcap/printers/diablo_lind136.remote' <<'END_OF_FILE'
  1036. X# Diablo 630
  1037. X# Wed Dec  9 11:00:22 CST 1987 Patrick Powell
  1038. X# Remote
  1039. diablo_lind136|lp2|lind136|diablo:\
  1040. X        :lp=:rm=umn-cs:rp=lp2:\
  1041. X        :sd=/usr/spool/lp-lpd2:
  1042. END_OF_FILE
  1043. if test 168 -ne `wc -c <'printcap/printers/diablo_lind136.remote'`; then
  1044.     echo shar: \"'printcap/printers/diablo_lind136.remote'\" unpacked with wrong size!
  1045. fi
  1046. # end of 'printcap/printers/diablo_lind136.remote'
  1047. fi
  1048. if test -f 'printcap/printers/epson_lind27.remote' -a "${1}" != "-c" ; then 
  1049.   echo shar: Will not clobber existing file \"'printcap/printers/epson_lind27.remote'\"
  1050. else
  1051. echo shar: Extracting \"'printcap/printers/epson_lind27.remote'\" \(128 characters\)
  1052. sed "s/^X//" >'printcap/printers/epson_lind27.remote' <<'END_OF_FILE'
  1053. X#
  1054. X# Entry for the EPSON printer
  1055. X# - attached to CRUDO
  1056. X# - serial line, 9600 BPS
  1057. X# - etc...
  1058. epson_lind27|epson:\
  1059. X    :lp=/dev/null:
  1060. END_OF_FILE
  1061. if test 128 -ne `wc -c <'printcap/printers/epson_lind27.remote'`; then
  1062.     echo shar: \"'printcap/printers/epson_lind27.remote'\" unpacked with wrong size!
  1063. fi
  1064. # end of 'printcap/printers/epson_lind27.remote'
  1065. fi
  1066. if test -f 'printcap/printers/hp2563_lind25.forward' -a "${1}" != "-c" ; then 
  1067.   echo shar: Will not clobber existing file \"'printcap/printers/hp2563_lind25.forward'\"
  1068. else
  1069. echo shar: Extracting \"'printcap/printers/hp2563_lind25.forward'\" \(302 characters\)
  1070. sed "s/^X//" >'printcap/printers/hp2563_lind25.forward' <<'END_OF_FILE'
  1071. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  1072. X# The hp filter uses the name printer, must be of form "dgxxx"
  1073. X# where xxx is destination line printer on dg.
  1074. hplp2563|hp2563_lind25|hp3|hpline:\
  1075. X    :sc:sf:\
  1076. X    :lp=/dev/null:sd=/usr/spool/lp-hplp3:\
  1077. X    :if=/usr/local/new/lib/remotesite -prefix=hp -site=donald:
  1078. END_OF_FILE
  1079. if test 302 -ne `wc -c <'printcap/printers/hp2563_lind25.forward'`; then
  1080.     echo shar: \"'printcap/printers/hp2563_lind25.forward'\" unpacked with wrong size!
  1081. fi
  1082. # end of 'printcap/printers/hp2563_lind25.forward'
  1083. fi
  1084. if test -f 'printcap/printers/hp2563_lind25.remote' -a "${1}" != "-c" ; then 
  1085.   echo shar: Will not clobber existing file \"'printcap/printers/hp2563_lind25.remote'\"
  1086. else
  1087. echo shar: Extracting \"'printcap/printers/hp2563_lind25.remote'\" \(251 characters\)
  1088. sed "s/^X//" >'printcap/printers/hp2563_lind25.remote' <<'END_OF_FILE'
  1089. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  1090. X# The hp filter uses the name printer, must be of form "dgxxx"
  1091. X# where xxx is destination line printer on dg.
  1092. hplp2563|hp2563_lind25|hp3|hpline:\
  1093. X    :lp=:rm=umn-cs:rp=hplp2563:\
  1094. X    :sd=/usr/spool/lp-hplp2563:
  1095. END_OF_FILE
  1096. if test 251 -ne `wc -c <'printcap/printers/hp2563_lind25.remote'`; then
  1097.     echo shar: \"'printcap/printers/hp2563_lind25.remote'\" unpacked with wrong size!
  1098. fi
  1099. # end of 'printcap/printers/hp2563_lind25.remote'
  1100. fi
  1101. if test -f 'printcap/printers/hp_lind54.forward' -a "${1}" != "-c" ; then 
  1102.   echo shar: Will not clobber existing file \"'printcap/printers/hp_lind54.forward'\"
  1103. else
  1104. echo shar: Extracting \"'printcap/printers/hp_lind54.forward'\" \(137 characters\)
  1105. sed "s/^X//" >'printcap/printers/hp_lind54.forward' <<'END_OF_FILE'
  1106. X#
  1107. X# Send this using uux
  1108. hp_lind54|hp1|grad|john|johnpr:\
  1109. X    :sc:sf:\
  1110. X    :lp=/dev/null:sd=/usr/spool/lp-johnpr:\
  1111. X    :if=/usr/local/lib/johnlpf:
  1112. END_OF_FILE
  1113. if test 137 -ne `wc -c <'printcap/printers/hp_lind54.forward'`; then
  1114.     echo shar: \"'printcap/printers/hp_lind54.forward'\" unpacked with wrong size!
  1115. fi
  1116. # end of 'printcap/printers/hp_lind54.forward'
  1117. fi
  1118. if test -f 'printcap/printers/hp_lind54.remote' -a "${1}" != "-c" ; then 
  1119.   echo shar: Will not clobber existing file \"'printcap/printers/hp_lind54.remote'\"
  1120. else
  1121. echo shar: Extracting \"'printcap/printers/hp_lind54.remote'\" \(118 characters\)
  1122. sed "s/^X//" >'printcap/printers/hp_lind54.remote' <<'END_OF_FILE'
  1123. X#
  1124. X# Send this using uux
  1125. hp_lind54|hp1|grad|john|johnpr:\
  1126. X    :lp=:rm=umn-cs:rp=hp_lind54:\
  1127. X    :sd=/usr/spool/lp-hp_lind54:
  1128. END_OF_FILE
  1129. if test 118 -ne `wc -c <'printcap/printers/hp_lind54.remote'`; then
  1130.     echo shar: \"'printcap/printers/hp_lind54.remote'\" unpacked with wrong size!
  1131. fi
  1132. # end of 'printcap/printers/hp_lind54.remote'
  1133. fi
  1134. if test -f 'printcap/printers/imagen_lind27.local' -a "${1}" != "-c" ; then 
  1135.   echo shar: Will not clobber existing file \"'printcap/printers/imagen_lind27.local'\"
  1136. else
  1137. echo shar: Extracting \"'printcap/printers/imagen_lind27.local'\" \(1660 characters\)
  1138. sed "s/^X//" >'printcap/printers/imagen_lind27.local' <<'END_OF_FILE'
  1139. X# printcap file created  Sat Dec 5 07:22:16 CST 1987
  1140. X# printcap file created  Wed Dec 2 09:02:43 CST 1987
  1141. X#
  1142. X# imagen_* : good for all imagens
  1143. X#    Mon Nov 30 14:34:28 CST 1987 Patrick Powell - Created
  1144. X#    Wed Dec  2 08:58:42 CST 1987 Patrick Powell - fx and -d flags for filters
  1145. X#    Sat Dec  5 20:07:12 CST 1987 Patrick Powell - sc and sf, dimp.old
  1146. X#        Note: uses the UMN imfilter 
  1147. X#    NOTE: the imagen software uses the name of the accounting file "af"
  1148. X#    to determine what device it is to use.  You MUST have an AF entry
  1149. X# -- fx sets the allowable formats: just about all right now
  1150. X# -- sc suppresses copies; sf no form feeds;
  1151. X# -- lp, af, sd are the device, accounting and spool; defaults for lock and log
  1152. X# -- br is bitrate, fc/fs are clear/set bits for ioctl.  Magic values
  1153. X# -- af-zf are filters; -v (verbose) option logs a message in log file
  1154. X# -- note the -Ddimp.old uses old dimp, in /usr/local/new/bin/dimp.old
  1155. X# -- note the -Ddimp.new uses new dimp;  this allows both to be available.
  1156. X#    The typeset command will temporarily use the -Fx format.
  1157. imagen_lind27|cs-imagen|csimagen|csi|imagen:\
  1158. X    :fx=cdginfrvt:\
  1159. X    :sc:sf:\
  1160. X    :lp=/dev/lp4:\
  1161. X    :af=cs-imagen:\
  1162. X    :sd=/usr/spool/lp-cs-imagen:\
  1163. X    :br#19200:\
  1164. X    :fc#0177777:\
  1165. X    :fs#040:\
  1166. X    :cf=/usr/local/new/lib/icif -v:\
  1167. X    :df=/usr/local/new/lib/idvi -v:\
  1168. X    :gf=/usr/local/new/lib/igraph -v:\
  1169. X    :if=/usr/local/new/lib/ipf -v:\
  1170. X    :nf=/usr/local/new/lib/idimp -v -Ddimp.old:\
  1171. X    :rf=/usr/local/new/lib/ifort -v:\
  1172. X    :tf=/usr/local/new/lib/icat -v:\
  1173. X    :vf=/usr/local/new/lib/imp -v:\
  1174. X    :xf=/usr/local/new/lib/idimp -v -Ddimp.new:\
  1175. X    :mx#10000:\
  1176. X    :pl#60:\
  1177. X    :pw#80:\
  1178. X    :px#2016:\
  1179. X    :py#2624:\
  1180. X    :rw:\
  1181. X    :sb=U of M CSci Department:\
  1182. X    :S:\
  1183. X    :sh:
  1184. END_OF_FILE
  1185. if test 1660 -ne `wc -c <'printcap/printers/imagen_lind27.local'`; then
  1186.     echo shar: \"'printcap/printers/imagen_lind27.local'\" unpacked with wrong size!
  1187. fi
  1188. # end of 'printcap/printers/imagen_lind27.local'
  1189. fi
  1190. if test -f 'printcap/printers/imagen_lind27.remote' -a "${1}" != "-c" ; then 
  1191.   echo shar: Will not clobber existing file \"'printcap/printers/imagen_lind27.remote'\"
  1192. else
  1193. echo shar: Extracting \"'printcap/printers/imagen_lind27.remote'\" \(249 characters\)
  1194. sed "s/^X//" >'printcap/printers/imagen_lind27.remote' <<'END_OF_FILE'
  1195. X# Remote connection to imagen_lind27
  1196. X# currently on umn-cs
  1197. X# Tue Dec  1 08:10:28 CST 1987 Patrick Powell - Created
  1198. X#
  1199. imagen_lind27|cs-imagen|csimagen|csi|imagen:\
  1200. X    :fx=cdginfrvt:\
  1201. X    :sd=/usr/spool/lp-imagen_lind27:\
  1202. X    :lp=:rm=umn-cs:rp=imagen_lind27:
  1203. END_OF_FILE
  1204. if test 249 -ne `wc -c <'printcap/printers/imagen_lind27.remote'`; then
  1205.     echo shar: \"'printcap/printers/imagen_lind27.remote'\" unpacked with wrong size!
  1206. fi
  1207. # end of 'printcap/printers/imagen_lind27.remote'
  1208. fi
  1209. if test -f 'printcap/printers/laserjetplus_lind25.forward' -a "${1}" != "-c" ; then 
  1210.   echo shar: Will not clobber existing file \"'printcap/printers/laserjetplus_lind25.forward'\"
  1211. else
  1212. echo shar: Extracting \"'printcap/printers/laserjetplus_lind25.forward'\" \(313 characters\)
  1213. sed "s/^X//" >'printcap/printers/laserjetplus_lind25.forward' <<'END_OF_FILE'
  1214. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  1215. X# The hp filter uses the name printer, must be of form "dgxxx"
  1216. X# where xxx is destination line printer on dg.
  1217. hplp|laserjetplus_lind25|laserjet|hp2|hplaser:\
  1218. X    :sc:sf:\
  1219. X    :lp=/dev/null:sd=/usr/spool/lp-hplp:\
  1220. X    :if=/usr/local/new/lib/remotesite -prefix=hp -site=donald:
  1221. END_OF_FILE
  1222. if test 313 -ne `wc -c <'printcap/printers/laserjetplus_lind25.forward'`; then
  1223.     echo shar: \"'printcap/printers/laserjetplus_lind25.forward'\" unpacked with wrong size!
  1224. fi
  1225. # end of 'printcap/printers/laserjetplus_lind25.forward'
  1226. fi
  1227. if test -f 'printcap/printers/laserjetplus_lind25.remote' -a "${1}" != "-c" ; then 
  1228.   echo shar: Will not clobber existing file \"'printcap/printers/laserjetplus_lind25.remote'\"
  1229. else
  1230. echo shar: Extracting \"'printcap/printers/laserjetplus_lind25.remote'\" \(255 characters\)
  1231. sed "s/^X//" >'printcap/printers/laserjetplus_lind25.remote' <<'END_OF_FILE'
  1232. X# Tue Dec  1 19:38:11 CST 1987 Patrick Powell
  1233. X# The hp filter uses the name printer, must be of form "dgxxx"
  1234. X# where xxx is destination line printer on dg.
  1235. hplp|laserjetplus_lind25|laserjet|hp2|hplaser:\
  1236. X    :lp=:rm=umn-cs:rp=hplp:\
  1237. X    :sd=/usr/spool/lp-hplp:
  1238. END_OF_FILE
  1239. if test 255 -ne `wc -c <'printcap/printers/laserjetplus_lind25.remote'`; then
  1240.     echo shar: \"'printcap/printers/laserjetplus_lind25.remote'\" unpacked with wrong size!
  1241. fi
  1242. # end of 'printcap/printers/laserjetplus_lind25.remote'
  1243. fi
  1244. if test ! -d 'src' ; then
  1245.     echo shar: Creating directory \"'src'\"
  1246.     mkdir 'src'
  1247. fi
  1248. if test -f 'src/IDENT' -a "${1}" != "-c" ; then 
  1249.   echo shar: Will not clobber existing file \"'src/IDENT'\"
  1250. else
  1251. echo shar: Extracting \"'src/IDENT'\" \(900 characters\)
  1252. sed "s/^X//" >'src/IDENT' <<'END_OF_FILE'
  1253. X/***************************************************************************
  1254. X * U. Minnesota LPD Software * Copyright 1987, 1988, Patrick Powell
  1255. X ***************************************************************************
  1256. X * MODULE: 
  1257. X ***************************************************************************
  1258. X * Revision History: Created
  1259. X
  1260. X * $Log:    IDENT,v $
  1261. X# Revision 3.1  88/06/18  09:33:47  papowell
  1262. X# Version 3.0- Distributed Sat Jun 18 1988
  1263. X# 
  1264. X# Revision 3.0  88/06/18  09:29:58  papowell
  1265. X# Version 3.0- Distributed Sat Jun 18 1988
  1266. X# 
  1267. X# Revision 2.1  88/05/09  10:07:18  papowell
  1268. X# PLP: Released Version
  1269. X# 
  1270. X# Revision 1.1  88/03/25  14:57:20  papowell
  1271. X# Initial revision
  1272. X# 
  1273. X ***************************************************************************/
  1274. X#ifndef lint
  1275. static char id_str1[] =
  1276. X    "$Header: IDENT,v 3.1 88/06/18 09:33:47 papowell Exp $ PLP Copyright 1988 Patrick Powell";
  1277. X#endif lint
  1278. END_OF_FILE
  1279. if test 900 -ne `wc -c <'src/IDENT'`; then
  1280.     echo shar: \"'src/IDENT'\" unpacked with wrong size!
  1281. fi
  1282. # end of 'src/IDENT'
  1283. fi
  1284. if test -f 'src/README' -a "${1}" != "-c" ; then 
  1285.   echo shar: Will not clobber existing file \"'src/README'\"
  1286. else
  1287. echo shar: Extracting \"'src/README'\" \(1678 characters\)
  1288. sed "s/^X//" >'src/README' <<'END_OF_FILE'
  1289. X/***************************************************************************
  1290. X * U. Minnesota LPD Software * Copyright 1987, 1988, Patrick Powell
  1291. X ***************************************************************************
  1292. X * MODULE: src/README
  1293. X * Comments about the use of the LPD software
  1294. X ***************************************************************************
  1295. X * Revision History
  1296. X ***************************************************************************/
  1297. This directory contains the source  of the LPD software.
  1298. This software is functionally  compatible with the 1983 Berkeley LPD software,
  1299. but with enhanced capabilites.  See  "U-MN LPD Installation Guide"
  1300. in the ../doc directory.
  1301. X
  1302. To install the software,  you should do the following:
  1303. X1. make a ../bin directory
  1304. X2. copy the src/Makefile to ../bin and edit it to reflect your system
  1305. X3. run the Makefile in ../bin
  1306. X
  1307. You will probably want to construct a test version first;  this version uses
  1308. X/tmp/printcap instead of /etc/printcap,  and does NOT repeat NOT run as
  1309. SUID root.  You generate this version by setting the XPERIMENT flag in
  1310. the Makefile.  The ../test directory has some test versions of /etc/printcap
  1311. that it will install;  see the Makefile and README in ../test for details.
  1312. X
  1313. XExcept for a few specified pieces of code that do banner printing and
  1314. some network connection code,  all of the PLP software was written from
  1315. a VERY high level description of the Berkeley LPD software.  Due to the
  1316. authors familiarity with the Berkeley LPD software,  some names and algorithms
  1317. are the same (why invent a new square wheel?), but in general there is
  1318. little commonality between implementations of the two programs.
  1319. END_OF_FILE
  1320. if test 1678 -ne `wc -c <'src/README'`; then
  1321.     echo shar: \"'src/README'\" unpacked with wrong size!
  1322. fi
  1323. # end of 'src/README'
  1324. fi
  1325. if test -f 'src/patchlevel.h' -a "${1}" != "-c" ; then 
  1326.   echo shar: Will not clobber existing file \"'src/patchlevel.h'\"
  1327. else
  1328. echo shar: Extracting \"'src/patchlevel.h'\" \(4 characters\)
  1329. sed "s/^X//" >'src/patchlevel.h' <<'END_OF_FILE'
  1330. X3.2
  1331. END_OF_FILE
  1332. if test 4 -ne `wc -c <'src/patchlevel.h'`; then
  1333.     echo shar: \"'src/patchlevel.h'\" unpacked with wrong size!
  1334. fi
  1335. # end of 'src/patchlevel.h'
  1336. fi
  1337. if test -f 'src/setstatus.c' -a "${1}" != "-c" ; then 
  1338.   echo shar: Will not clobber existing file \"'src/setstatus.c'\"
  1339. else
  1340. echo shar: Extracting \"'src/setstatus.c'\" \(1673 characters\)
  1341. sed "s/^X//" >'src/setstatus.c' <<'END_OF_FILE'
  1342. X/***************************************************************************
  1343. X * U. Minnesota LPD Software * Copyright 1987, 1988, Patrick Powell
  1344. X ***************************************************************************
  1345. X * MODULE: setstatus.c
  1346. X * Set the lpd status into a status file
  1347. X ***************************************************************************
  1348. X * Revision History: Created Sat Jan  9 14:49:44 CST 1988
  1349. X * $Log:    setstatus.c,v $
  1350. X * Revision 3.1  88/06/18  09:35:43  papowell
  1351. X * Version 3.0- Distributed Sat Jun 18 1988
  1352. X * 
  1353. X * Revision 2.1  88/05/09  10:10:21  papowell
  1354. X * PLP: Released Version
  1355. X * 
  1356. X * Revision 1.3  88/04/06  12:13:37  papowell
  1357. X * Minor updates, changes in error message formats.
  1358. X * Elimination of the AF_UNIX connections, use AF_INET only.
  1359. X * Better error messages.
  1360. X * 
  1361. X * Revision 1.2  88/03/12  10:03:36  papowell
  1362. X * *** empty log message ***
  1363. X * 
  1364. X * Revision 1.1  88/03/01  11:09:18  papowell
  1365. X * Initial revision
  1366. X * 
  1367. X ***************************************************************************/
  1368. X#ifndef lint
  1369. static char id_str1[] =
  1370. X    "$Header: setstatus.c,v 3.1 88/06/18 09:35:43 papowell Exp $ PLP Copyright 1988 Patrick Powell";
  1371. X#endif lint
  1372. X
  1373. X#include "lp.h"
  1374. X
  1375. X/*VARARGS1*/
  1376. setstatus(msg, a1, a2, a3, a4, a5)
  1377. X    char *msg;
  1378. X{
  1379. X    int fd, i;        /* ACME Buggy Whip and Integers, Inc. */
  1380. X    char buf[BUFSIZ];
  1381. X
  1382. X    if( ST && *ST ){
  1383. X        if( (fd = Exlockcf( ST )) < 0 ){
  1384. X            logerr(XLOG_INFO, "setstatus: cannot open %s", ST);
  1385. X        } else {
  1386. X            (void)sprintf(buf, msg, a1, a2, a3, a4, a5);
  1387. X            (void)strcat(buf, "\n" );
  1388. X            i = strlen(buf);
  1389. X            if( write( fd, buf, i ) != i ){
  1390. X                logerr(XLOG_INFO, "setstatus: write error %s", ST);
  1391. X            }
  1392. X            (void)close(fd);
  1393. X        }
  1394. X    }
  1395. X}
  1396. END_OF_FILE
  1397. if test 1673 -ne `wc -c <'src/setstatus.c'`; then
  1398.     echo shar: \"'src/setstatus.c'\" unpacked with wrong size!
  1399. fi
  1400. # end of 'src/setstatus.c'
  1401. fi
  1402. if test -f 'src/setup_test.c' -a "${1}" != "-c" ; then 
  1403.   echo shar: Will not clobber existing file \"'src/setup_test.c'\"
  1404. else
  1405. echo shar: Extracting \"'src/setup_test.c'\" \(1478 characters\)
  1406. sed "s/^X//" >'src/setup_test.c' <<'END_OF_FILE'
  1407. X/***************************************************************************
  1408. X * U. Minnesota LPD Software * Copyright 1987, 1988, Patrick Powell
  1409. X ***************************************************************************
  1410. X * MODULE: setup_test.c
  1411. X * sets the test version of things
  1412. X ***************************************************************************
  1413. X * Revision History: Created Sun Jan 31 06:09:35 CST 1988
  1414. X * $Log:    setup_test.c,v $
  1415. X * Revision 3.1  88/06/18  09:35:47  papowell
  1416. X * Version 3.0- Distributed Sat Jun 18 1988
  1417. X * 
  1418. X * Revision 2.2  88/05/14  10:21:07  papowell
  1419. X * Modified -X flag handling
  1420. X * 
  1421. X * Revision 2.1  88/05/09  10:10:27  papowell
  1422. X * PLP: Released Version
  1423. X * 
  1424. X * Revision 1.4  88/04/27  20:27:20  papowell
  1425. X * Modified to remove unused variables
  1426. X * 
  1427. X * Revision 1.3  88/04/07  12:31:00  papowell
  1428. X * 
  1429. X * Revision 1.2  88/03/11  19:29:38  papowell
  1430. X * Minor Changes, Updates
  1431. X * 
  1432. X * Revision 1.1  88/03/01  11:09:21  papowell
  1433. X * Initial revision
  1434. X * 
  1435. X ***************************************************************************/
  1436. X#ifndef lint
  1437. static char id_str1[] =
  1438. X    "$Header: setup_test.c,v 3.1 88/06/18 09:35:47 papowell Exp $ PLP Copyright 1988 Patrick Powell";
  1439. X#endif lint
  1440. X
  1441. X#include "lp.h"
  1442. X
  1443. Setup_test()
  1444. X{
  1445. X    (void)strcpy( Lpdlogf, TDEFLPDLOGF );
  1446. X    (void)strcpy( Masterlock, TMASTERLOCK );
  1447. X    Maxportno = TMAXPORTNO;
  1448. X    Minportno = TMINPORTNO;
  1449. X    (void)strcpy( Permfile, TPERMFILE );
  1450. X    (void)strcpy( Printcap, TPRINTCAP );
  1451. X    Lpr_port_num = htons( TPORTNUM );
  1452. X}
  1453. END_OF_FILE
  1454. if test 1478 -ne `wc -c <'src/setup_test.c'`; then
  1455.     echo shar: \"'src/setup_test.c'\" unpacked with wrong size!
  1456. fi
  1457. # end of 'src/setup_test.c'
  1458. fi
  1459. if test ! -d 'test' ; then
  1460.     echo shar: Creating directory \"'test'\"
  1461.     mkdir 'test'
  1462. fi
  1463. if test -f 'test/Makefile' -a "${1}" != "-c" ; then 
  1464.   echo shar: Will not clobber existing file \"'test/Makefile'\"
  1465. else
  1466. echo shar: Extracting \"'test/Makefile'\" \(1719 characters\)
  1467. sed "s/^X//" >'test/Makefile' <<'END_OF_FILE'
  1468. X# Makefile to set up /tmp directories for testing
  1469. X# Tue Mar  8 11:49:43 CST 1988 Patrick Powell
  1470. X# This Makefile assumes that ${BIN}/checkpc exists, as it uses it
  1471. X# $Header: Makefile,v 3.2 88/06/29 09:35:30 papowell Locked $
  1472. X# $Log:    Makefile,v $
  1473. X# Revision 3.2  88/06/29  09:35:30  papowell
  1474. X# fixed clean entry
  1475. X# 
  1476. X# Revision 3.1  88/06/18  09:56:25  papowell
  1477. X# Version 3.0- Distributed Sat Jun 18 1988
  1478. X# 
  1479. X# Revision 2.1  88/05/09  10:15:57  papowell
  1480. X# *** empty log message ***
  1481. X# 
  1482. X#
  1483. X#  The following entries are available:
  1484. X# 1. make bin - will make the binaries, install them in temp
  1485. X# 2. make test1 - creates a printcap, runs ${BIN}/checkpc on it.
  1486. X#     This is the first level test printcap
  1487. X# 3. make test2 - creates a printcap, runs ${BIN}/checkpc on it.
  1488. X#     This is a second, more complex printcap
  1489. X# The HOST is the name of the local host, should be full (see printer_perms)
  1490. X# The USER is the name of the local user
  1491. X
  1492. HOST=attila.cs.umn.edu
  1493. USER=papowell
  1494. BIN=../bin/
  1495. LEVEL=1
  1496. TMP=/huge/tmp/
  1497. X
  1498. help:
  1499. X    @echo "uses the HOST and USER environment variables unless overridden"
  1500. X    @echo "make bin, make test1, make test1"
  1501. X    exit 1
  1502. pc:
  1503. X    sed -e s/HOST/${HOST}/ -e 's/^#[0-$(LEVEL)]//' -e "s:TMP:${TMP}:g" \
  1504. X        printcap.proto  >${TMP}printcap.${HOST}
  1505. X    ${BIN}/checkpc -X -f -l
  1506. perms:
  1507. X    sed -e s/HOST/${HOST}/ -e s/USER/${USER}/ printer_perms.proto \
  1508. X         >${TMP}printer_perms.${HOST}
  1509. test1:
  1510. X    make LEVEL=1 TMP=${TMP} HOST=${HOST} pc
  1511. test2:
  1512. X    make LEVEL=2 TMP=${TMP} HOST=${HOST} pc
  1513. test3:
  1514. X    make LEVEL=3 TMP=${TMP} HOST=${HOST} pc
  1515. test4:
  1516. X    make LEVEL=4 TMP=${TMP} HOST=${HOST} pc
  1517. X
  1518. bin: perms
  1519. X    install -c -m 755 filter.sh ${TMP}filter
  1520. X    install -c -m 755 qh.sh ${TMP}qh
  1521. X    cc -o ${TMP}lpf -DDEBUG ../filters/main.c
  1522. clean:
  1523. X    -rm -f *.o core lpf
  1524. END_OF_FILE
  1525. if test 1719 -ne `wc -c <'test/Makefile'`; then
  1526.     echo shar: \"'test/Makefile'\" unpacked with wrong size!
  1527. fi
  1528. # end of 'test/Makefile'
  1529. fi
  1530. if test -f 'test/README' -a "${1}" != "-c" ; then 
  1531.   echo shar: Will not clobber existing file \"'test/README'\"
  1532. else
  1533. echo shar: Extracting \"'test/README'\" \(1163 characters\)
  1534. sed "s/^X//" >'test/README' <<'END_OF_FILE'
  1535. Tue Nov 17 21:57:02 CST 1987 Patrick Powell
  1536. X
  1537. The files in this directory are intended to be used with the
  1538. X-DXPERIMENT option of the lpd source.
  1539. See the "PLP Reference Manual, Section 13" (what else?) for details
  1540. on how to run the tests.
  1541. X
  1542. The files in test/ are sufficient to install a mini-lpd system.
  1543. It operates out of /tmp, and does not need to be owned by root.
  1544. X
  1545. X-- you must change the HOST and USER entries in Makefile so that
  1546. X   the correct ones are installed.
  1547. X
  1548. The "make bin" will create and install a couple of nice
  1549. debugging oriented filters.
  1550. X
  1551. The filter shell script is used as a filter, and has  a
  1552. of interesting options;  the -delayNNN option delays NNN
  1553. seconds before terminating;  you can specifiy a this in the
  1554. printcap file,  say as:
  1555. X    :of=/tmp/filter -delay30:
  1556. and the filter will delay 30 seconds after starting.
  1557. X
  1558. In order to verify that error handling is being handled correctly,
  1559. the -errorNNN will terminate (after a -delayNNN)
  1560. with a error NNN.
  1561. X
  1562. I suggest that you also look at the ../filter/lpf.c program
  1563. for some hints on how to write filters,  if you are feeling
  1564. masochistic.
  1565. X
  1566. Patrick ("Document? what is theese batsheet document?") Powell
  1567. END_OF_FILE
  1568. if test 1163 -ne `wc -c <'test/README'`; then
  1569.     echo shar: \"'test/README'\" unpacked with wrong size!
  1570. fi
  1571. # end of 'test/README'
  1572. fi
  1573. if test -f 'test/filter.sh' -a "${1}" != "-c" ; then 
  1574.   echo shar: Will not clobber existing file \"'test/filter.sh'\"
  1575. else
  1576. echo shar: Extracting \"'test/filter.sh'\" \(755 characters\)
  1577. sed "s/^X//" >'test/filter.sh' <<'END_OF_FILE'
  1578. X#!/bin/sh
  1579. X#    Filter Dummy Test
  1580. X# $Header: filter.sh,v 3.1 88/06/18 09:56:26 papowell Exp $
  1581. X# $Log:    filter.sh,v $
  1582. X# Revision 3.1  88/06/18  09:56:26  papowell
  1583. X# Version 3.0- Distributed Sat Jun 18 1988
  1584. X# 
  1585. PATH=/bin:/usr/bin
  1586. echo $0 $* 1>&2
  1587. echo "pwd " `/bin/pwd`  1>&2
  1588. delay=0
  1589. for i in $*
  1590. do
  1591. X    case $i in
  1592. X        -delay*) delay=`echo $i |sed -e 's/-delay//'` ;;
  1593. X        -error*) error=`echo $i |sed -e 's/-error//'` ;;
  1594. X        -*) ;;
  1595. X        *) file=$i ;;
  1596. X    esac
  1597. done
  1598. if test -n "$file";
  1599. X    then echo $0 $* >>$file
  1600. X    else echo "--- NO Accounting File ---" 1>&2
  1601. fi
  1602. X# echo information into output
  1603. echo $0 $*
  1604. X# wait a minute to simulate the delay
  1605. if test $delay -ne 0 ; then sleep $delay; fi;
  1606. X# exit with error status
  1607. if test -n "$error";
  1608. then
  1609. X    exit $error;
  1610. fi;
  1611. X# pump stdin to stdout
  1612. cat
  1613. END_OF_FILE
  1614. if test 755 -ne `wc -c <'test/filter.sh'`; then
  1615.     echo shar: \"'test/filter.sh'\" unpacked with wrong size!
  1616. fi
  1617. chmod +x 'test/filter.sh'
  1618. # end of 'test/filter.sh'
  1619. fi
  1620. if test -f 'test/linetest.c' -a "${1}" != "-c" ; then 
  1621.   echo shar: Will not clobber existing file \"'test/linetest.c'\"
  1622. else
  1623. echo shar: Extracting \"'test/linetest.c'\" \(879 characters\)
  1624. sed "s/^X//" >'test/linetest.c' <<'END_OF_FILE'
  1625. X/*
  1626. X * linetest: print the rolling banner pattern
  1627. X * linetest [width]
  1628. X * Sat Jun 18 09:47:06 CDT 1988 Patrick Powell
  1629. X * $Log:    linetest.c,v $
  1630. X * Revision 3.1  88/06/18  09:56:27  papowell
  1631. X * Version 3.0- Distributed Sat Jun 18 1988
  1632. X * 
  1633. X */
  1634. X#include <stdio.h>
  1635. X#include <ctype.h>
  1636. static char id_str1[] =
  1637. X    "$Header: linetest.c,v 3.1 88/06/18 09:56:27 papowell Exp $ PLP Copyright 1988 Patrick Powell";
  1638. char *Name;
  1639. X
  1640. main(argc, argv)
  1641. X    int argc;
  1642. X    char **argv;
  1643. X{
  1644. X    int width = 132;
  1645. X    int i,j;
  1646. X
  1647. X    Name = argv[0];
  1648. X    if( argc > 2 || argc < 1 ){
  1649. X        usage();
  1650. X    }
  1651. X    if( argc == 2 ){
  1652. X        i = atoi( argv[1] );
  1653. X        if( i != 0 ){
  1654. X            width = i;
  1655. X        } else {
  1656. X            usage();
  1657. X        }
  1658. X    }
  1659. X    
  1660. X    i = ' ';
  1661. X    while(1){
  1662. X        for( j = 0; j < width; ++j ){
  1663. X            if( !isprint(i) || isspace(i) ){
  1664. X                i = 'A';
  1665. X            }
  1666. X            putchar( i );
  1667. X            i = i + 1;
  1668. X        }
  1669. X        putchar( '\n' );
  1670. X    }
  1671. X}
  1672. X
  1673. usage()
  1674. X{
  1675. X    fprintf( stderr, "%s [width]\n", Name );
  1676. X    exit( 0 );
  1677. X}
  1678. END_OF_FILE
  1679. if test 879 -ne `wc -c <'test/linetest.c'`; then
  1680.     echo shar: \"'test/linetest.c'\" unpacked with wrong size!
  1681. fi
  1682. # end of 'test/linetest.c'
  1683. fi
  1684. if test -f 'test/printcap.proto' -a "${1}" != "-c" ; then 
  1685.   echo shar: Will not clobber existing file \"'test/printcap.proto'\"
  1686. else
  1687. echo shar: Extracting \"'test/printcap.proto'\" \(1028 characters\)
  1688. sed "s/^X//" >'test/printcap.proto' <<'END_OF_FILE'
  1689. X#1#
  1690. X#1# TEST Printcap Files.
  1691. X#1#
  1692. X#1simple:\
  1693. X#1    :fx=flp:\
  1694. X#1    :pw#75:pl#66:sb:\
  1695. X#1    :lp=output:\
  1696. X#1    :sd=TMPsimple:
  1697. X#2#
  1698. X#2# TEST Printcap Files.
  1699. X#2#
  1700. X#2test:\
  1701. X#2    :fx=flp:\
  1702. X#2    :pw#75:pl#66:rw:\
  1703. X#2    :br#9600:fs#040:fc#011:\
  1704. X#2    :ty=new 19200 even -tabs tandem:\
  1705. X#2    :lp=output:\
  1706. X#2    :if=TMPfilter -delay30:\
  1707. X#2    :of=TMPlpf -D5:\
  1708. X#2    :sd=TMPtest:
  1709. X#3#
  1710. X#3# This is for a remote printer.  Notice that the filter checking is done
  1711. X#3# at the local, not remote end (fx: option).  The rm=attila entry names the
  1712. X#3# remote host; in this case it is "attila the sun", our local server.
  1713. X#3#    
  1714. X#3remote:\
  1715. X#3    :fx=flpdnt:\
  1716. X#3    :rm=HOST:rp=test:\
  1717. X#3    :sd=TMPremote:
  1718. X#4#
  1719. X#4## Multiple servers for a single queue
  1720. X#4#ms1|multi:\
  1721. X#4    :fx=flpdnt:\
  1722. X#4    :sv=sv1,sv2:\
  1723. X#4    :sd=TMPms1:
  1724. X#4sv1:\
  1725. X#4    :ss=ms1:\
  1726. X#4    :br#9600:fs#040:fc#011:\
  1727. X#4    :lp=outputsv1:\
  1728. X#4    :if=TMPfilter -delay10:\
  1729. X#4    :of=TMPlpf -D5:\
  1730. X#4    :st=stsv1:\
  1731. X#4    :ss=ms1:
  1732. X#4sv2:\
  1733. X#4    :ss=ms1:\
  1734. X#4    :br#9600:fs#040:fc#011:\
  1735. X#4    :lp=outputsv2:\
  1736. X#4    :if=TMPfilter -delay10:\
  1737. X#4    :of=TMPlpf -D5:\
  1738. X#4    :st=stsv2:\
  1739. X#4    :ss=ms1:
  1740. END_OF_FILE
  1741. if test 1028 -ne `wc -c <'test/printcap.proto'`; then
  1742.     echo shar: \"'test/printcap.proto'\" unpacked with wrong size!
  1743. fi
  1744. # end of 'test/printcap.proto'
  1745. fi
  1746. if test -f 'test/printer_perms.proto' -a "${1}" != "-c" ; then 
  1747.   echo shar: Will not clobber existing file \"'test/printer_perms.proto'\"
  1748. else
  1749. echo shar: Extracting \"'test/printer_perms.proto'\" \(699 characters\)
  1750. sed "s/^X//" >'test/printer_perms.proto' <<'END_OF_FILE'
  1751. X# Printer permissions data base
  1752. X# host user printerqueue maxpriority maxpages currentpages
  1753. X# * is a wildcard
  1754. X# !<match line> - if a match is made, permission denied
  1755. X# ~<match line> - a match must be made, otherwise permission denied
  1756. X#host   user      printer     perms  pr maxpages pages
  1757. HOST    USER      test        C      A  100      0  # for testing
  1758. HOST    USER      simple      C      A  100      0  # for testing
  1759. X*       root      *           *      *  0        0  #root on any system
  1760. X*       *         simple      R      *  0        0  #anybody can do test
  1761. X*       *         test        R      *  0        0  #anybody can do test
  1762. X*       *         *           R      X  0        0  #default
  1763. END_OF_FILE
  1764. if test 699 -ne `wc -c <'test/printer_perms.proto'`; then
  1765.     echo shar: \"'test/printer_perms.proto'\" unpacked with wrong size!
  1766. fi
  1767. # end of 'test/printer_perms.proto'
  1768. fi
  1769. if test -f 'test/qh.sh' -a "${1}" != "-c" ; then 
  1770.   echo shar: Will not clobber existing file \"'test/qh.sh'\"
  1771. else
  1772. echo shar: Extracting \"'test/qh.sh'\" \(36 characters\)
  1773. sed "s/^X//" >'test/qh.sh' <<'END_OF_FILE'
  1774. X#!/bin/sh
  1775. echo $0 $- $* 1>&2
  1776. exit 0
  1777. END_OF_FILE
  1778. if test 36 -ne `wc -c <'test/qh.sh'`; then
  1779.     echo shar: \"'test/qh.sh'\" unpacked with wrong size!
  1780. fi
  1781. chmod +x 'test/qh.sh'
  1782. # end of 'test/qh.sh'
  1783. fi
  1784. if test ! -d 'utilities' ; then
  1785.     echo shar: Creating directory \"'utilities'\"
  1786.     mkdir 'utilities'
  1787. fi
  1788. if test -f 'utilities/IDENT' -a "${1}" != "-c" ; then 
  1789.   echo shar: Will not clobber existing file \"'utilities/IDENT'\"
  1790. else
  1791. echo shar: Extracting \"'utilities/IDENT'\" \(591 characters\)
  1792. sed "s/^X//" >'utilities/IDENT' <<'END_OF_FILE'
  1793. X#ifndef    lint
  1794. X/*
  1795. X * Updated LPR software;
  1796. X * Original Version (Copyright) 1983 Regents of the Univeristy of California
  1797. X * This is a derivative work,
  1798. X * and the original copyright is still valid.  Covered by the
  1799. X * 4BSD Licensing Agreement;  this is NOT public domain software.
  1800. X * Mon Nov 23 09:23:23 CST 1987 Patrick Powell, U. Minnesota
  1801. X */
  1802. X#ifndef __INDENT_INCL
  1803. static char id_str1[] =
  1804. X    "Revised LPR, Patrick Powell, U. Waterloo, April 10, 1984";
  1805. static char id_str2[] =
  1806. X    "Re-revised LPR, Patrick Powell, U. Minnesota, 23 Nov 1987";
  1807. X#define __INDENT_INCL 1
  1808. X#endif __INDENT_INCL
  1809. X#endif lint
  1810. END_OF_FILE
  1811. if test 591 -ne `wc -c <'utilities/IDENT'`; then
  1812.     echo shar: \"'utilities/IDENT'\" unpacked with wrong size!
  1813. fi
  1814. # end of 'utilities/IDENT'
  1815. fi
  1816. if test -f 'utilities/Makefile' -a "${1}" != "-c" ; then 
  1817.   echo shar: Will not clobber existing file \"'utilities/Makefile'\"
  1818. else
  1819. echo shar: Extracting \"'utilities/Makefile'\" \(1119 characters\)
  1820. sed "s/^X//" >'utilities/Makefile' <<'END_OF_FILE'
  1821. X#Mon Nov  9 08:58:06 CST 1987 Patrick Powell
  1822. X#
  1823. X# Makefile for the LPR software, top level
  1824. X# The source is in src, filters, utilities;
  1825. X# the DEBUG flag will make a debug version; check that you have
  1826. X# set this flag correctly before you start doing anything.
  1827. X
  1828. X
  1829. X#DEBUG = -DDEBUG
  1830. THINGS= cpr print
  1831. X
  1832. DIRS = include $(THINGS)
  1833. XFILES = Makefile README
  1834. BIN    = /usr/local/new/bin
  1835. LIB    = /usr/local/new/lib
  1836. X
  1837. help:
  1838. X    @echo "all:     build everything from source"
  1839. X    @echo "clean:   delete all things built from source"
  1840. X    @echo "install: install everything built from source"
  1841. X    @echo "  Install man pages by hand, see man/Makefile"
  1842. X
  1843. X
  1844. all:
  1845. X    for thing in $(THINGS); do \
  1846. X        echo ----- building $$thing -----; \
  1847. X        (cd $$thing; \
  1848. X            $(MAKE) BIN=$(BIN) LIB=$(LIB) DEBUG=$(DEBUG) $(MFLAGS) all;) \
  1849. X    done
  1850. X
  1851. X
  1852. clean:
  1853. X    for thing in $(THINGS); do \
  1854. X        echo ----- clean $$thing -----; \
  1855. X        (cd $$thing; \
  1856. X            $(MAKE) BIN=$(BIN) LIB=$(LIB) DEBUG=$(DEBUG) $(MFLAGS) clean;) \
  1857. X    done
  1858. X
  1859. X
  1860. install:
  1861. X    for thing in $(THINGS); do \
  1862. X        echo ----- installing $$thing -----; \
  1863. X        (cd $$thing; \
  1864. X            $(MAKE) BIN=$(BIN) LIB=$(LIB) DEBUG=$(DEBUG) $(MFLAGS) install;) \
  1865. X    done
  1866. X
  1867. END_OF_FILE
  1868. if test 1119 -ne `wc -c <'utilities/Makefile'`; then
  1869.     echo shar: \"'utilities/Makefile'\" unpacked with wrong size!
  1870. fi
  1871. # end of 'utilities/Makefile'
  1872. fi
  1873. if test ! -d 'utilities/cpr' ; then
  1874.     echo shar: Creating directory \"'utilities/cpr'\"
  1875.     mkdir 'utilities/cpr'
  1876. fi
  1877. if test -f 'utilities/cpr/Makefile' -a "${1}" != "-c" ; then 
  1878.   echo shar: Will not clobber existing file \"'utilities/cpr/Makefile'\"
  1879. else
  1880. echo shar: Extracting \"'utilities/cpr/Makefile'\" \(303 characters\)
  1881. sed "s/^X//" >'utilities/cpr/Makefile' <<'END_OF_FILE'
  1882. NAME=cpr
  1883. X
  1884. INCLUDES = \
  1885. X    /usr/include/stdio.h \
  1886. X    /usr/include/ctype.h \
  1887. X    /usr/include/signal.h \
  1888. X    /usr/include/sys/types.h \
  1889. X    /usr/include/sys/stat.h
  1890. X
  1891. BIN=    /usr/local/new/bin
  1892. all:    $(NAME)
  1893. X
  1894. X$(NAME):    $(NAME).c
  1895. X    cc -o $(NAME) $(NAME).c
  1896. X
  1897. install:    all
  1898. X    install -c $(NAME) $(BIN)
  1899. X
  1900. clean:
  1901. X    -rm *.o core $(NAME)
  1902. END_OF_FILE
  1903. if test 303 -ne `wc -c <'utilities/cpr/Makefile'`; then
  1904.     echo shar: \"'utilities/cpr/Makefile'\" unpacked with wrong size!
  1905. fi
  1906. # end of 'utilities/cpr/Makefile'
  1907. fi
  1908. if test ! -d 'utilities/print' ; then
  1909.     echo shar: Creating directory \"'utilities/print'\"
  1910.     mkdir 'utilities/print'
  1911. fi
  1912. if test -f 'utilities/print/Makefile' -a "${1}" != "-c" ; then 
  1913.   echo shar: Will not clobber existing file \"'utilities/print/Makefile'\"
  1914. else
  1915. echo shar: Extracting \"'utilities/print/Makefile'\" \(166 characters\)
  1916. sed "s/^X//" >'utilities/print/Makefile' <<'END_OF_FILE'
  1917. NAME    = print
  1918. BIN=    /usr/local/new/bin
  1919. all:    $(NAME)
  1920. X
  1921. X$(NAME):
  1922. X    cp print.sh print
  1923. X    chmod a+x print
  1924. install:    all
  1925. X    install -c $(NAME) $(BIN)
  1926. X
  1927. clean:
  1928. X    -rm *.o core $(NAME)
  1929. END_OF_FILE
  1930. if test 166 -ne `wc -c <'utilities/print/Makefile'`; then
  1931.     echo shar: \"'utilities/print/Makefile'\" unpacked with wrong size!
  1932. fi
  1933. # end of 'utilities/print/Makefile'
  1934. fi
  1935. if test -f 'utilities/print/print.1' -a "${1}" != "-c" ; then 
  1936.   echo shar: Will not clobber existing file \"'utilities/print/print.1'\"
  1937. else
  1938. echo shar: Extracting \"'utilities/print/print.1'\" \(472 characters\)
  1939. sed "s/^X//" >'utilities/print/print.1' <<'END_OF_FILE'
  1940. X.TH PRINT 1 "UW Modified"
  1941. X.UC
  1942. X.SH NAME
  1943. print \- pr to the line printer
  1944. X.SH SYNOPSIS
  1945. X.B print
  1946. file ...
  1947. X.SH DESCRIPTION
  1948. X.I Print
  1949. X.I pr's
  1950. a copy of each named file on the line printer.
  1951. It is more-or-less a one-line shell script:
  1952. X.sp
  1953. lpr -p $*
  1954. X.SH SEE\ ALSO
  1955. lpr(1), pr(1)
  1956. X.SH NOTES
  1957. X.I print
  1958. X*used* to be a one-line shell script, but in order to handle various
  1959. boundary conditions, it is now a four-line shell script:
  1960. X.sp
  1961. X.nf
  1962. case $# in
  1963. X0)   lpr -p ;;
  1964. X*)   lpr -p "$@" ;;
  1965. esac
  1966. END_OF_FILE
  1967. if test 472 -ne `wc -c <'utilities/print/print.1'`; then
  1968.     echo shar: \"'utilities/print/print.1'\" unpacked with wrong size!
  1969. fi
  1970. # end of 'utilities/print/print.1'
  1971. fi
  1972. if test -f 'utilities/print/print.sh' -a "${1}" != "-c" ; then 
  1973.   echo shar: Will not clobber existing file \"'utilities/print/print.sh'\"
  1974. else
  1975. echo shar: Extracting \"'utilities/print/print.sh'\" \(61 characters\)
  1976. sed "s/^X//" >'utilities/print/print.sh' <<'END_OF_FILE'
  1977. X#!/bin/sh
  1978. case $# in
  1979. X0)   lpr -p ;;
  1980. X*)   lpr -p "$@" ;;
  1981. esac
  1982. END_OF_FILE
  1983. if test 61 -ne `wc -c <'utilities/print/print.sh'`; then
  1984.     echo shar: \"'utilities/print/print.sh'\" unpacked with wrong size!
  1985. fi
  1986. chmod +x 'utilities/print/print.sh'
  1987. # end of 'utilities/print/print.sh'
  1988. fi
  1989. echo shar: End of archive 1 \(of 16\).
  1990. cp /dev/null ark1isdone
  1991. MISSING=""
  1992. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do
  1993.     if test ! -f ark${I}isdone ; then
  1994.     MISSING="${MISSING} ${I}"
  1995.     fi
  1996. done
  1997. if test "${MISSING}" = "" ; then
  1998.     echo You have unpacked all 16 archives.
  1999.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2000. else
  2001.     echo You still need to unpack the following archives:
  2002.     echo "        " ${MISSING}
  2003. fi
  2004. ##  End of shell archive.
  2005. exit 0
  2006.  
  2007. -- 
  2008. Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
  2009.