C-lists & terminal printer spooling

Hendrik Vermooten hendrik at zeusa.UUCP
Fri Oct 5 00:14:49 AEST 1990


SPOOLING to a local printer on a terminal
-----------------------------------------

This might not sound like an internals question: but please read on.

PROBLEM: I want ANYBODY on the system to be able to SPOOL to a local
printer on a terminal, not just the person using it. If you just send
print-through on/off codes from a spooler to that device, they might
end up mixed with normal output for that terminal, which will then
also get printed.

Our system (XENIX 2.3.3) has an ARNET smartport on it. This thing has a
software feature (in the device driver?) called "simulprint", that
allows you to write to one terminal using any one of two device names.
You give it start/stop print-through codes that it uses to switch on the
transparent print-through to the local printer on the terminal.

The idea is that you set up the secondary name as the target device for
the print spooler. You can set up parameters such as the maximum % of
line bandwidth that the spooler may use, to minimize interference with
the user on the terminal.

I haven't used this feature myself, but by all accounts it works ok if
your printer has a reasonable buffer and the user on the terminal is
not too finicky.

Now all this is very fine, the only problem being that not all cards support
this feature.

QUESTION:  (at last! :-)

Can a similar feature be had PORTABLY without writing a new device driver?

A friend (mje at olsa99.UUCP) gave me this idea (which I haven't tried yet,
because I don't know how reliable it will be, & I want the net's opinion
first):

He says that c-lists are 64-byte (or something) buffers. If I write a C
program that "batches" together my printed output into "packets" of less
than 64 bytes (including the print-through on/off codes), and use a
write() to the terminal device he suspects that the kernel will always
group each c-list together and not mix them.

I would appreciate anybody helping me out on this. I would like to know
how reliable this type of approach will be, how portable, how to set
ioctl() if appropriate, and any other comments.

I hope I haven't missed anything, & thanx in advance.

--------------------------------------------------------------------------
Hendrik Vermooten, ZEUS software  Tel [27 12] 64-5507, FAX [27 12] 64-8382
Bang: ..!uunet!ddsw1!olsa99!zeusa!hendrik     or        hendrik at zeusa.UUCP
--------------------------------------------------------------------------



More information about the Comp.unix.internals mailing list