*+*+*+*¢ REFORMAT 2.01 DOCUMENTATION¢ Copyright 1991 by Thomas J. Andrews¢ member of THE OL' HACKEERS AUG¢ This program will be found on this¢ May/June-1995 OL'HACKERS newsletter¢ for 130XE or 800XL computers.¢¢ DISTRIBUTION:¢¢ This documentation and the program¢ REFORMAT2.CTB may be distributed as¢ long as they are unaltered and they¢ accompany each other.¢¢ WHAT CAN IT DO?¢¢ REFORMAT2.CTB will reformat text¢ files into records of 1 to 128¢ characters, including a 40 column form¢ that can be used by PRINT STAR (a¢ documentation printing program, by¢ yours truly), (Editor PRNTST20.BAS¢ will be found in te MAR/APR 1995¢ newsletter. A.P.) or printed to the¢ screen from DOS (using option C). ¢ Other forms may be used by word¢ processors, or uploaded to¢ telecommunications services. It will¢ handle files of any length, has full¢ word wrap capability, and it will¢ treat the carriage return-line feed¢ combination of standard ASCII files as¢ an ATASCII RETURN so that you may¢ format files created on and downloaded¢ from other computers. It can output a¢ file using the ASCII carriage return-¢ line feed, so that the file may be¢ ARCed and uploaded to another brand of¢ computer.¢¢ COMPILED WITH TURBO BASIC FOR SPEED!¢¢ REFORMAT2.CTB is written in compiled¢ TurboBASIC XL, so it requires an XL or¢ XE computer and one or more disk¢ drives. A slower 400/800 version is¢ available on request.¢¢ WHAT FILES AE NEEDED:¢¢ To run this program, you will need¢ three files. The first is DOS.SYS. ¢ Please use DOS 2.0 or 2.5. DOS 2.5 is¢ probably best. MYDOS 4.5 also seems¢ to work. The object files used with¢ this program are Atari DOS 2.x¢ compatible. Any DOS that will not¢ load DOS 2.x compatible programs will¢ not work. The second is RUNTIME.COM,¢ the Turbo BASIC loader, required by¢ all compiled Turbo BASIC programs. ¢ The third is REFRMAT2.CTB, which is¢ the compiled version of the program. ¢ If your computer has been upgraded to¢ over 192K, I recommend the use of¢ SMARTRAM 2.5, a RAMdisk program by Tim¢ Patrick, which was published in the¢ September 1989 Antic Magazine. Used¢ with DOS 2.5, it will create a full-¢ sized enhanced density RAMdisk at D8:,¢ and it appears to be fully compatable¢ with Turbo BASIC. (Editor ALL 3¢ PROGRAMS ARE ON THIS OL' HACKER¢ NEWSLETTER.)¢¢ TO AUTOLOAD AND RUN THE EASY WAY!¢¢ The easiest way to run the program¢ is to set it up to run automatically¢ on power-up. On a formatte DOS disk,¢ do this, rename RUNTIME.COM to¢ AUTORUN.SYS and REFRMAT2.CTB to¢ AUTORUN.CTB, and put both on the disk¢ in Drive #1. Upon power-up, DOS.SYS¢ will load and execute any file named¢ AUTORUN.SYS, which in our case will be¢ the Turbo BASIC loader. The loader¢ will in turn look for any file named¢ AUTORUN.CTB, load it, and run it. ¢ HOWEVER, to run REFORMAT2.CTB from¢ DOS, use option L to load RUNTIME.COM. ¢ An error message will appear when¢ RUNTIME.COM does not find a file named¢ AUTORUN.CTB on the disk. This Error¢ massage may be IGNORED. When prompted¢ with a (D)os, (R)un, or (L)oad¢ statement on the screen, press "L" and¢ use REFRMAT2.CTB when asked for a file¢ name. The file REFRMAT2.CTB must be in¢ Drive #1. REFORMAT2.CTB will then load¢ and run.¢¢ HOW TO:¢¢ When you run REFORMAT2.CTB, the¢ FIRST thing you must enter is the file¢ name of the source file. To get a¢ directory of the default disk, press¢ just RETURN. To change the default¢ drive, use "Dn:", where 'n' is the¢ number of the new default drive. When¢ entering the file name, if no drive is¢ specified, the default drive will be¢ used. SECOND is the left margin of the¢ source file. Many files are¢ preformatted for use with an 80 column¢ device, such as a printer. Frequently,¢ such files start each record with a¢ certain number of spaces to provide a¢ blank area, or margin, on the left¢ side of the page. This left margin¢ will leave a zig-zag appearance to the¢ output if it is not stripped away. ¢ REFORMAT2.CTB will remove the left¢ margin for you, but you must tell it¢ how large this margin is. To¢ determine this from the program, press¢ RETURN with no entry. REFORMAT2.CTB¢ will then check the first fifty¢ records and report the largest and¢ smallest margin found. A source with¢ records longer than 128 characters¢ will report back a 0 for the smallest¢ margin. You may use a number larger¢ than the minimum, if you like. ¢ REFORMAT2.CTB will strip away only¢ space characters, not text. However,¢ if you use a number larger than the¢ minimum reported, paragraph¢ indentation size will be reduced. ¢ NEXT, you need the filename for the¢ output file. You may change the¢ default drive and get a directory of¢ the disk as with the source filename.¢ The source and destination default¢ drives are independent of each other,¢ so each can be changed without¢ affecting the other. The output file¢ will be close to the same size as the¢ input file, so be sure there is enough¢ room on the disk for it. The source¢ and destination may use the same¢ drive, and may use the same or¢ separate disks. There will be disk¢ swapping prompts if needed. You must¢ also tell REFORMAT2.CTB the size of¢ the output records. This may be¢ anything from 1 to 128. If you want¢ unformatted text to be output, use a¢ '0' for the answer. If you used a¢ number between 1 and 128 in the above¢ question, you will then be asked about¢ the output left margin. This tells¢ how many spaces will be inserted at¢ the beginning of each line of output.¢ This value will be subtracted from¢ that above to get the actual line¢ length. For example, to get a 60-¢ character line centered on an 80-¢ column piece of paper, use '70' for¢ the first question, and '10' for the¢ second.¢¢ A COUPLE MORE YES/NO PROMPTS:¢¢ Next, you will receive a menu of¢ questions concerning some of the¢ operating features of the program.¢ These all require yes or no answers,¢ and default conditions are set for¢ each one. Use the RETURN key to move¢ to the various questions, and the¢ SPACE BAR to toggle the answers. You¢ may go through the list as many times¢ as you like. When all features are¢ set to your satisfaction, use the ESC¢ key to exit the menu.¢ Here's explaination of the questions:¢ OUTPUT RIGHT JUSTIFIED: This option¢ adds spaces between words to move the¢ right side of the output text record¢ so as to give straight margins on both¢ sides. When this is turned off, the¢ right side of the text has a jagged¢ look. This feature is automatically¢ disabled if Word Wrap is turned off,¢ or if unformatted output was selected.¢ The default condition is N.¢ OUTPUT IN ASCII: When this is yes,¢ instead of the normal ATASCII (Atari¢ ASCII) CHR$(155) as an end-of-record,¢ the standard ASCII carriage return-¢ line feed (CHR$(13) CHR$(10)) is used.¢ No other translation is done, and¢ "CONTROL codes" and inverse characters¢ are passed through intact. ¢ Unformatted output will be in ATASCII¢ only. The default condition is N.¢ REMOVE NON-ESSENTIAL EOR'S:¢ Ordinarily, when text is formatted for¢ a device such as a screen or printer,¢ there is an end-of-record (EOR) on the¢ end of each line. When REFORMATting,¢ not all of these EOL's are always¢ necessary. For ordinary text, the¢ only "essential" EOR's are those at¢ the end of paragraphs. If this option¢ is set to Y, REFORMAT2.CTB will check¢ the characters following the EOL for¢ either another EOL (skipped line) or a¢ space character (indicating an¢ indentation). If one is found, this¢ is an "essential" EOL, and remains in¢ the text. If one of these is NOT¢ found, it is a "non-essential" EOR,¢ and is replaced with a space. This¢ allows you to make records longer than¢ those of the source, and eliminates an¢ occasional 1 or 2 word line in the¢ output. When set to N, the program¢ acts as REFORMAT 1.0 did, leaving in¢ ALL EOR's. Out-of-the-ordinary text,¢ like program listings, are usually¢ best done using N. The default¢ setting is Y.¢ WORD WRAP ON: Most word processors¢ for the Atari 8-bit use word wrap,¢ where words at the end of a line are¢ not cut in the middle if they are too¢ long to fit, but are moved to the¢ beginning of the next line. A "word"¢ here is any string of characters¢ between spaces or EOL's Sometimes,¢ like when formatting BASIC listings,¢ it is better to have the word wrap¢ off, so this feature is provided. The¢ default is Y.¢ PROMPT FOR DISK SWAPS: A Y here¢ will pause the program at the proper¢ times to allow disk swapping, used¢ mostly with single drive systems. If¢ the same drive number and filename¢ were used for both source and¢ destination files (NOT a recommended¢ procedure!), disk swapping is¢ automatically activated, overriding¢ the menu choice. The default for this¢ one is N.¢ FORMAT DESTINATION DISK: This one¢ is pretty obvious, and probably needs¢ little explaination. Just be advised¢ that there are NO "are you sure"¢ prompts, so this is your last chance. ¢ As a safety feature, if you choose to¢ format and you used the same drive¢ number for source and destination,¢ disk swapping prompts will be¢ activated. Disk formatting will be¢ done in the usual density for the DOS¢ used, that is, DOS 2.5 will format in¢ enhanced density and DOS 2.01 will¢ format in single density. The default¢ is N.¢ WRITE VERIFY OFF: Under standard DOS¢ 2.x operation, when a sector is¢ written to the disk, it immediately is¢ read back in and verified. This can¢ take a significant amount of time, and¢ most drives and disks are reliable¢ enough that it really isn't needed. A¢ Y here will turn off the verification,¢ and restore it to its original¢ condition at the end of the program.¢¢ CAUTION!¢¢ THIS MAY NOT WORK PROPERLY WITH A¢ DOS OTHER THAN ATARI DOS 2.0 OR 2.5. ¢ If you use another DOS, be sure to use¢ N to avoid computer lockup. Defaults¢ to Y.¢¢ MORE THAN ONE TEXT FILE?¢¢ All options remain in effect for the¢ entire file. If you have a file that¢ you want reformatted into more than¢ one format, split the file into¢ several files, reformat each one¢ separately, and recombine them. ¢¢ READY TO REFORMAT YOUR TEXT FILE?¢¢ When all options have been set,¢ insert the disk(s) for the original¢ source and reformatted files into the¢ appropriate drive(s), and press START.¢¢ THAAATS ITTTT FFFFFOLKS!¢¢ That's all there is to it - REFRMAT2.¢ CTB will do the rest, prompting you¢ to swap disks if necessary. While it¢ is working, the unformatted form of¢ the text will be displayed on the¢ screen. The inverse escape symbols¢ you see are the EOL's.¢¢ BUGS KNOCKED OUT....¢¢ This version corrects two bugs found¢ in version 2.0. One has to do with¢ proper handling of paragraphs that are¢ separated by skipped lines and have no¢ indentations. The second had to do¢ with the unformatted output option,¢ which wasn't working properly. ¢ This program is distributed as¢ Shareware. If you like it, and use¢ it, a donation to compensate for my¢ time, efforts, and expenses would be¢ appreciated. The suggested donation¢ is $2.50. Anyone who has made a¢ donation for version 2.0 need not make¢ another for this version. Any¢ questions, comments, and suggestions,¢ on REFORMAT2.CTB or a new program,¢ would also be appreciated.¢ *****¢ Easy-response letter:¢ mail to:¢ THOMAS J ANDREWS¢ 7805 US ROUTE 20¢ MANLIUS NY 13104¢¢ Tom,¢¢ I used your REFORMAT 2.01 program¢ on my Atari__________ computer with ¢ _______________________ disk drive(s). ¢ I own a ______________ printer that¢ is( )/is not ( ) Epson compatable.¢ I have used or plan to use¢ REFORMAT 2.01 for (please check)¢ ( ) preparing files for Print Star.¢ ( ) converting downloaded ASCII¢ files.¢ ( ) converting files for screen¢ reading¢ ( ) converting files for any¢ telecommunications uploading¢ ( ) other: (please specify):¢ _____________________________________¢ _____________________________________¢ _____________________________________¢¢ I rate this program in the¢ following ways: Ex. Good Fair Poor¢¢ Ease of use ( ) ( ) ( ) ( )¢ Utility ( ) ( ) ( ) ( )¢ Speed ( ) ( ) ( ) ( )¢ Doc. clarity ( ) ( ) ( ) ( )¢¢ I found this program in the¢ OL' HACKERS MAY/JUNE 1995 newsletter,¢ or the following bulletin board/pay¢ service:¢______________________________________¢¢ Phone Number (if BBS):________________¢¢ I would be interested in receiving upgrades to this program ( ).¢¢ Comments:¢ _____________________________________¢ _____________________________________¢ _____________________________________¢¢My NAME and ADDRESS is:¢¢ _____________________________________¢ _____________________________________¢ _____________________________________¢¢ ****************** ¢