home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
247.lha
/
IAmSpooler_v1.3
/
IAMSpooler.doc
< prev
next >
Wrap
Text File
|
1989-06-09
|
7KB
|
140 lines
IAMSpooler 1.3; a Print Spooler
IAMSpooler 1.3 consists of three programs that allows programs to send
printer output to disk for subsequent printing on the printer. The
printing is automatic and in most cases does not require user
intervention. To accomplish this task, the first program, a new device
handler called SPL must be added to the system. The handler's
specifications must be added to the file DEVS:mountlist and mounted
before it can be used. This device handler is responsible for creating
(spooling) the printer output on disk. The second program, Spooler, is
responsible for managing the printer output files on disk. It controls
the sequence in which the printer output will be printed. The third
program, Spooler.driver, reads the spooled printer output files and
sends the data to the printer. These programs make life easier when
you have multiple programs wanting to send output to the printer at
the same time. They can all send their output to the SPL: device and
have their print printed as soon as the printer becomes available.
SPL: device handler
To allow printer output to be spooled, a special device was created
called SPL:. Instead of printing to the PRT: device the program should
print to the SPL: device. This device sends its output to a file on
the logical device called Spool:. The logical device Spool: should be
equated to a directory on disk or RAM:. The file being created can
have a name associated with it by appending the name to the device
name (i.e. SPL:mountlist). The output file created is named
<systemtime.secs><systemtime.micros>. The name supplied with the
device name is appended to this file as a comment. The name being
supplied is limited to 31 characters. If no name is supplied, the name
appended as a comment will default to "SPL". When a close is
performed, the device informs the Spooler program of the existence of
new printer output. In the event the Spooler program is not running no
notification is sent. This release of the SPL handler cannot handle
wild card characters in the filenames. Therefore the following example
will produce unpredictable results.
ex.
COPY df0:text#? SPL:textdata
Spooler.driver
This program opens the "printer.device" and sends the spooled printer
output to the printer selected by Preference. It is initialized by the
Spooler program and receives its printing requests from the Spooler
program. The Spooler program looks on the logical device SpoolDriver:
for the Spooler.driver program. This logical device must exist for
initialization to complete successfully.
Spooler
This program controls the printing and removal of spooled printer
files. On initialization, the logical device "Spool:" is searched for
spooled printer files. With each file found an entry is inserted in
the queue and printing starts with the first entry in the queue.
During execution it can receive spooled printer output notifications
from the "SPL:" device handler, which will be inserted into the queue.
The user is presented a window which shows the available functions
that can be performed on entries in the queue. These functions are
described below.
QUIT -This terminates the Spooler and the Spooler driver. If
the printer is printing, the printing will stop. If
there are entries in the queue, they will not be
deleted.
PRINT -When a function causes the printer to stop, this will
cause spooler to print the entry at the top of the
print queue. Execution of This function is required
upon initialization. When the printer is halted and an
entry has been selected from the printer queue, this
function will cause the selected entry to become the
top entry in the printer queue and printing will start.
STOP -This causes the currently printing entry to stop. The
entry remains at the top of the queue and printer is
halted.
SUSPEND -This causes the spooler driver to stop printing the
printer file and wait for a request to resume.
RESUME -This causes the spooler driver to resume printing of
the printer file that was previously suspended.
RESTART -This causes the spooler driver to start printing the
printer file at the beginning.
FLUSH -This causes the spooler to empty the printer queue and
delete all the associated printer files. This will also
stop the currently printing printer file.
CANCEL -This causes the deletion of a printer request and its
associated printer file. To use this function an entry
must have been selected from the printer queue.
INFO -This displays information about a selected entry from
the printer queue (i.e. size & date). It also allows
the user to reposition an entry in the queue by
changing its priority value. Multiple copies of the
printer file can be printed by changing the copies
value.
QUEUE -This displays the printer queue and allows selection
for use by other functions.
Installation
The file DEVS:mountlist must have the following entries added to it.
SPL: Handler = L:SPL-handler
Stacksize = 2500
Priority = 5
GlobVec = -1
#
Now create a directory to hold the spooled printer output.
MAKEDIR DF0:SpoolQ <----- example only
Now copy the programs to their proper places.
COPY DF1:Spooler to SYS:Spooler
COPY DF1:Spooler.driver to SYS:Spooler.driver
COPY DF1:SPL-handler to L:SPL-handler
Now we are ready to use IAMSpooler 1.3. Each time we boot our system
we must execute the following:
ASSIGN SpoolDriver: SYS: <----- Spooler.driver is on the boot disk
ASSIGN Spool: DF0:SpoolQ <----- put my spooled output here
MOUNT SPL: <----- mount the spooler device
RUN Spooler
When Spooler opens its window we can click on the PRINT gadget then
the screen's back gadget and go to work. IAMSpooler 1.3 will handle
our printing requests as long as out print go to the SPL: device.
Examples:
Copy devs:mountlist to SPL:mountlist
Type s:startup-sequence to SPL:startupseq
Type > SPL: s:startup-sequence (un-named)
C: Open ("SPL:fromC",MODE_NEWFILE);
Open ("SPL:SPOOLEDRAW",MODE_NEWFILE);*
BASIC: OPEN "SPL:frombasic" as 3
OPEN "SPL:SPOOLEDRAW" as 5*
* data not translated by printer device driver
NOTE: If memory is short, the Spooler and the Spooler driver need not
be running. Printer output will still be spooled to the Spool:
device. The printer output can be printed later when there is enough
memory to run the Spooler.
Graphic output via SPL:
In conjunction with the CMD program, programs that cannot print to a
file can have their output printed via Spooler. The steps required are
as follows:
1) Halt printing via Spooler by clicking the STOP gadget.
2) Setup and run the CMD program from the Workbench 1.3 release.
The filename used for the printer file must be SPL:SPOOLEDRAW.
3) Run desired program(s) .
4) Terminate the program(s).
5) Terminate the CMD program (an absolute necessity).
6) Select the SPOOLEDRAW entry from the printer queue then click
the PRINT gadget to start printing.