home *** CD-ROM | disk | FTP | other *** search
- The lp.cpp program was somthin that I wrote to confound a C teacher that
- I have in college. The oversight that I made was : the man was souch a
- weak coder to begin with, he just looked over the code, and signed it off,
- without even noticing that a few things looked strange. Anyway, the deed is
- done, and I thought that there might be some folks out and about that would
- like to have a copy of this program.
-
- The purpose of the program is to allow a user, you or i, to send to his
- printer, prn or lpt1 or lpt3, a sequence of char, (12) or (27,64,23,74),
- easily, and with as little hassle as possible. The program takes for its
- arguments some commands like :
- -l list all of the flags and their descriptions
- -d send sequence of char's that makeup the code sequence for the printer
- to standard out. (included for a friend of mine who wanted to do ANSI
- stuff with his screen, as well as stuff the printer coded directly into
- text files)
- -f tell the program where to look for these secrete codes, that is to say
- what file. The program assumes lp_codes.out, to chage this to say,
- pr_codes.txt the command line would have in it -fpr_codes.txt.
- if the file cannot be found in the current directory the PATH will
- be searched for the specified file name.
- -p wich lpt device do you want.. the def. is lpt1: if you need to send it
- to lpt2: then by all means, use the -p2 directive.
- -? slightly helpfull reminder as to what the flags are.
- everything else, that is not preceeded by a '-', is considered a flag. All
- flags that are matched to somthing in the text file cause the related
- ascii codes to be sent to the printer, all those that are not found,
- cause error messages.Flags are sent to the printer in the same order
- that they occure in the command line.
- NOTE : please remember that they may come in any order. RE: the flags and
- directives.
-
- A word or two about the file : LOOK AT THE EXAMPLE. It is rather simple
- really, end your lines with carrage returns, use the case you think is
- appropriate, and place the lines in groupletts of three as follows.
- .
- .
- .
- flag(CR)
- Text string describing the flag(CR)
- a seriese of text decimal values that represent the char's to be sent.(CR)
- flag(CR)
- Text string describing the flag(CR)
- a seriese of text decimal values that represent the char's to be sent.(CR)
- .
- .
- .
- There is almost no error checking done on the file itslef, if the groups are
- ont contigous, or ther is an incomplete one, the program will not care. The
- -l directive can be helpfull in determining correct alignment.
-
- One last word. Litigation. Now we'll have none of that! This program is
- provided as is, with source code included. If it works for you, and you like
- it, gr8!!!, send a check of money order for $5.00 (or however much you think
- is worth the postage) to the address below, however if this segment crashes
- your computer, or in anyway causes harm, the responsibility is not mine : you
- new the code was dangerous when you ran it.
-
-
- - dudley farthing
- 10040 silverton ave.
- tujunga, calif.
- 91042
-
-