home *** CD-ROM | disk | FTP | other *** search
-
- DAN'S PRINT SPOOLER
- -------------------
-
- The contents of this file and other files in this distribution are
- Copyright (C) 1988 by Daniel L. Barrans, all rights reserved. This is a
- shareware product. You may copy and distribute this product freely as long
- as:
-
- 1) No more than a minimal fee is charged for copying and distribution,
- 2) This file remains intact and is distributed with the software, and
- 3) The software is distributed ONLY in its original, unmodified state.
-
- If you like this product and use it, please send money ($25.00 or thereabouts)
- to keep me from thinking that I wasted my time. You may not use this product
- in a commercial environment or a government organization without paying a
- license fee of $25.00.
-
- NOTE: If you fail to pay me for the use of this product, I probably won't be
- too likely to listen to your suggestions for this or future products.
-
- This product was developed and tested using the AmigaDOS 1.3 omega 9
- Workbench release, and the Manx Aztec C compiler release 3.6a, although it
- should also work with Workbench release 1.2. This distribution consists of
- release 1.4 of the print spooler and associated programs.
-
- If you experience any problems while using this software, or if you have
- suggestions for improvement, please let me know as soon as possible.
- My BIX name is dbarrans, and my CIS user ID is 75036,2230. The preferred
- method is thru BIX, because I am not on CIS that often.
-
- Dan Barrans - 26 Sep 1988
-
- Send your money to:
-
- Daniel L. Barrans
- P.O. Box 522
- Seabrook, MD 20706
-
-
- WHAT IS THIS STUFF ANYWAY?
-
- This distribution contains a DOS handler, a print program, and a control
- program. The DOS handler sits and waits for stuff to be sent to it to be
- printed, just like you would send stuff to PRT: to be printed. The difference
- is that this handler makes a temporary copy of the stuff to be printed in a
- file on disk somewhere (you decide where), prints the copy at its leisure,
- then deletes the copy. The advantages to you are that you get your CLI
- prompt back faster, you can continue to edit and/or delete the original
- file without messing up what's being printed, and you don't need to worry
- about the printer being busy when you want to start another print job. The
- main disadvantage is that you need enough disk space available to hold the
- temporary files until they are printed. This can theoretically be in any
- filesystem in RAM, floppy, or hard disk.
-
- The print program is just a simple formatted print program I wrote a couple
- of years ago that I've adapted to use this handler. It can do line numbering
- and page headers, and looks at the current preferences settings to determine
- what it can fit on a page.
-
- The control program lets you do stuff like listing the files waiting to be
- printed, rearrange the order of printing, cancel print jobs, and suspend
- and resume the operation of the printer.
-
- The print and control programs need arp.library version 1.1 (or later) in
- your Libs: directory, but the handler itself does not need the ARP library.
-
-
- PRINT SPOOLER INSTALLATION INSTRUCTIONS:
-
- The distribution contains these files:
-
- spool-handler This is the AmigaDOS handler for the print spooler.
- It should be copied to your L: directory.
-
- Mountlist The contents of this file should be added to your
- Devs:Mountlist file.
-
- Print This is an ARP command program that prints files
- to the spool handler. It should be copied to your
- C: directory (or somewhere in your search path), and
- it needs arp.library version 1.1 (or later) to run.
-
- PrintC This is an ARP command program that allows you to
- control printing of spooled print jobs. It should
- be copied to your C: directory (or somewhere in your
- search path), and it needs arp.library version 1.1
- (or later) to run.
-
- RemPRT This is a program to use for removing the standard
- PRT: handler so it can be replaced by the spool
- handler. This should be copied to your C: directory
- (or somewhere in your search path).
-
- Readme This file. Put it where you can refer to it if you
- forget how to use the other files.
-
-
- After the above files are copied to the appropriate places, you should edit
- your S:Startup-Sequence file to include the following commands:
-
- Assign SPOOL: RAM:
- RemPRT
- Mount PRT:
-
- The Assign command tells the spool handler where to put the temporary copies
- of the files to be printed. You may change this assignment to another
- directory if you wish. If you do not assign a spool directory, the spool
- handler will function just like the standard AmigaDOS print handler, without
- creating spool files.
-
- The RemPRT command tells AmigaDOS to remove the standard PRT: handler
- from the device list so the new handler can be added. This command may be
- replaced with "Assign PRT: REMOVE" if you are using AmigaDOS 1.3.
-
- The Mount command tells AmigaDOS to mount the spool handler as PRT: so it is
- available for use. The Print and PrintC command programs automatically use
- the PRT: handler, and other programs can use the new PRT: handler just like
- they use the standard PRT: handler.
-
-
- HOW THE PRINT SPOOLER WORKS:
-
- The print spooler is an AmigaDOS handler that runs when a program opens PRT:.
- When PRT: is opened, the handler creates a temporary disk file for the output
- of the program that opened it, and writes the program's output to the disk
- file instead of the printer. When the program closes PRT:, the handler then
- starts another process to print the file. Any number of programs can open the
- spool handler at the same time, and their output will be printed in the order
- they finish writing to the handler. After all files are printed, the handler
- releases all resources it has allocated, and the printer is available to any
- other program that wants to use it.
-
- The spool handler only tries to allocate the printer when it has a file
- ready to print. If another program is using the printer at this time, the
- spool handler will wait until the printer becomes available, then allocate
- it and start printing. You can have as many programs as you want writing to
- the spool handler at the same time, and they will be printed in sequence. The
- handler is designed to keep track of all processes using it, independent of
- each other, limited only by the amount of available system memory and the
- amount of available disk space in the spool directory.
-
- You can determine where the handler creates its temporary spool files by
- changing the assignment for the SPOOL: directory. This can be changed at any
- time, but the handler only looks at it when it first starts a new batch of
- print jobs. To change the spool directory, just wait until there are no jobs
- waiting to print, and reassign the SPOOL: directory.
-
- NOTE: The spool handler acquires a lock on the directory currently assigned
- to SPOOL:. If this directory is on a volume that is not currently mounted,
- you will get a requester asking you to mount the volume when you try to open
- the spool handler.
-
-
- COMMAND DESCRIPTIONS
-
-
- NAME
- Print - Print files
-
- SYNOPSIS
- Print FILES NONUM/S NOHDR/S NOFORM/S VERBOSE/S
-
- DESCRIPTION
- Print formats and copies the contents of the file or files
- of its FILES argument to the AmigaDOS PRT: handler.
-
- You may specify any number of filenames (including wildcarded
- filenames) for the FILES argument, which will cause all the named
- files to be printed on the printer, after first being copied to
- the print spooler's spool directory. As soon as this command is
- finished, you are free to do anything you want with the original
- files, because the spooler is printing from a temporary copy of
- each file, not the original.
-
- The Print command examines the current Preferences settings for
- the printer to determine how many lines to print between page
- breaks. It prints a page header at the top of each page, containing
- the file name, last modification date, and page number, and prints
- each line of the file prefixed with a line number.
-
- This program will work with either the standard AmigaDOS print
- handler, or with the spool handler. If you have an especially large
- file to print that will not fit into the spool directory, remove the
- spool directory assignment using "assign spool:" and then wait for
- the spooler to finish printing any spooled files. Then you can use
- Print to print your large file without spooling it.
-
- The behavior of Print may be modified by using the following
- switches:
-
- NONUM - this switch will cause Print to not print line numbers at
- the beginning of each line of text.
-
- NOHDR - this switch will cause Print to not print page headers at
- the top of each page of output.
-
- NOFORM - this switch will cause Print to not do a page eject between
- pages, but to print continuously over the page breaks.
-
- VERBOSE - this switch will cause Print to display the name of each
- file as it is being sent to the spool handler.
-
- EXAMPLES
- Print filename NONUM ; The file will be printed without line numbers.
- Print *.c NOHDR ; The files will be printed without headers.
-
-
-
- NAME
- PrintC - Print spooler control
-
- SYNOPSIS
- PrintC OPTION JOBS
-
- DESCRIPTION
- PrintC allows the user to control various aspects of print spooler
- operation. If the spooler is not installed, or if no spool directory
- is assigned, then PrintC will display an error message.
-
- The desired behaviour of PrintC may be specified by using one of the
- following OPTIONs. Each option may be abbreviated by using the first
- letter of the option, instead of the entire option name.
-
- QUERY - query the spool handler to find out about the print jobs
- queued in the print queue. This option may not be followed
- by job numbers. This will display information about queued
- print jobs, like this:
-
- job status filesize jobname
- 1 active 4285 debug.c
- 2 queued 7732 misc.c
- 3 queued 7349 (no name)
- 4 queued 23763 spool-handler.c
- 5 queued 5871 printc.c
-
- The job number identifies the print job to PrintC when
- using other options.
-
- The status shows the current state of the print job. The
- possible status strings are:
-
- active - this job is currently printing.
- queued - this job is waiting to print.
- open - this job is currently being spooled.
- cancel - this job has been cancelled.
-
- The filesize shows the size in bytes of the spooled file.
-
- The jobname identifies the spooled file. If you send output
- to the spool handler as PRT:filename, then filename will show
- up as the jobname. Otherwise, the jobname will be "(no name)".
- There is one output filename that has a special meaning to the
- spool handler. If you use the name "PRT:raw", then the
- spooled output will be sent directly to the printer without
- being translated by the printer device.
-
- If the print spooler is suspended, the above status display
- will be preceded by "printing is suspended".
-
- CANCEL - cancel the specified print jobs. If a job is active, the
- print will be aborted, and the next queued job will start
- printing. If a job is queued, it will simply be removed from
- the print queue.
-
- NEXT - move the specified print jobs to next in line to be printed.
- If a job is already printing, it cannot be moved around in
- the print queue.
-
- LAST - move the specified print jobs to last in line to be printed.
- If a job is already printing, it cannot be moved around in
- the print queue.
-
- SUSPEND - suspend printing all queued print jobs. The current job
- and all queued jobs will be suspended. The printer device
- will not be made available to any other program which uses
- it directly (such as the standard PRT: handler) until
- printing is resumed and completed, or all print jobs are
- cancelled.
-
- NOTE: Some printers have an internal buffer which may take
- some time to empty before printing actually stops.
-
- RESUME - resume printing all queued print jobs. If there are queued
- print jobs, they will resume printing. Otherwise, nothing
- visible will happen.
-
- EXAMPLES
- PrintC QUERY ; Show the queued print jobs.
- PrintC CANCEL 1 3 4 5 ; Cancel print jobs 1, 3, 4, and 5.
- PrintC NEXT 4 6 ; Move print jobs 4 and 6 to next in line.
- PrintC LAST 2 ; Move print job 2 to last in line.
-
-
-
- NAME
- RemPRT - Remove the PRT: handler
-
- SYNOPSIS
- RemPRT
-
- DESCRIPTION
- RemPRT removes the PRT: handler from the AmigaDOS device list. This
- should be run from your Startup-Sequence file, or before PRT: is
- used. If the PRT: handler code has already been loaded, this command
- will not remove the handler, but will display an error message.
-
- EXAMPLES
- RemPRT ; remove the PRT: handler.
- Mount PRT: ; mount the new handler.
-