w8sdz@WSMR-SIMTEL20.ARMY.MIL (Keith Petersen) (07/29/89)
[--forwarded message--] From: richard@CALVIN.SPP.cornell.edu (Richard Brittain) I have uploaded the new version of my LPR/LPQ to SIMTEL20 as file PD1:<MSDOS.PRINTER>LPR-LPQ2.ARC 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 but I think it should work. The multiplex interrupt 2F was undocumented then but print.com was using it (according to Norton). Files: lpq.c source for lpq lpq.com compiled lpq lpq.doc documentation lpr.c source for lpr lpr.com compiled lpr lpr.doc documentation lpr.prj project file for Turbo C readme this file 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 ---end forwarded message--- Thanks, Richard! --Keith