home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
335.lha
/
Print-Handler_v1.1
/
ReadMe
< prev
next >
Wrap
Text File
|
1990-01-10
|
2KB
|
52 lines
Print-Handler.c v1.1, 30 September 1989
This printer device handler implements the single sheet support
and data-spooling facility the usual PRT: device does not have.
Each time a page has been successfully transferred to the printer
and single paper sheets are selected in Preferences, a requestor
pops up on the Workbench screen telling the user to insert the
next sheet of paper. If a process addresses this handler via
Open() and Write()s data to it, the incoming text is buffered
until the data stream is Close()d. After that the buffer sent to
the printer device and finally gets discarded. Note that there
will be a buffer for each calling process (up to twenty callers
are allowed), so you may get low on memory. This handler will
notice low memory situations and return a write error in critical
situations. This handler does no first-in-first-out or last-in-
first-out data stack handling, the first data to come out is from
the first buffer to be closed
Don't be confused if the requestor pops up while the printer is
still working. Since most printers have a write buffer of their
own true synchronous printer I/O is almost impossible.
Installation is as follows:
Add the following lines to your DEVS:Mountlist
PRT: Handler = L:Print-Handler
Stacksize = 3000
Priority = 5
GlobVec = 1
#
Add the following lines to your S:Startup-Sequence
Assign PRT: Remove
Mount PRT:
Copy Print-Handler to your L:
Skeleton handler code by Phillip Lindsay (C) 1986 Commodore
You may freely distribute this source and use it for Amiga Development,
as long as the Copyright notice is left intact.
Print-Handler (C) Copyright 1989 by Olaf Barthel & ED Hannover
Contact: Olaf Barthel, Electronic Design Hannover
Brabeckstrasse 35
D-3000 Hannover 71
Federal Republic of Germany