home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
printer
/
lp
/
lp.doc
< prev
next >
Wrap
Text File
|
1995-02-27
|
8KB
|
186 lines
NAME
lp - prepare document for printer output (and print it)
VERSION
$VER: lp.c,v 1.18 93/01/18 01:27:15 tf Exp
SYNPOSIS
lp [-<options>] [infile] [@tocfile]
DESCRIPTION
LP was written to prepare one or more files for the output on a
printer. It should be used from within the command line of a
CLI/Shell and offers the this (quite suitable) variety of options:
INDENT <indent> Set the text indention (or left margin)
default is 0 (no indention)
WIDTH <charct> Set the page width (or right margin)
default is 80 characters
HEIGHT <linect> Set page height in #of lines per page
default is 66 lines
FILE <infile> Force next argument to be the input filename.
This is useful if the filename is the same
as an option name.
TO <outfile> Set output device or file (default is PRT:)
APPEND Append output to the print destination
(this is default for @tocfiles)
NOAPPEND Overwrite print destination (default)
REPLACE Replace the input file by the output file
TABSIZE [tabsize] Set tabsize and convert tabs to spaces
USETAB Send tabs, don't convert tabs to spaces
CRONLY Print with AUTO CR/LF option (send CR only)
LFONLY Turn off AUTO CR/LF option (send normal LF)
USEFF Use formfeed (FF) characters for new pages
NOFF Convert a formfeed into a sequece of linefeeds
(this is on by default)
PLAIN Print plain, don't init printer with the
leading file "ENV:InitPrinter"
NOPLAIN Add ENV:InitPrinter to the top of the file
(this is on by default)
MINI Print one line superscript, next subscript,...
NOMINI Turn off MINI option '-m' (default)
SKIPTOPAGE <pageno> Begin printing with the first line of
page <pageno>
SKIPTOLINE <lineno> Start with line <lineno> of the input file
default is 1, no lines to skip.
CLEANUP Delete spaces or tabs at the end of a line
(this is on by default)
NOCLEANUP Don't delete spaces or tabs at the end of a line
LEADER <string> Print <string> in front of each output line
This is of great use if you want to use a textfile
as a comment in a source file: LEADER ";"
NOLEADER Do not print any leading string
HEADER Print a page header (3 lines) with filename and
current date/time
NOHEADER Turn off HEADER option, don't print any header
HEADER is off by default
SINGLESIDED [pageno] Single sided page numbering beginning with
page [pageno], centered at the bottom of every
sheet
DOUBLESIDED [pageno] Page numbering for double sided output.
NOFOOTINGS No page numbering, no footings (default)
COLUMNS <columns> Set #of columns of equal width
default is 1, max. is 2 yet :-(
FEEDOUT Expand each file via LFs to fill up its last
sheet (start next file on a new page)
NOFEEDOUT Do not add anything to the end of file (default)
WITH <tocfile> Print a list of files (each with it's arguments)
You can save your favorite settings in ENV:LPOPTS. Any options given in
the command line (or in a WITH file) may override them.
Before printing anything LP builds up a directed graph and checks it.
This is because WITH files may contain further WITH files and LP is smart
enough to prevent you from producing neverending output as a result
of a cyclic graph. ;-)
EXAMPLE
Options coming with WITH files are the default for all sub files, i.e.
if you type
1> LP WITH tocfile TO ram:book INDENT 5
all files listed in "tocfiles" will be printed with an indention
of 5 and the default settings in ENV:LPOPTS (if there are any...)
WITH files can be created by using the FILES command coming with LP.
FILES works similar to the LIST command from the Workbench. It
prints the files in the current directory with a full pathname.
Legal options for FILES are:
-p "<prestr>" Print <prestr> in front of every filename.
Note that there is *NO* space character between
this <prestr> and the filename by default. If you
want a seperator you have to add it to <prestr>
-P "<poststr>" Print <poststr> after every filename.
What has been said about seperating spaces with the
-p option is valid here as well.
-r Collect files recursively, enter sub-directories.
Be sure to have set a large enough stack size for
FILES to enter the complete sub tree.
-q Quote filenames.
EXAMPLES
1> FILES dh1:foobar -p "pre " -P " post"
will print out sth like that:
pre foo1 post
pre foo2 post
.. .. ..
pre fooN post
1> FILES -q -r -pre "Delete " -P " QUIET" dh1: > ram:delete_dh1
will generate a "delete_dh1" batch file in your ram disk to delete
all files on your DH1: hard drive :-)
To check your output there is the TI utility coming with LP:
Just say
1> TI output
to get a result like
file "output" size: 4711 bytes, 42 lines <= 81 chars, 879 words
You may force TI to find lines that are longer than any given #of
characters by adding the -w (or CHECKWIDTH) option as shown in the
following example:
1> TI output CHECKWIDTH 80 TABSIZE 8
The TABSIZE is obsolete here since it is set to 8 by default.
There could be the following output:
ti: Line 17 "output" width 81 > 80
ti: Line 42 "output" width 81 > 80
If you get too much output (with larger files) you can tell TI to
break after the first line with the -b (or BRIEF) option.
Sometimes you want to know if there are any ESC sequences in a document
(maybe because your printer can't handle them) and so you can use
TI to FIND certain ASCII values:
1> TI output FIND 27
will show all lines containing an ESC character.
AUTHOR
This Shareware was written by Tobias Ferber, Baden-Baden, Germany.
If you want to contact me, please write to:
Tobias Ferber
Bismarckstraße 22
D-7570 Baden-Baden
Germany
EMail: Earn: ukjg@dkauni2.bitnet
X.400: ukjg@ibm3090.rz.uni-karlsruhe.dbp.de
InterNet: ukjg@ibm3090.rz.uni-karlsruhe.de
THANKS
LP was written in C using DICE by Matthew Dillon.
DICE is copyright (c)1990 by Matthew Dillon
891 Regal Rd.
Berkeley, Ca. 94708
USA
dillon@overload.Berkeley.CA.US
uunet.uu.net!overload!dillon
BIX: mdillon