home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
maj
/
swag
/
reader.doc
< prev
next >
Wrap
Text File
|
1994-08-26
|
18KB
|
384 lines
READER.EXE v2.9
(SWAG packet READER)
(c) GDSOFT
August 1994
INTRODUCTION
------------
SWAG (SourceWare Archival Group) is a collection of source code and program
examples for the PASCAL programming language. The material has been donated
by various PASCAL programmers from around the world, who desire to
contribute to the advancement of one of the greatest programming languages
there is. MANY THANKS to all who have contributed. As such, NO CHARGE OF
ANY KIND IS PERMITTED FOR THIS WORK.
The material has been collected from various network conferences worldwide,
and organized according to subject. New material is added quarterly, and
new SWAG packets are available from various BBS sources on a FIRST call
basis. See BBS.TXT for current support sites and how your BBS can join.
GETTING STARTED
----------------
The program READER.EXE is a executable program that will allow you to read,
extract or print the contents of SWAG packets. These packets are organized
according to subject, with each one containing a number of PASCAL "snipets"
on that subject. In the rest of this document, I'll refer to the program as
"READER".
The SWAG packets should be placed ALL together in a directory on your disk.
It is recommended that you create a single directory named '\SWAG'. You can
use the DOS command :
mkdir c:\swag
Unpack the distribution archives and place all of the files with the
extension of "*.SWG" in this directory along with READER.EXE.
USING THE READER
----------------
Using the reader is really very simple. Just execute it, and you will be
presented with a directory of all of the .SWG files in the directory that
READER is located in. If you have .SWG files elsewhere on your disk, or for
that matter, any disk on your system, you can move around the disk to find
them by selecting the ".." file which will take you to the PARENT
directory. Use the HOME, END and the arrow keys to maneuver around.
ALSO,
The directory window is search key sensitive. This means that if you have
.SWG files or directories listed in the directory box, you can just type
the name of the file you want. For example, pressing 'A' will place you at
the first entry starting with 'A'. Press 'N', and you will jump the the
entry with 'AN...' if you have one. If NOT, you will jump the first file
starting with the letter 'N'.
At the bottom of the screen you will notice a menu indicating some cursor
and function keys :
F2 - GREP
F5 - Toggle STATS
<ENTER> - GO
ESC - QUIT
F2 calls the GREP (search) function. This is a VERY POWERFUL and useful
function, but in order to use this function, you MUST have at least ONE
.SWG file in the directory box, and it MUST be highlighted !! Place the
cursor any one of the .SWG files, and press F2. You will be presented with
a prompt window :
SWAG Message Base Reader 2.8
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓┌ D:\SWAG\FILES\ ▓▓┌──────────── SOURCEWARE ARCHIVAL GROUP ───────────┐▓▓
▓▓│ [A:\] │▓▓│ │▓▓
▓▓│ [B:\] ▓▓▓│ Your SWAG Support Team : │▓▓
▓▓│ [C:\] │▓▓│ │▓▓
▓▓│ [E:\] │▓▓│ Gayle Davis Goshen, Indiana 46526 │▓▓
▓▓│ ..\ │▓▓│ Kerry Sokalsky North York, Ontario M2P 1L2 │▓▓
▓▓│ ANSI.SWG │▓▓│ │▓▓
▓▓│ ARCHIVES.SWG │▓▓│ About SWAG : │▓▓
▓▓│ CHARS.SWG │▓▓│ │▓▓
▓▓│ CMDLINE.SWG │▓▓│ SWAG is a collection of source code and program │▓▓
▓▓│ COLOR.SWG │▓▓│ examples for the PASCAL program language. The │▓▓
▓▓│ COM┌────────────────────── GREP SWAG Files ───────────────────────┐L │▓▓
▓▓│ COP│ Search For: CURSOR&CRT|ANSI&FILE │n │▓▓
▓▓│ CRC└──────────────────────────────────────────────────────────────┘t │▓▓
▓▓│ CRT.SWG │▓▓│ programming platforms available today. │▓▓
▓▓│ CURSOR.SWG │▓▓│ │▓▓
▓▓│ DATATYPE.SWG │▓▓│ MUCH THANKS AND GRATITUDE TO ALL CONTRIBUTORS !! │▓▓
▓▓│ DATETIME.SWG │▓▓│ NO Charge of ANY kind is permitted for this work │▓▓
▓▓└────────────────▓▓│ │▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓└──────────────────────────────────────────────────┘▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
Enter a string to search for. You may search for a multiple occurrence of
substrings using BOOLEAN operators AND (&) OR (|). For example, a search
for THIS&THAT|THEM&THOSE would return all snipets containing both ORed
phrases THIS&THAT OR THEM&THOSE.
In BOOLEAN Algebra, the AND operator takes precedence over the OR operator
(except when using parentheses). This is NOT the case with the GREP
function. You can use the PARENTHESES () to dictate which portion of the
search string is to be processed first. If multiple levels of parentheses
are used, the order is RIGHT to LEFT, starting with the innermost set of
parentheses, wherever they occur.
As an example, in the phrase ((this|that)&(them&those)), (them&those) would
be processed before (this|that)) innermost to outermost. In other words,
all snipets will be returned containing THIS or THAT AND they also will
contain (THEM and THOSE).
Within a set of parentheses, order will be left to right. Construction of
the search string itself requires combining the desired substrings together
with the desired BOOLEAN operators. Without the parentheses, the search
string will be processed logically. THIS|THAT&THEM&THOSE will return all of
the snipets that contain THIS plus the ones that contain THAT & THEM &
THOSE. You can see that this is totally different than what you'll get by
using the parentheses.
Additionally, you can also include a date in the format MM/DD/YY, and ONLY
records AFTER this date will be included. If you enter JUST the date, ALL
SWAG snipets AFTER this date will be included. For example, entering
CURSOR|ANSI&CRT|05/08/93 would search the SWAG packets for matches for
CURSOR OR (ANSI AND CRT) occurring AFTER 05/08/93. Entering JUST 05/08/93
at the prompt would bring back ALL snipets AFTER 05/08/93 REGARDLESS of the
subject.
Enter an empty string as the search string, and READER will return all
snipets since the LAST SWAG release.
READER will search ALL of the SWAG packets in the CURRENT directory for
matches based on your criteria. A processing box will appear, and all
occurrences of your search string(s) or date matches will be written to a
NEW SWAG file. Initially, this file is named GREPSWAG.SWG, and will be in
the current directory. Upon completion of this GREP process, you will be
asked for the file name. Enter any name AND directory you choose, and the
file will be RENAMED and moved to that directory. This process allows you
to create SWAG files containing ANY combination of material that you
please.
You can ALSO search JUST the HEADER of the SWAG snipet. Just enter a tilde
(~) character as the FIRST character on the search line. For instance to
find all snipets by GAYLE DAVIS, you would enter ~GAYLE DAVIS on the search
line. ONLY the header of snipets is searched for matches. This a way you
can look at all snipets by a certain contributor. You can also use multiple
search criteria here. For instance, ~GAYLE DAVIS|GUY MCLOUGHLIN|JOE BLOW
would bring back everything for each of these persons. This search method
is VERY fast as on the headers have to be read. By the way, the same rules
about AND/OR searching apply when search just the headers.
F5 toggles the STATS function. In order for this to work, you MUST have at
least ONE .SWG file in the directory box, and it MUST be highlighted !!
Place the cursor any one of the .SWG files, and press F5. You will be
presented with an EXPANDED directory list showing the description of each
.SWG file and the number of snipets in each.
VIEWING, EXTRACTING, PRINTING SWAG SNIPETS
------------------------------------------
Once you have some .SWG files in the directory box, press <ENTER> and the
package will be read and you be able to manage the SWAG snipets.
You will be presented with a list of all of the snipets contained in the
package with descriptions for each.
At the bottom of the screen, will be the following menu.
│ │
│ F1-Help ▀ F3-Options ▀ ┘- Read ▀ F4-Write ▀ ESC-Quit ▀ │
│ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ │
F1 - provides some "quick" ALT keys.
┌──────────── READER : HELP ───────────┐
│ Alt F Find Text │
│ Alt S Sort Index │
│ Alt T Tag ALL │
│ Alt U UnTag ALL │
│ Ctl S SHELL to DOS │
│ Spacebar Tag Current │
│ <ENTER> Read Item │
│ │
│ F1 Help │
│ F3 Program Options │
│ F4 Write Tagged Items │
│ ESC Quit Program │
└──────────────────────────────────────┘
F3 - brings up the OPTIONS menu.
┌──────────────────────┐
│ About │
│ Sort - (ALT S) │
│ Spacebar Tag - ON │
│ Colors │
│ Dos Shell │
│ Screen Lines - 25 │
└──────────────────────┘
<CR> - read the snipet
F4 - Write TAGGED items
ESC - Quit
43/50 LINE VIDEO
----------------
You will have the capability of using 43/50 line screens if you have EGA or
better. The option can be found in the OPTIONS menu (F3). It is
automatically disabled if the user doesn't have the capability. Select
SCREENLINES, and if you have an EGA/VGA, you'll get 43/50 line mode.
COLORS
------
To be quite honest, the whole business of allowing users to change colors
is quite a problem. It adds a lot of code to the program, and more often
than not, it is used only once by the user. Therefore, the color selection
if VERY limited.
There are four color group choices available. LIGHTGRAY, BLUE, CYAN, RED,
GREEN and MAGENTA. Select one that you find pleasing. This will be disabled
on monochrome monitors.
DOS SHELL
---------
You can shell out to DOS from within the READER. This ability is here on
the OPTIONS menu. You can ALSO do this at ANYTIME by using CTRL[S] key
sequence.
SORTING
-------
ALT S on the main selection window brings up the SORT box. The snipets can
be sorted by :
┌────────────────────────────┐
│ │
│ Select Sort Field : │
│ │
│ C - CONFERENCE │
│ N - NUMBER │
│ T - TO │
│ F - FROM │
│ S - SUBJECT │
│ │
└────────────────────────────┘
TAGGING ITEMS
-------------
Snipets can be tagged by using the SPACEBAR. SPACEBAR tag can be turned OFF
in the OPTIONS menu. ALL items can be tagged with ALT T and untagged with
ALT U. Tagged items can be written to a file with F4.
READING SNIPETS
---------------
Pressing <ENTER> on any of the snipets allows it to be reviewed. You'll be
presented with the "snipet" screen and you can use the menu at the bottom
of the screen :
┌────────────────────────────────────────────────────────────────────────┐
│ ▀ Next(+) ▀ preV(-) ▀ Mark ▀ Find ▀ Extract ▀ Kill ▀ Print ▀ ESC-Quit │
│ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄▄▄▄ ▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄ │
└────────────────────────────────────────────────────────────────────────┘
To accommodate many of the QWK reader users out there, you can use the
PLUS(+) and MINUS(-) keys to display the NEXT or PREVIOUS snipet OR the
SPACEBAR key will display the NEXT snipet. You can Mark, Find, Extract,
Kill or Print snipets. If you have a mouse, you can select any of these
functions by using the LEFT button on any item.
EXTRACTING SNIPETS
------------------
Snipets can be extract to an ASCII file by selecting and pressing the 'E'
key. Enter the filename, and the data with be written out. If the file
selected is already on your disk, you will be asked if you want to APPEND
or OVERWRITE.
KILLING SNIPETS
---------------
Starting with version 2.9, you are able to delete (KILL) snipets that you
do not want for some reason. BE CAREFUL HERE !!! Once deleted, they are
gone forever. Upon exit from the file, the entire .SWG file will be rebuilt
to eliminate the killed snipet.
WRITING TAGGED SNIPETS
----------------------
Once you have tagged a group of snipets, you can write them to an ASCII
file using F4. Enter the filename, and if it exists, you will be asked if
you want to APPEND or OVERWRITE. All of the tagged items will be written
sequentially.
FINDING TEXT IN SNIPETS
-----------------------
You can use the (F)ind command to find text located within the SWAG
snipets. This works JUST LIKE the BORLAND PASCAL IDE. You can ALSO use the
^Q^F key sequence to activate this function. Just as with the IDE, ^L
displays the NEXT find.
SWAG SNIPETS MARKED WITH CHECKMARK
----------------------------------
If you see snipets with a CHECKMARK (#251) beside them, this indicates a
NEW item added since the LAST update. The READER.EXE keeps track of this
and marks these automatically. The checkmark is only there for your
reference.
THE READER INI FILE
-------------------
The READER program keeps several of its program defaults in an INI file
(simple ASCII) in the same directory as READER.EXE. Contained in this file
are several items that you can change to affect the way the program works.
The lines in this file have the format LABEL=VALUE.
The file looks like this :
COLOR=LIGHTGRAY (LIGHTGRAY,BLUE,CYAN,RED,GREEN,MAGENTA)
43/50=NO (YES or NO)
SORT=n (nUMBER,fROM,tO,sUBJECT,cONFERENCE)
TEXTEXT=PAS (default extension for extracted files)
EXTRACTDIR=D:\TEMP\ (default directory for extraction)
PRINTER=LPT1 (printer port [LPT1,LPT2,LPT3,LPT4])
SWAGDIR=\SWAG\FILES\ (Wherever you keep them)
SWAGADDS=YES (Display those BBS adds at the top (YES/NO)
You can change this file using any word processor. I think that you'll get
the idea.
COMMAND LINE USAGE
------------------
Starting with this version of the READER, individual SWAG packets can be
read from the DOS command line. Simple type READER swagfilename. For
example, you can look at all of the snipets in ANSI.SWG by typing :
READER ANSI.SWG <ENTER>
You don't really need to enter the extension, as the READER will append it
for you. If the .SWG files are not in the current directory READER will
look for them somewhere on your current PATH.
XX3402 ENCODED FILES
--------------------
Many of the SWAG snipets contain code that has been encoded using Guy
Mcloughlin's XX3402 encoder. This has been done due to the necessity to
include OBJ code in the snipet, and this allows us a way to do it. What
this fine program does is to create an ASCII encoded file containing the
BINARY data. You need to "CUT" these items from the snipet, giving it a
unique name, and decode it using XX3402. It's really an easy thing to do.
Once you cut your file out, just execute from the DOS command line :
XX3402 d yourfilename
Magically, the file needed to compile the snipet will appear !! It's just
that easy. See the file included with the SWAG distribution XX3402.ZIP for
complete instructions, and the COMPLETE SOURCE CODE to this fine program.
Thanks GUY for letting us use XX3402 for SWAG.
We hope that you find the READER easy to use, and the SWAG material
valuable in development of your PASCAL programs.
ENJOY !!!!! and GOOD PROGRAMMING !!!
Gayle Davis, Kerry Sokalsky and Jeff Fanjoy
SWAG Support Team