IPP Mail Archive: IPP> Sources and Binaries of Ira's text tools

IPP> Sources and Binaries of Ira's text tools

Ira Mcdonald x10962 (imcdonal@eso.mc.xerox.com)
Wed, 25 Feb 1998 18:42:51 PST

Copies To: pwg@pwg.org
ipp@pwg.org
hastings@cp10.es.xerox.com

Hi folks, Wednesday (25 February 1998)

Since several people have asked privately for these in the last week,
I just posted the source and MSDOS executables (16-bit versions, built
with Mix Power C compiler) of my text tools to the PWG FTP Server in:

ftp://ftp.pwg.org/pub/mib/tools

Each of these text tools will display a synopsis (usage notes), if
invoked without command line arguments (they all require at least one
filename) - these usage notes are appended to the end of this note.

Each of these text tools will compile on most any C compiler on most any
platform. If you use an ANSI/ISO compliant C compiler, they autodetect
'__STDC__' and their declarations use full ANSI C function prototypes.

'cscan', 'overx', and 'strip' use BINARY access via 'fread()'.
'maxln' uses TEXT access via 'fgets()'.

If you compile for MSDOS (or any other target where text lines are
stored in binary files with CR/LF as line terminators, rather than
stand-alone LF), define 'OSMSDOS' as a symbol on your command line
(to get proper counting/output of line terminators).

As Jay Martin suggested, I hereby state that these text tools are
provided on an 'as is' basis (although bug reports are very welcome).

Cheers,
- Ira McDonald (High North Inc, outside consultant at Xerox)

------------------------------------------------------------------------
FILES
------------------------------------------------------------------------
The following files are in '/pub/pwg/tools' (Documentation):

rel_0225.txt - this release note

The following files are in '/pub/pwg/tools' (ANSI C sources):

cscan.c - Character Scan Utility
maxln.c - Maximum Line Length Scan Utility
overx.c - Overstrike Merge Utility
strip.c - Control Character Strip Utility

The following files are in '/pub/pwg/tools' (DOS executables):

cscan.exe - Character Scan Utility
maxln.exe - Maximum Line Length Scan Utility
overx.exe - Overstrike Merge Utility
strip.exe - Control Character Strip Utility

------------------------------------------------------------------------
USAGE
------------------------------------------------------------------------
Usage: cscan [-v] filename ...

-v Verbose log output mode
(HINT - redirect verbose log output to a file)

Ex: cscan -v myfile.txt >myfile.log
(scan 'myfile.txt',
verbose log output to file 'myfile.log')

'cscan' is a utility to count print/control/graphic chars
Copyright (c) 1998 by Ira E McDonald (High North Inc)

------------------------------------------------------------------------
Usage: maxln [-nn] [-v] filename ...

-nn Fence column - longest desired line length
(decimal number, defaults to column 72)
-v Verbose log output mode
(HINT - redirect verbose log output to a file)

Ex: maxln -72 -v myfile.txt >myfile.log
(fence in column 72,
verbose log output to file 'myfile.log')

'maxln' is a utility to detect overlength lines in text files
Copyright (c) 1998 by Ira E McDonald (High North Inc)

------------------------------------------------------------------------
Usage: overx [-cdgv] filename ...

filename = < file_root.file_ext >
-c Replace each control char with a space (' ')
else, replace control char with a dot ('.')
-d Replace each DEL char with a space (' ')
else, replace DEL char with a dot ('.')
-g Replace each graphic char with a space (' ')
else, replace graphic char with a dot ('.')
-v Verbose log output mode
(HINT - redirect verbose log output to a file)

Ex: overx -v myfile.txt >myfile.log
(merge 'myfile.txt',
verbose log to file 'myfile.log',
new merged version to 'myfile.out')

Note: The 'overx' result is written to 'file_root.out'

'overx' is a utility to merge overstrike lines in text files
Copyright (c) 1998 by Ira E McDonald (High North Inc)

------------------------------------------------------------------------
Usage: strip [-ftv] filename ...

filename = < file_root.file_ext >
-f Replace each FORMFEED with one SPACE
else, copy each FORMFEED 'as is'
-t Replace each TAB with one SPACE
else, copy each TAB 'as is'
-v Verbose log output mode
(HINT - redirect verbose log output to a file)

Ex: strip -v myfile.txt >myfile.log
(strip 'myfile.txt',
verbose log to file 'myfile.log',
new 'stripped' version to 'myfile.out')

Note: The 'stripped' result is written to 'file_root.out'

'strip' is a utility to remove control characters from text files
Copyright (c) 1998 by Ira E McDonald (High North Inc)

------------------------------------------------------------------------