ENSOFT2 DOC69ENSOFT2 OBJ4 *+%"H%"F%"D " " "y 6"C+6+!^6 F+N+<!* !!9~#ʗ RO"k'k +}|+#~ʂu6#~#<ʷ>!4R6#6*!* |ʴ!ͯ"r! ͯ" R Can't open > or < file.$èw*6 )! 9!"68*:B<*C 2B ́F  €> _*C~+#4N s> > !+:EºF2B_~ý   > G ʘG!* ͟> !+}  > _con:rdr:pun:lst: ==_~O7 !"# !  #¾i& ~º!h~#~#F6%pw6237!9Ly=S>wD<!gs 6#6 ~+|s#r{{ ڟ!+#^{!!Pw#w!g~<6 !|~r!N!nL}*eyb>w#%!=)${=Sbtx h&{ !~!nN#F{p+pH#x¯ ڽ+!9~ !~b!5> 6> *e w`i#Q᯾%,!$|!!9n&:ʟɯ2>[!9L):|!PwL#4!^w>2>2-:Ecx:-O”! DMi:- !Write error - Disk full $`i7.!9~=+SV+^+F+N "I> w+ w w##w w #~+:&~##K@~#.7K&*I++Kw#=a O! ~_#V!$r+sbk#|}o|g}o|g}o|g|!,|}!­­,ɯ|ʙ!|}!-z{!,zz{!-|!|g|}! -ɵz{!-||g}o).{ozg+|/g}/o~og~#fos#rN#F#xr~#~#[[`iDM!z>‚S\))Ҋ =‚ɯßz>|>MD!x<³z>ڸjS\>))#  =¸>>2TnwO!9**!}2E!u!&9L+++|` !96!96!9!&9L##L!9!&9LLÇ !u9!9!V !9!V !9!9)!9!l!l"ͯ !9!V ! !͚Ö !9!n!l"ͯ *! !͚!!!q!9!**!9!ͨ""!9!9!9L6!9!9L !9!9L !9!9LU !9L!9!9L!9!9L!9!9"* * !" !9L| !5 !h9" * ͯ* * ͓ͯ: * ͓ͯJ * ͓ͯʴ * |x * ͈" !* * #" +!9L* }* #" +!9L6:!9L* 6 !* ! u!9L!9L " " ɩ* * !" !9L| !! !9" ͓! * ͯH * ͓ͯʇ * |Y Ä * |m !! !* +"  * |¡ !5!  * ͘| * | * ͈" !* * #" +!9L* } !I* ! u!9L!9L ! * #" +!9L6.!9L* 6" " l*S *Q !"S !9L|z ! !9"Q ͓ʁ*Q ͯ© *Q ͓ͯ *S |º *Q | !! !*S +"S ~*S +++|!Á~*Q ͘|Q*Q |6*Q ͈"Q !*Q *S #"S +!9L*Q }~!I*Q !K u!9L!9LU  !9L*S 6"Q "S !9L|ʭ!!9L|!!9L!!Y!`#$%&()'-@^{}~I!9L!9Lg|[!u9!!7X*\!9L!9Lͯ"\ʛ*\"\!!9L!!9L|!^u!du!9!Ô****!"""! 9L"#͓*|!"*ͯT*#"*|Q!"*+|«! ! 9L͟! ! 9L͟! ! 9L͟! ! 9L͟*#"! ! 9L͟! ! 9L͟ *|b*ͯ**+|! ! 9L͟! ! 9L͟!"*! 9L͟_*ͯN*! 9L͟*#"_!! 9L͟ *#"*+|®!"!! 9L͟! ! 9L͟*! 9L͟ *!"*! 9L͟ *!"*! 9L͟ *! 9L͟ *+|9! ! 9L͟! ! 9L͟!! 9L͟! 9L! 9L""""*s!"s*s)!9LL͓ʻã*s#"s+*s)!9LLØ"s!9LF|!9L#Q+F!9~!A{,a[-!9~!0:,!9~!a{,!9LF|=!9L#Q!9L#Q+!9L#Q+F}|f=~#m!Ç!ڇ!!9n&}a{ oo&% ENSOFT Ver. 2.0 by Harvey G. Lord 02/19/1984 Converts 'hard formatted' text files to WordStar document files. Command mode usage: ENSOFT d:input.fil d:output.fil Interactive mode usage: ENSOFT Interactive mode prompts for inputs and checks for permissible filenames. You are in interactive mode now. CTRL-B (^B) aborts anywhere in the program. NOTE: Handing ENSOFT non-ASCII files produces nonsense. Press any key to continue. rwb Please wait. I'm converting to WordStar's 'document' format. , the converted file, is written. Job done. is not a valid drive designator. Only A and B are permitted. Please try again. Disk drive where input file resides (no colon): Disk drive to put output file (no colon): I'm sorry, in a file's name. Please re-enter. Input file's name + (8 characters max.): Output file's name + (8 characters max.): <== 8 chars max! I'm sorry, CP/M does not permit in a file's type. Input file's type + (3 characters max.): Output file's type + (3 characters max.): <== 3 chars max! Sorry, your input file's name and your output file's name are identical. CP/M doesn't permit two files with the same name on the same disk. We'll have to go back to the beginning and start over. Please press any key to continue. CTRL-B (^B) aborts. Please check your spelling and be sure the file you want is on the designated disk. The disk directory is probably full. Unfortunately, this error requires starting over. You may insert a new output disk now, if necessary. Sorry, I can't open Please press any key to try again. CTRL-B (^B) aborts. ENSOFT Version 2.0 documentation p. 1 ENSOFT converts "hard formatted" text files to Wordstar's "document" format. Version 1.0 was written by Gordon Brandly of Fort Saskatchewan, Alberta, Canada for Ron Cain's Small-C compiler. It did the job, but handled errors by exiting to CP/M. Version 2.0, a complete rewrite for Walt Bilofsky's C/80 (Ver. 3.0) C compiler by Harvey G. Lord, is highly error resistant. I've been unable to crash it, try as I might. Purpose: Ever downloaded a file from a bulletin board and wanted to re- format it? Ever printed a Wordstar file to disk, stripped off the high bits, then lost the original? ENSOFT converts a regular CP/M text file, one with "hard" spaces and "hard" carriage returns to Wordstar's "document" mode. This allows painlessly reforming the text to different column widths. Operation: ENSOFT2 has two modes of operation: command mode and interactive mode. Command mode requires that you present the names of the input and output files on the command line, thus: ENSOFT2 d:input.fil d:output.fil If you've specified both files correctly (ENSOFT2 checks for that), the program proceeds to change the "hard" formatted input file into a "softened" output file. This is the fastest way to execute the program. Interactive mode is completely prompted and each keystroke is checked to make sure its character is permitted in a filename. Execute interactive mode by entering the program's name on the command line: ENSOFT2 It then asks you for the drive on which to find the input file, it's name and it's filetype. In each case, the program only accepts permissible characters and no more than eight for the filename, no more than three for the filetype. If you type nine characters for the filename or four for the filetype, you'll get an error message and the extra characters are ignored. If you type a character that's not allowed in a filename, you'll get an explanatory error message and be asked to start over from the beginning of that entry. ENSOFT Version 2.0 documentation p. 2 After getting the input and output names, program operation for command and interactive modes is the same. ENSOFT2 first checks to see if the files are identically named on the same disk. If they are, the "softening" process can't take place. CP/M doesn't allow two files of the same name and type on the same disk. You are so notified and permitted to start the file specification over again, in interactive mode. If the files have different names, ENSOFT2 checks for the input file's existence. If it doesn't exist in this user area on the designated disk, you are so notified and permitted to re-specify the input file. You MAY, when it asks you to press any key to continue, change any disks you like. ENSOFT2 resets the drives to avoid CP/M's R/O BDOS error. If the input file does indeed, exist, ENSOFT2 checks to see if the output file can be opened. If the disk directory is full, you'll be told and the whole process starts over again, in in- teractive mode. Again, you may change any disks you like when the "Press any key" prompt appears. ENSOFT2 resets the drives. If both input and output files are acceptable, ENSOFT2 creates the "softened" output file you need. It also tells you what it's doing and when it's done. NOTES: The only error I can think of that ENSOFT2 doesn't trap is a disk full error while writing the output file. You must make sure there's enough room on the output disk for a file the same size as the input file. Also, ENSOFT2 is set for a two-drive system. If you've got more drives, you'll have to change the error trap in getdrv to include your system's drives, then recompile and assemble. If you want to go the other way (document file to text file), an easy way is to use my program T.COM: T d:input.fil >d:output.fil On some CP/M systems (DEC Rainbow 100 for one), the output file's drive designator, name, and type must be in upper case. Those systems' CCP doesn't read beyond the ">" and, therefore, can't convert the characters into upper case. Another way to strip off WordStar's high bits is with PIP: PIP d:output.fil=d:input.fil[z] Unless you want to lose your input file, never give input and output files the same names. ENSOFT Version 2.0 documentation p. 3 How It Works: Gordon Brandly's explanation: Wordstar represents 'soft' carriage returns and spaces (i.e. those that can appear or disappear when you reform a para- graph) by turning on the highest bit of the appropriate return or space code. ENSOFT makes some educated guesses about which returns and spaces it should make 'soft'. For instance, if there are multiple spaces between words, it leaves the first one after the word 'hard', and 'softens' the others up to the beginning of the next word. In fact, WordStar also turns on the high bit in the last char- acter of every word. Fortunately, ENSOFT doesn't need to mimic that detail. WordStar will reform paragraphs in which each word's last letter is in standard ASCII. ENSOFT2 does not turn on the high bit of each word's last letter. ENSOFT2 is a complete rewrite, including the algorithm with which text is processed. Brandly's program only remains in name and function. Test ENSOFT2 by running this documentation file through it. Then reform the file with WordStar. You should not have any garbage characters and everything should look good. Running non-ASCII (non-text) files through ENSOFT2 produces nonsense, but leaves the original file intact so no harm's done. Possible bugs are the same as Brandly's: I've only used this program on my own Wordstar-produced files and some public domain documentation files. I don't know how well it will stand up if you run weird files through it (e.g. 100 carriage returns in a row, strange embedded control characters, etc.). If by mistake you pro- cess a file that's already in document format the program won't mess it up too badly. The original file is left alone, so you can always recover if things don't work out right. I believe, however, that ENSOFT2 will work fine with all of the above. Ownership Notice: ENSOFT2 was completed on 02/19/84 by Harvey G. Lord. It was placed in the public domain by the author. You may do with this as you please; use it, sell it, eat it for breakfast. I ask that you do not delete my name. If you find ENSOFT2 useful, please give it to friends. ENSOFT Version 2.0 documentation p. 4 Please report any bugs or improvements to me at 203-429-8044 after 5:00 P.M. EST, or on weekends. Harvey G. Lord P.O. Box 183 Storrs, CT 06268 Enjoy.