READER.EXE v2.8 (SWAG packet READER) (c) GDSOFT May 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 - 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;ANSI; ³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 ³²² ²²ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄIJ²³ ³²² ²²²²²²²²²²²²²²²²²²²²²²ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ²² ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² Enter a string to search for. You may enter MULTIPLE items separated by a semicolon (;). 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, 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. 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 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 ³ ³ 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 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ - 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 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 ß 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, 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. 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 ------------------- Thre 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 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 AND Kerry Sokalsky SWAG Support Team