home *** CD-ROM | disk | FTP | other *** search
- Docs for TOASCII.C by Dan Brotherton
-
- Purpose: To strip (replace with blanks, actually) all nonprintable characters
- from an ascii text file. CR and LF are left in, and tabs are expanded.
-
- This program will remove the garbage at the end of a text file downloaded
- with XMODEM. It should also make any word processor file at least readable.
-
- ====================
-
- Calling: TOASCII -t# <f1.xxx >f2.xxx
- Where # is the number of spaces used to replace a tab. Default is 8.
-
- Program reads stdin and writes stdout, so may be used in a pipe, or with
- IO redirection as shown. I normally use this with Micro C-Shell, but I
- would imagine other shells would also work. If you are using this from
- the desktop, make sure the program is named TOASCII.TTP, or is installed as
- a TOS takes parms program. The redirection shown above will then work
- from the TOS dialog box.
-
- If the output file already exists, the system will delete it.
-
- ====================
-
- Note on tab expansion: I tested this with files created using Beckemeyer
- Development Tools ENTAB program. This program produces (as far as I can tell)
- the exact tab expansion that Beckemeyer's DETAB program comes up with.
- However, there seems to be a bug in his ENTAB program that places one too
- few tabs on a line that ends 1 character short of a tab setting. If you use
- his SHOW program on a file that has been ENTABed, you will see what I mean.
-
- ====================
-
- One of these days I'll get around to modifying this mess to accept file
- names on the command line, and adding an option to replace control chars
- with the ^@ representation..........
-
- If someone beats me to it, please let me know. I'd like a copy.
-
- ====================
-
- Please forward comments/questions to:
-
- GEnie D.BROTHERTON
- Delphi LOBODAN
- CIS 74746,3307
-
- Hope it's helpful, and enjoy!
- əəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəə