david@ukma.UUCP (David Herron, NPR Lover) (12/19/84)
Well, I got enough people that wanted to see it, so I put it on net.sources. Following is the README from that file. ---------------------------------------------------------------------- LPR/LPD HACKS FOR 4.2BSD Here are my modifications for lpr from 4.2BSD. The diff listings are context diffs using the distributed software as the base file. As usual, line numbers may vary with local patching conditions. There are 4 major groups of changes here: 1: Allowing the lpr command to select print density and format by way of command line options. 2: Added an environment variable LPR. This gets scanned by lpr after reading the system default parameters and before the command line parameters. It is meant to be used for user default settings. (The inspiration is the similar variable for more). 3: Bug fixes. I found a number of bugs in lpf.c. Look at the diff's for it to find out what. 4: Support for our LN01. As you can tell from the comments in lpf.c and nrpf.c, I had many many troubles with that beast. May she rest in peace. One thing the LPR variable doesn't do that I would like to do is specify files to print. I envision that being useful in a class situation. The instructor may want to have a file somewhere that gets printed out with each students print job. Or a user might want to have his own banner page rather than the standard one. Anything along those lines would be reasonable. It would take a major rewrite of the command parser in lpr..... flpf.c Generic filter for output with fortran-type carraige control. Supports the LN01 and LA120. Written by me. lpd.c.diff Changes to lpd.c. Simple. We were having response problems when printing things. Raise the nice to 9 and it becomes less of a problem. Now though the printers stop occasionally. lpf.c.diff Changes to lpf.c. Including a couple of rather serious bugs. Supports the LN01 and LA120. lpr.c.diff Changes to lpr.c. New command parser looks at the LPR variable (almost) as if it were a command line. Almost because it doesn't pick up any files to print from here. nrpf.c A filter for nroff output. It reads the cursor-up and cursor-down commands that nroff outputs, stores the text at appropriate places in a buffer, then outputs the buffer when nroff tries to go off the page. This was written instead of an nroff table because there isn't any documentation on the values to be put into one of those tables. I took one stab at reading nroff and said FORGET IT! Especially since we are getting ditroff sometime Real Soon Now. It was easier to guess at nroff's output than read nroff. At any rate. This program is currently specific to the LN01 and it's peculiarities. But it was written with the SPECIFIC intent of making it work for LA120's and LA100's at some time in the future. (i.e. Real Soon Now). Written by me. printjob.c.diff Changes to printjob.c. Two changes. One to recognize a new control card which selects the page length of the printer. The other gives the filter an indent flag ONLY if there was an indent card in the control file. scanargs.c stringop.c Seperate files containing routines added to lpr.c so it would scan the LPR environment variable. lpr.1 Lpr manual page reflecting most of these changes. ----------------------------------------- David Herron; ARPA-> "ukma!david"@ANL-MCS (Try the arpa address w/ and w/o the quotes, I have had much trouble with both.) UUCP-> unmvax -----------\ UUCP-> research ----------\_______ {anlams,anl-mcs} --\ UUCP-> boulder -----------/ >-!ukma!david UUCP-> decvax!ucbvax ----/ cbosgd!hasmed!qusavx --/ (The usual warning about having no opinions). "I read banned books." Lets see how long it takes for the NSA boys to start chasing me: "The NSA is the CIA is the FBI is the KGB".