home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
utils
/
prntutil.zip
/
LINES.DOC
< prev
next >
Wrap
Text File
|
1987-04-29
|
9KB
|
172 lines
.en This file is formatted for IMAGEPRINT
.nw
.lm 5
.ef
.ef LINES V2.0 INSTRUCTIONS...&&...4/29/87
.ef
.ef
.ef
.ef
.ef
INSTRUCTIONS FOR LINES V2.0
By Mike Callahan
National Weather Service, Louisville, KY
April 29, 1987
One of the greatest things about the IBM extended character set is the
line drawing characters. Using these, one can make very professional
looking forms right on the screen. However, many word processors cannot
display these characters, and even in the ones that do, the process of
looking up which of the 38 characters to use for line intersections and
entering these characters using the Alt key quickly becomes a chore.
LINES changes all of that. Using any word processor or editor, the user
simply includes special marks of where they want horizontal or vertical
lines and intersections. The marks are as follows:
- for single horizontal lines,
= for double horizontal lines,
| for single vertical lines,
" for double vertical lines,
+ for intersections which connect to other intersections with single lines,
# for intersections which connect to other intersections with double lines,
* for intersections which are not connected to other intersections.
After this is done, the user saves this information in an ASCII file and
runs the program. LINES will scan the file and intelligently converts
the marks to the line drawing characters in a few seconds.
HOW THE PROGRAM WORKS
To run the program, type the following line:
LINES INNAME OUTNAME where:
INNAME is the name of the input file. If omitted the program will not work
and will remind you to type an INNAME.
OUTNAME is the name of the output file. If omitted the program will write
over INNAME. If OUTNAME is PRN, the line drawings will go to the printer
if your printer can handle line drawing characters.
Here is an example of what lines will do. Imagine TEST.TXT contains the
following text:
*=*=============*=*===============##================#
"a| | is a bar |d| = is a equals ""connecting boxes"
*-*-------------*-*---------------++----------------#
"b| + is a plus |e| # is a pound "
*-*-------------*-*---------------**--------------------*
"c| - is a dash |f| " is a quote ""non-connecting boxes"
*=*=============*=*===============**====================*
.pa
After typing: LINES TEST.TXT TEST.PIC, TEST.PIC will look like this:
╔═╤═════════════╤═╤═══════════════╦╦════════════════╗
║a│ | is a bar │d│ = is a equals ║║connecting boxes║
╟─┼─────────────┼─┼───────────────╫╨────────────────╜
║b│ + is a plus │e│ # is a pound ║
╟─┼─────────────┼─┼───────────────╢╓────────────────────╖
║c│ - is a dash │f│ " is a quote ║║non-connecting boxes║
╚═╧═════════════╧═╧═══════════════╝╚════════════════════╝
Notice that the program has intelligence. Whenever it finds a mark, it
looks behind, ahead, above and below that character. If it does not
find another mark, it leaves the character alone.
When using WYSIWYG (What You See Is What You Get) word processors, make
sure that printer control codes (such as boldface, underline, etc.) do not
mess up how characters line up. Sometimes, it is best to convert text to
line drawing characters first, and then insert the codes.
For an example of a real application, here is a sample input file named
FORM.TXT:
A SAMPLE FORM
========*=============================*===========================*========
NAME " | |
--------*------------*-last-----------*------------first----------*-middle-
ADDRESS " | |
--------*---number---*-----------street---------------*-----------*--apt---
TOWN " | |
--------*--city----------------*-------------*--------*---state---*--zip---
STORE " " SALESPERSON "
========*======================*=============*=============================
========*====================================================*=============
QTY | ITEM | COST
========*====================================================*========*====
| | |
--------*----------------------------------------------------*--------*----
| | |
--------*----------------------------------------------------*--------*----
| | |
--------*----------------------------------------------------*--------*----
| | |
--------*----------------------------------------------------*--------*----
| | |
========*========================================*===========*========*====
*------------------------* " SUBTOTAL | |
VISA | | *-----------*--------*----
*------------------------* " SALES TAX | |
MC | | *-----------*--------*----
*------------------------* " TOTAL | |
*===========*========*====
.pa
And here is what the converted form looks like:
A SAMPLE FORM
════════╦═════════════════════════════╤═══════════════════════════╤════════
NAME ║ │ │
────────╫────────────┬─last───────────┴────────────first──────────┼─middle-
ADDRESS ║ │ │
────────╫───number───┴───────────street───────────────┬───────────┼──apt───
TOWN ║ │ │
────────╫──city────────────────╥─────────────╥────────┴───state───┴──zip───
STORE ║ ║ SALESPERSON ║
════════╩══════════════════════╩═════════════╩═════════════════════════════
════════╤════════════════════════════════════════════════════╤═════════════
QTY │ ITEM │ COST
════════╪════════════════════════════════════════════════════╪════════╤════
│ │ │
────────┼────────────────────────────────────────────────────┼────────┼────
│ │ │
────────┼────────────────────────────────────────────────────┼────────┼────
│ │ │
────────┼────────────────────────────────────────────────────┼────────┼────
│ │ │
────────┼────────────────────────────────────────────────────┼────────┼────
│ │ │
════════╧════════════════════════════════════════╦═══════════╪════════╪════
┌────────────────────────┐ ║ SUBTOTAL │ │
VISA │ │ ╟───────────┼────────┼────
├────────────────────────┤ ║ SALES TAX │ │
MC │ │ ╟───────────┼────────┼────
└────────────────────────┘ ║ TOTAL │ │
╚═══════════╧════════╧════
There are some possible intersections of single and double lines that
are not included in the IBM line characters. If this is the case, LINES
will leave the mark in the file. For these rare cases, one can simply
insert a substitute intersection character using the Alt key.
It is possible to get a printer copy of any LINES converted files using
IMAGEPRINT from Image Computer Systems. This is an excellent user-
supported program that lets printers produce near-letter quality text
in several fonts and pitches as well as the entire IBM extended character
set. The cost is $20.
Have fun and let me know if you enjoy it and/or make any improvements. By
the way, there is absolutely no restrictions or fees on this program.
However, I would like some credit if you use my code. That is only fair!
The entire C source is in lines.c on this disk. I used generic C as much
as possible so porting should be no problem.
Mike Callahan
National Weather Service
1020 Standiford Lane
Louisville, KY 40213