Extract.c v1.3 © 1992 by Frank J. Perricone CHANGES: 1.3: KLUGE option added SEENBY added, now doesn't show them unless you ask START has become BEGIN Separator lines not displayed in TEXTONLY mode 1.2: TEXTONLY option added 1.1: START and END options force messages to be in order 1.0: initial release This little program takes a bunch of messages in FidoNet format (including that of any BBS that is Fido-ready, such as Falcon CBCS) and displays them. You can use redirection to send them to the printer or a file. To use v1.3 of Extract, you should specify a pathname (ending in / or :) to the message area, and then two optional parameters: BEGIN and END. Each one specifies the range of message numbers to be shown. BEGIN defaults to 1 and END defaults to the same as whatever BEGIN ends up being. There is one more flag you can specify, TEXTONLY, which causes the output to not include headers. This is useful if you want to edit a text file and bring it into your system's message editor, edit it, and then save it, then use Extract to recreate the text file. The separator lines are not included in this case (they were in 1.2 rendering this option mostly useless). Two more flags, KLUGE and SEENBY, determine whether those lines are shown. If the flags aren't present the lines aren't shown. For instance, to view messages 10 to 20 in the area Falcon:msgs/Hobbies, type Extract Falcon:msgs/Hobbies/ BEGIN 10 END 10 To just view message 13, try Extract Falcon:msgs/Hobbies/ BEGIN 13 Technically the "BEGIN" and "END" are anything beginning with B or E. And all other params have only their first letters changed. You get the idea. Messages are displayed in a pleasing format and are shown in message-number order (not threaded order, though thread links are given). To send any of these dumps to the printer, add >PRT: right after the word Extract (in AmigaDOS 2.0, add it anywhere). To send it to a file, say t:dump, try adding >t:dump instead. Messages are displayed with their full header information, such as net addresses, even if those are null. Maybe someone can use this consistency in an ARexx program or something. Anyway, kludge lines are filtered out but SEEN-BY: lines, tear lines, origin lines, quote lines, and other funky little Fido-message quirks are printed as-is. Word-wrapping is done at column 78. Possible extensions for v1.2 would include the ability to turn kludge line display on, to turn Seen-By, origin lines, tear lines, etc. off, or to change the column width. But not yet. PLEASE set your stack to at least 15000. I got consistent crashes at 4000 and irregular crashes at 9000 but no crashes at 15000. Aren't a few kilobytes of memory worth piece of mind anyway? Some possible uses for Extract: Lets SYSOPs save messages into files, as if they had a capture buffer. Lets SYSOPs dump messages to the printer. Set up a menu option that copies all the files in an area into a file that the user can then download somewhere. Use the MF program (MsgFilter) to generate a list of files and then display them with Extract; you virtually have the tools to build your own message area system if you were careful with them. View messages without signing on. Make a script that archives and deletes messages, and makes the archives text files that anyone can download later. Edit a file using your system's message editor Extract is hereby in the public domain, unless I infringed on the rights of someone who had a copyright on something I used (such as the FidoNet tech specs); in which case, Extract follows those restrictions. Distribute this program at will, but keep it together. If you have improvements or ideas, or want to say thanks, call the Crystal Ship BBS, 802-223-3257, or send netmail to 1:325/611.0 and/or JSFJP@acad1.alaska.edu. I include source code, which compiles under DICE. The enclosed errorchk.h file is useful in many situations and corresponds to a few things I find myself doing in almost all my CLI-based C programs. Feel free to use it. If you modify Extract in a useful way, send me a copy.