home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
wp4
/
prin28.lzh
/
PRIN28.DOC
< prev
next >
Wrap
Text File
|
1990-08-02
|
11KB
|
278 lines
PRIN
Version 2.8
Copyright (C) Drake Koefoed 1990
By use of this program, you agree to hold the author free from any
liability of any kind.
HOW TO USE PRIN
===============
PRIN is called up by the command
PRIN filename [options]
where (filename) is the name of a file. If no filename or options are
specified, you get a help screen. Otherwise, PRIN will print the
contents of the file named, at 60 lines per page (unless you specify
another page size with the /l parameter, explained below) Unless you
use the /n parameter (explained below), PRIN will print the filename
in all caps at the top of the first page.
You may abort what's printing at any time by pressing escape. PRIN
will discontinue printing the file, but bear in mind that there are
two factors to consider:
* Your printer may have a substantial buffer, which is usually full
because PRIN runs much faster than a printer. The printer will
continue to print what's in that buffer, even after PRIN has been
aborted, though PRIN will return to the DOS prompt.
* PRIN checks for an escape before sending each line; DOS suspends
PRIN while the printer empties enough of its buffer to accept
another line; only when PRIN has control back will it abort the
printing.
While we're speaking of aborts, it helps to turn the printer on before
you start printing, but you don't have to. If it's off, you will get
the nasty message from DOS: "Error writing device PRN. Abort, Retry,
Fail, Ignore?". Just turn the printer on and hit r. It will print as
if nothing had happened. I do this a lot because I turn my printers
off when something goes wrong, and when you're testing a printing
program, that is not uncommon.
In answer to the obvious(?) question, no, I can't test if PRN is on. I
could test to see if LPT 1 was on, but you can use the MODE command to
redirect PRN to another port, in which I would be testing the wrong
device. If this doesn't make any sense to you, don't worry, you don't
need to know it.
PRIN filters out all form-feeds embedded in the file, so it totally
ignores the existing pagination of the file. This is handy when
printing out shareware documents that have wierd page lengths, useless
formfeeds, or no pagination at all.
PRIN sends an Escape-@ to the printer on startup, (unless you use the
i option, explained below), which is a RESET to an Epson and many
others. Some printers, however, may not understand this code, in
which case they will not reset.
PRIN depends on you to set the paper to the TOP OF FORM before
starting. 60 (or whatever is set by the /l parameter) lines will be
printed, and then a formfeed. When the end of file is reached,
another formfeed will be sent to eject the last page, and PRIN will
exit.
COMMAND LINE OPTIONS
====================
All switches are lowercase; uppercase are being reserved for future
options, for instance, P will be filename on each page as well as a
number, and M will be force a margin even if I have to wrap to do it.
Spaces or forward slashes will have the same effect. Programmers refer
to these things as delimiters, because they mark the limits of the
filename and the command line parameters. If you use some that are not
needed, you will get a period on the screen as each is found. Your
printout is not affected. This is just to tell you you don't need to
type so much.
NO FILENAME AT TOP OF FIRST PAGE: n
-----------------------------------
The n option prevents the filename from being printed. You can say
PRIN myfile/n
or
PRIN myfile n
Either will stop the filename from being printed.
OMIT DATE AND TIME FROM FILENAME: o
-----------------------------------
The o option prevents the date and time of the file from being printed.
If the filename is not printed, then the date and time are automatically
left off.
LINES PER PAGE: l
-----------------
The l option sets the number of lines to the number following.
For example:
PRIN filename l55
would cause PRIN to print out the file called filename at 55 lines per
page. This number must be two digits. ( use 05 for 5 lines per page.)
PAGE NUMBERING: p
-----------------
The p option numbers the pages in the upper right.
MARGIN AT LEFT: m
-----------------
The m option adds a left margin of five characters
unless the line is too long. I add a margin to any line that will fit
on the page with one. If it won't I print that line without a margin.
Using the default linelength, you will get margins if your lines are
not over 75 characters. This feature keeps your printout away from
the area that hole punches punch in.
RIGHT MARGIN: rxx or rxxx
-------------------------
(where xx or xxx is a number between 10 and 256.)
r is the maximum line length. The default is 80. the r parameter
sets the point at which PRIN will wrap. I wrap at the last space
before that. I back up half the line length looking for a space
before I give up and call a procedure called "dumbwrap" that cuts the
"word" at the edge of the print area. Since
"antidisestablishmentarianism" is well under 40 characters, you will
probably not see "dumbwrap" at work unless you try to print out some
graphics boxes and use too narrow a margin. The default wrap point is
the last space before 80 characters. This option is not a substitute
for a word processor. It wraps those lines that do not fit, but
starts the next line at the beginning. It is intended primarily to
protect the occasional long line in program source code from being
chopped off on printing, or printing off the edge of the paper.
INITIALIZATION OFF: i
---------------------
You may want to use a batch file that sends a file to the printer with
copy or some program to set your printer to near letter quality or
whatever. If you do, this option prevents PRIN from sending the reset
and wiping out what is in the printer's memory. This means PRIN will
use whatever font, top of form, etc. the printer is currently set to.
DOUBLESPACE: d
--------------
Prints blank lines between the lines in the original file. Handy for
creating a scratch copy of a file without changing the file itself,
especially if you're writing the file with an editor that does not do
doublespace.
PRINT TO FILE: f
----------------
Prints the output to a file. This file may be printed later with the
copy command. This lets you use prin to generate such things as
shareware doc files on discs with embedded formfeeds and page numbers.
Normally you would not use prin to print this output file, because
prin would just filter the formfeeds back out again. Prin outputs a
line at a time, which is reasonable for a printer, but not very
efficient for writing to files. Large documents are best handled by
writing to a ram disc and then copying.
SET TABSIZE: b
--------------
Sets the tabsize to a single nonzero digit, 1 to 9.
for example:
PRIN filename b5
would cause prin to space over to the next column that is a multiple of 5
each time a tab is encontered. Default is 8, which is the same as DOS print
uses.
CAPITAL LETTER OPTIONS:
-----------------------
CLONE: C
--------
Clones the program to the current settings. The file to be cloned must
be named prin.com, and it must be in the current directory. Once
cloned, the program may be named anything you wish provided you keep
the extension .com. This may be useful for creating one copy that prints
doublespace, one that prints with no filename, etc, so you can avoid typing
any parameters at all.
KLONE: K
--------
Klones the program to the defaults. the file to be cloned must be
named prin.com, must be in the current directory. You must give a
filename, but if you do not want to print something with the current
settings, the file you name should be nonexistant. Klone will take
effect, and then prin will try to open the nonexistant file to print
out, and exit with the file not found error message. Klone affects the
file on disc, not what is in memory.
EXAMPLE:
--------
prin nonesuch K
This would Klone the program to the defaults, and then look for
nonesuch to be printed with the existing settings. Since nonesuch does
not exist, nothing will be printed with the settings in memory (the
old ones), and prin will exit, having changed the program on disc to
the default settings. The next time PRIN is called, the default settings
will be in effect.
EXAMPLES
========
prin prin25.doc
This would print PRIN25.DOC at 60 lines per page, with the filename at
the top of the first page.
prin prin25.doc l58 n m p
This will print PRIN25.DOC at 58 lines per page *without* the filename
at the top, and add a margin of five spaces at the left, number the
pages.
PRIN is written in ASSEMBLER, so it is very small and fast. I have run
{COMMO} in one window of Desqview and PRIN in another with no
noticable slowing of print speed on an 8mhz XT. PRIN and PRINS.BAT
can run in a 7k window under Desqview. You will find PRIN works much
better than the DOS print in this situation, because it uses much less
CPU time.Also, PRIN is NOT memory resident.
ERROR CODES
===========
On errors, I save the DOS error code and return it on termination, so
you can find out what went wrong if you want. On successful termination,
I return an errcode of zero. My own errcodes start at 96. (60h). Have
fun, batch freaks!
I NEED TESTERS!
===============
If you print things PRIN is good for, I would like to have you run the
latest versions of the program.
The best way to leave me a message about the program would be on:
Gravesend (707) 795 4939
Directory Assistance (707) 538-8710
CC&C (707) 584 3441
VOR (707) 778 8944
Motherboard (707) 778 8743
REGISTRATION: Now here is my favorite part: If you use prin, and it
works for you, the right thing to do is to pay for it. Please send a
self addressed stamped envelope and $5 to the address below. The
envelope will be used to send you a password and instructions for
converting PRIN to the registered version.
PRICING: Prin is priced considerably lower than most comparable
programs. This reflects a view of shareware that it should be less
expensive than commercial software even when it's better. If users
enthusiastically upload it, and encourage others to register, I think
I will eventually be paid reasonably for the work I have done.
Drake Koefoed After Sept '90 I will be at
8120 Tarwater road 1409 Oakpatch road # A 9
Santa Rosa, CA 95404 Eugene Oregon 97402
LAURELS AND LEGALESE
====================
Desqview is the property of Quarterdeck. It's a great program.
{Commo} is the property of Fred Brucker. It's a greater program.