v-01JUN87 FIL >FILT7 DOC#FILT7-CRCOM(:FILT7-CRDOC@ I Special version of the general purpose FILT7A program to eliminate soft carriage returns (and following line feeds) in WordStar files. This is the equivalent of giving you a CRT 4096 characters wide so you can display a complete paragraph on "one line". (Needed by some typesetting programs so they can know where a new paragraph starts.) 75 records, 10k.  FILT7 - Sets tabs in ASCII text or .ASM souce code files 04/27/85 COPYRIGHT 1984, 1985 Irv Hoff W6FFC This program filters several types of unwanted characters from various types of ASCII files, including those written by the Wordstar word pro- cessor program. These include unwanted control characters, high-bits set, soft-hyphens, soft-carriage returns, space-breaks, dot commands, etc. It also removes all tabs, then retabs automatically - since this involves not adding tabs in DB strings, the user needs to type a "T" for any sort of ASCII text file, or any other character (including a RETURN) for any source code .ASM file. It has the following choices: 1) Wordstar, normal files 2) Wordstar, w/dot commands 3) ASCII text files select: tabs (y/n): 1) Wordstar files, normal. Insures any file generated by the Wordstar word processor can be used on any other system. (Also selected by default with RETURN.) 2) Wordstar files, retains all dot commands - some host systems such as Compuserve use "dots" (periods) in the first column for enabling blank lines. This selection is primarily for those users. 3) normal ASCII text files. NOTE: Although option 1 removes dot commands, it changes ".pa" into FF (form feed) characters. A comprehensive summary of what the program found and what it did is presented upon completion. A display is provided showing the progress of the program. This is controlled by byte 103, which can easily be changed by DDT. Change to 0F (every 16 lines), 1F (every 32 lines) or 3F (every 64 lines) to match the speed of your equipment. Then save 12 pages. The following is a general description of all the options: NORMAL FEATURES: --------------- 1) counts all current tabs, then removes all tabs 2) removes any unneeded trailing spaces or tabs 2) places tabs every 8 columns wherever possible as long as there is more than 1 space. (In Text mode, asks if you want any tabs or not.) 3) optionally selects between ASCII text and .ASM source code a) If .ASM is selected, does not attempt to put new tabs in quoted DB strings and will replace a single space with a tab until encountering a semicolon delimiter. WHY THE TWO CHOICES: ------------------- The .ASM source code version will not compress spaces into tabs between "quotes", in any DB strings. As the ASCII text version will be processed by a normal display and/or printer routine it does compress spaces, wherever possible. DISPLAYS UPON COMPLETION: ------------------------ total lines in the file original spaces original tabs current spaces current tabs form feeds present high-order bits zeroed imbedded control chars. deleted orphan LF's fixed trailing spaces deleted (For Wordstar:) dot commands deleted soft CR's fixed soft hyphens fixed space breaks fixed - notes by Irv Hoff W6FFC --------------------------------------------------------------------- To use: B>FILT HELLO.TXT (1) B>FILT HELLO.DOC NUNAME.DOC (2) B>FILT A:HELLO.TXT (3) B>FILT A:HELLO.ASM B:NUNAME.ASM (4) (1) Sets tabs in a file named HELLO.TXT. When finished the original file is named HELLO.BAK and the new file has the normal name. (2) The original file keeps the original name. The new file is now named NUNAME.DOC. (3) Just shows you can use two disks. The backup file will be on the same disk as the original and assumes the original name.. (4) The original file remains intact, the new file is on another drive and is named NUNAME.ASM. --------------------------------------------------------------------- 04/27/85 Accepts lines up to 255 characters long (vice 128). Insures last line has CR-LF to allow normal processing. - Irv Hoff 03/07/86 Added tab option if in Text mode. Fixed ERXIT so external file is not deleted unless a 'Y' is used. - Irv Hoff 11/20/84 Initial version, similar style to FORM5, NEAT5 and TABS5. - Irv Hoff --------------------------------------------------------------------- !9" 1  FILT-CR (c) 1987 Irvin M. Hoff :] # To use: B>FILT-CR A:HELLO.TXT 1) B>FILT-CR HELLO.TXT A:NAME.NEW 2) 1) uses original name for new file, original now named .BAK 2) original file stays intact, new file has new nameA:m T!\  L !\F  LF _!l L2|2% \<– ++ SOURCE FILE NOT FOUND ++A2 2% !"Y !"[  <File exists - erase? (Y/N):  ʵ_Y [Returning to CP/M]9   <; NO DIR SPACE: OUTPUT1(T)ext or any key .ASM code: ʚʚ_T¸2]  processing ASCII text code [Returning to CP/M]1 processing .ASM source code2  0  \.Z ++ SOURCE FILE READ ERROR ++1!:SB2S~ ~T8> 2Sg~Z ҉ ʉ ʉ ʉ ʉʉBʇ ž*v #"v ¼*| #"| > x¬  > >   ͝> > U! ~ f¦:b ~¦:] *:d *:c *> :e <2e :_ <2_ :e ]:] T:d ]2e > 2e >  ʕ ʕ ˆ2e :_ 2_ >  Nq2_ 2c 2d 2e .'¸:c /2c ;:d :c <2d :_ <2_ :e > p=2e p#  :` > 2a ,1O:a y& }#-> > *t #"t y*f #"f *h #"h *l #"l :^ 3d> *n #"n *p #"p :^ 3>-*x #"x :^ 3> Ó* #" *r #"r *z #"z *~ #"~   |Ŀ{0% :_ :^ 32#~_P#~_A#~ > p*l #"l *j #"j :^ 2 \ * ~#L*r : *r Ϳ> % ̯ ̧ ̷*Y *[ }|!"[ *Y {z*W  *[ "[ Ô DISK FULL: OUTPUT1!"[ *W *[ #"[ ~# %  V'V ++ ABORTED, OUTPUT FILE DELETED ++12`  *r Ϳ *[ }€"Y >pt\ <¼ CANNOT CLOSE OUTPUTü *r Ϳ lines *v Ϳ original spaces *| Ϳ original tabs *z Ϳ current spaces *~ Ϳ current tabs *l Ϳ form feeds :^ 3{ deletedÆ present *n Ϳ high-order bits zeroed *h Ϳ imbedded control chars. deleted *t Ϳ orphan LF's fixed * Ϳ trailing spaces deleted :^ 3  *j Ϳ dot commands :^ 2e retainedq deleted  *f Ϳ soft CR's fixed *p Ϳ soft hyphens fixed *x Ϳ space breaks fixed : $A!\& L!]7 L!\F  LF & !] L A_ 1) Wordstar, normal files 2) Wordstar, w/dot commands 3) ASCII text files select:  1 2 4 2^  2 :]  tabs (y/n):  _YN 2b $$$ BAK BAKThis little program is a slightly modified FILT7A. That program is used to remove: high bits set unwanted control characters orphan line feeds soft-hyphens soft-carriage returns trailing spaces tabs Option 1 removes WordStar 'dot commands', option 2 retains those. Both keep form feeds. Both options have the ability to restore tabs at opti- imum opportunity or have no tabs. (The third option is used in assembly level source code, removes form feeds and inserts tabs at every optimum location - none in DB strings.) This program is a special version for typesetting purposes. It converts all paragraphs into a single line. It does this by ignoring any "soft carriage return" as well as any line feeds that follow that carriage re- turn. (WordStar files already have a trailing space after a "soft CR-LF combination.) The longest line it can handle is 4096 characters. This is the equivalent of 56 lines of 72 characters each line. Surely no single paragraph would exceed that length. NOTE: The FILT7.DOC file is included for any additional information that might be of interest. (FILT7A made a trivial change that had no effect on the .DOC file.) - Irv Hoff Los Altos Hills 01 June 87 (415) 948-2166 voice