.po 1i
.TH TEXT M Zilog
.V 08/15/84 17:42:35
.\"@[$]text.M	1.2	08/15/84 17:42:35 - Zilog Inc.
.ad
.fi
.SH NAME
lp, text \- service line printer spooler print requests 
.SH SYNOPSIS
/usr/lib/lp [ options ]
.br
/usr/lib/text [ options ]
.SH DESCRIPTION
These programs are used by the spooling system to do the
actual copy of data from a print request to a printer
device.  
.I Lp
is used to print requests on line printers. 
.I Text
is used to print requests on text quality printers.
.PP
Each backend is started by
.I dqueuer(M).
The way backends are started is controlled by the 
configuration file (see the System Adminstrator Manual).
A backend program inherits three open file descriptors
from the dqueuer: RFFD (read file), SFFD (device) and
STATUSFD (status log).
Actual definitions of these variables can be found in
/usr/include/spool.h.
The 
.I lp
and 
.I text
backends copy data from file RFFD to file SFFD with minimal
processing of input.
Statuses are written to file STATUSFD.
.PP
In addition to printing, the backends perform functions required
by the specific device being used.
For instance, lp filters backspaces and text can perform stty(1)
calls before printing.
They also provide banner pages with appropriate information.
.PP
When invoked, backends are passed a parameter list generated by
dqueuer(M).
This list contains options generated by dqueuer(M) and those
options that may have been specified in the configuration file.
The options that dqueuer generates and that both backends recognize are:
.TP 3
.B \-B
Indicates that the file the dqueuer was to print could not be found.
In this case, RFFD is not open and should not be used.
This option is used to generate banner pages that say the file
could not be found, so it won't appear that the file disappeared.
.TP 3
.B \-c n
Indicates that the file must be printed multiple times.
The backend should create 
.I n 
copies of the output.
.TP 3
.B \-d 
.I dest
.br
Used in a destination portion of the banner page. 
.I Dest
is
a string of no other importance to the backend.
.TP 3
.B \-f 
.I filename
.br
Filename, printed on the banner page.
.TP 3
.B \-F 
.I from
.br
Indicates a 'from' string, for use on the banner page.
.TP 3
.B \-s 
.I spool_time
.br
A string in ctime(3) format, indicating when the file
was spooled to be printed.
This value is printed on banner page.
.TP 3
.B \-t 
.I title
.br
A string used as a title on banner pages.
.PP
The backend also looks in a file called '/etc/sitefile' to find
a string to be printed near the page breaks on the banner page.
It uses the string of characters on the first line of this file,
up to the first white space.
If this file does not exist, an appropriate default is used.
.PP
The text backend accepts one additional option, that can only
specified through the configuration file.
Its description follows:
.TP 3
.B \-T "[stty parameters]"
Set terminal parameters.
When a tty device is used as a printer,
it is disabled in 
the /etc/inittab file.
When this is done, the device is closed except when being
used to print upon.
This causes ZEUS to reset all terminal characteristics.
The -T option is used to set these characteristics so that
printing can occur.
The quoted string is passed, unchanged except for removal
of the quotes, to stty(1).
Thus, in the configuration file the line
.br
.nf
         D1,R,/dev/tty0,/usr/lib/text -T "1200"

.fi
would cause device 1 on the most recent queue to use stty
to set /dev/tty0 to 1200 BAUD before being used.
.fi
.SH "SEE ALSO"
dqueuer(M)
