DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

lprint(C)


lprint -- print to a printer attached to the user's terminal

Syntax

lprint [ - | file ] ...

Description

lprint prints one or more files to the printer port of your terminal.

The option - instructs lprint to print from its standard input. If no other arguments are given, lprint prints from the standard input alone.

lprint understands the following environment variables:


CRDELAY
If set to n or N, disables the delay on carriage return.

FORMFEED
If set to y or Y and FORMS is not set to x (not transparent), output a form feed character to the printer to start a new page.

If set to n or N and FORMS is not set to x (not transparent), output the required number of blank lines to start a new page.

The default for most terminals is to assume FORMFEED is set to y or Y. The default for terminals such as the DT-1, which cannot handle form feeds, is to set FORMFEED to n or N.


FORMS
If set to x, lprint allows transparent printing without any processing of characters (including form feeds).

If set to p=lines, defines the page length a the number of lines. The default page length is 66 lines. The page size is ignored if FORMFEED is set to y or Y.


LPENQACK
If set to n or N, disables ENQ/ACK handshaking with the printer.

If set to y or Y, enables ENQ/ACK handshaking with the printer. lprint times out after 10 minutes if it does not receive an ACK from the printer.

ENQ/ACK handshaking is enabled by default.


NOFF
This variable is needed for applications that require a form feed at the end of the document.

lprint outputs a form feed to the printer at the end of the document if:

If NOFF is set to f or F, no extra form feed is output at the end of the document.

The default is to assume NOFF is set to f or F.


TERM
Determines the local printing capabilities for the terminal (defined in its compiled terminfo(M)-format file).

TERM must be set in the environment for lprint to work.

Exit values

lprint exits with a value of 0 if successful; otherwise, it exits with a value of 1 if an error occurs and prints a diagnostic message on the standard error output.

Diagnostics


Can't find terminal description for a TERM
There is no terminfo(M) entry for the terminal type defined in the environment by the variable TERM or no terminal type is defined.

terminal does not support local print
The terminfo entry for the terminal does not define support for local printing.

Can't find your terminal!
The standard output of lprint is not directed to a terminal.

Examples

Print a message and the files report1 and report2 on the local terminal printer:

lprint report1 - report2 <<%%
This message will be printed after report1 and before report2.
%%

Limitations

Your terminal must have local printing capability. Its terminal type must also have entries defined in its terminfo(M) file for mc5 and mc4 (strings to start and stop printing using ENQ/ACK handshaking). These entries correspond to the entries for PN and PS (or ps and pf) in the termcap(F) file.

Only certain terminals have entries that define the capability for remote printing (for example, the Wyse 60 and Hewlett-Packard hp2621p). You may need to add the appropriate control or escape character sequences for mc5 and mc4 to the entry for your terminal.

To do this:

  1. Use infocmp(ADM) to produce an ASCII version of the terminfo file for the terminal.

  2. Edit this to add the appropriate entries.

  3. Recompile the file using tic(C).

A terminfo entry for mc51 (corresponding to 5i in /etc/termcap) defines the string to prevent text sent to the printer being echoed to the screen. lprint does not attempt to use this entry if it exists.

You must also set the communications parameters on the terminal for the printer port (transmission rate, handshaking, data/stop bits, and parity).

DT-100 terminals should have their handshaking set to OFF (preferred) or XON/XOFF; do not use DTR handshaking for local printing on these terminals.

The delay on form feeds cannot be disabled.

Files


/usr/lib/terminfo/[a-zA-Z0-9]*/*
compiled terminfo terminal capability files read by lprint

/etc/termcap
terminal capability file; lprint does not use this file

See also

infocmp(ADM), lp(C), termcap(F), terminfo(M), tic(C)

``Managing printers and print jobs'' in the System Administration Guide

Standards conformance

lprint is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003