home *** CD-ROM | disk | FTP | other *** search
- LPR and LPQ are two utilities to work with the standard MSDOS background
- printing program and enhance it's usefulness.
-
- LPR lets you pipe standard input into a spool file, which is then
- passed to the print queue maintained by the DOS print.com utility. File
- arguments (with wildcards) to lpr are also passed to print. Calls to lpr
- and print may be freely mixed. Added bonuses are a logging of the time of
- each print job, and a rush option to insert a job at the head of the queue.
- The spool files are created in a special spool directory, and automatically
- deleted by a later call to lpr. LPR does not look at the file in any way,
- except for the following:
- - input files which are empty are not printed.
- - a formfeed as the last character in the file is stripped, since PRINT
- will supply one for you (at least my print does - DOS 4.01)
-
- LPQ is a utility to display and manipulate the print queue. It
- displays the files in the queue, each with a job number, file size, and the
- time of entry (if they were inserted by LPR and not PRINT). In addition,
- it can cancel individual files by job number, cancel all jobs files, or
- move a given job to the head of the queue. It can also suspend print
- operations (thus leaving the printer port free to other applications such
- as word processors), and then restore the queue and resume printing later.
- The percentage already printed is displayed for the file at the head of the
- queue (this may not be very meaningful if you use a large printer buffer)
-
- Of course, PRINT should be already resident and pointing at the correct
- printer port before you run LPR. (It checks for this first).
-
- The source was compiled with TurboC v2.0, tiny model and converted to .com
- It has been tested on DOS v 3.1 and 4.01. It has not been tested under 2.x
- and probably will not work. The multiplex interrupt 2F was undocumented then
- but print.com was using it (according to Norton).
-
- Archive lpr-lpq.zoo:
- Length CF Size Now Date Time
- -------- --- -------- --------- --------
- 15905 53% 7524 14 Oct 89 13:17:14 lpq.c
- 4064 50% 2019 14 Oct 89 13:19:20 lpq.doc
- 3760 49% 1925 14 Oct 89 13:19:30 lpq.man
- 21443 52% 10283 4 Oct 89 22:58:34 lpr.c
- 3833 45% 2110 14 Oct 89 13:19:00 lpr.doc
- 3569 43% 2022 14 Oct 89 13:19:12 lpr.man
- 2320 43% 1312 14 Oct 89 13:14:16 makefile
- 4237 41% 2497 14 Oct 89 13:28:58 readme
- 5654 51% 2755 4 Oct 89 22:58:34 setargv.c
- 1690 73% 450 5 Oct 89 10:38:20 tcconfig.tc
- 1038 7% 966 5 Oct 89 10:24:14 wildargs.obj
- 13506 17% 11208 14 Oct 89 13:18:10 lpq.com
- 19450 20% 15514 14 Oct 89 13:17:54 lpr.com
- -------- --- -------- --------- --------
- 100469 40% 60585 13 files
-
- Compilation notes.
- With Turbo-C, use the integrated environmant and the supplied .TC and .PRJ
- files. The makefile supplied assumes NDMAKE as the make program, TCC as the
- compiler and 4DOS as the shell. If you know enough to be recompiling these
- programs I'll presume you know how to change the makefile to suit your
- system. Borlands MAKE can handle the makefile with minor editing, but not
- the lines with i/o redirection. The 4DOS features used here are multiple
- wildcards as arguments to del, and the except command, which simply sets the
- hidden attribute on the (file list) before executing the command. The
- program notroff is a filter for inserting bold, underline etc. codes into a
- file for printing or display under ansi.sys. The .doc files have been
- formatted with embedded ansi codes, and the .man files have no codes.
- The wildargs.obj file is a modified version of the wildcard argument expander
- supplied with TurboC. I changed it to allow "/" as well as "\" to be
- correctly recognised in wildcards, and to allow "[" and "]" in filenames
- to be recognised as wildcard indicators. This is to allow lpr to be used
- with the WILDUNIX tsr to accept a command like "lpr chap[1-4].txt" which
- would not otherwise be recognised as a wildcard. Since the source in
- setargv.asm is (c) Borland, I included only the .obj file in the distribution.
-
-
- LPR and LPQ are copyright (1989) by Richard Brittain
- Permission is granted to freely use and distribute these programs as long as
- my copyright notice is not removed. These programs may not be sold.
-
- All comments, suggestions etc. welcome at any of the addresses below.
-
- Richard Brittain, School of Elect. Eng., Upson Hall Cornell University,
- Ithaca, NY 14853
- ARPA: richard@calvin.spp.cornell.edu
- UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard
-