home *** CD-ROM | disk | FTP | other *** search
- Program: fixcr
-
- Executable: fixcr.exe
-
- Version: 1.2 (for MSDOS machines)
-
- Created: May 30, 1988
-
- Author: Bob Dickow
-
- Copyright: Copyright 1988 by R. Dickow
-
- Distribution: FreeWare. May be freely distributed, but please
- retain the credits to the author and to SMA Inc.
-
- Description: Utility to convert ascii text file carriage returns to/from
- various formats, or perform other file filtering functions.
- May also do global edits on files to change, replace, or
- delete text or control code sequences.
-
- Credits: The executable file was developed with the PROMAL language
- compiler. PROMAL is a product of Systems Management
- Associates, Raleigh, NC.
-
- Disclaimer: Golly, it works ok for me!
-
- Mail comments
- or suggestions
- to: Bob Dickow
- Lionel Hampton School of Music
- University of Idaho
- Moscow, ID 83843
-
- or BITNET: dickow@idui1
- or BITNET: dickow@groucho.mrc.uidaho.edu
- or USENET: ui3!dickow
-
- Source code is obtainable on request, if you are REALLY
- interested, but only via electronic mail.
-
- Command
- Usage: fixcr [FROM] <infile> [TO] <outfile> /f <##, ##,...> /t <##, ##,...>
-
- #s are assumed to be two-digit hexadecimal numbers.
-
- The FROM and TO option flags are optional, but allow for
- unambiguous source and target file designation. Without the
- options, the default order is 'source...target'. The single-
- letter /f and /t are mandatory.
-
- The general order of input is quite free, if the switches are
- included. Filenames can be put at the end of the command line
- if desired, for example.
-
- Command Line Options and Flags:
-
- from The filename string following this switch is
- designated the source file. The source file
- is left untouched.
-
- to The filename string following this switch is
- designated the target file. The filename should
- be unique. The words 'from' and 'to' may not be
- filenames.
-
- /f Precedes a single (or optionally a series) two-
- digit hexadecimal number within the range 0-255
- that is to be matched in every instance through-
- out the source file.
-
- -f Same as /f.
-
- /t Precedes a single (or optionally a series) two-
- digit hexadecimal number within the range 0-255
- that is to be substituted for the /f pattern in
- the target file.
-
- -t Same as /t.
-
- /s Used instead of the /t pattern, will 'strip' the
- /f pattern from the file without a replacement
- pattern.
-
- -s Same as /s.
-
- /<string>/ Must surround ascii text strings. In order to keep
- an exact case match, the /<string>/ must itself be
- enclosed in double quotes. A single character is
- also allowed as a string.
-
- * Wildcard character in the /f pattern. Matches any
- byte.
-
- , Comma. Used to separate numbers and strings in /f
- and /t patterns. The last byte or string not fol-
- by the comma designates the end of the series in
- that pattern. If strings of characters are to be
- separated by commas, the comma should follow the
- trailing slash, but the comma must be WITHIN any
- patterns that are enclosed in double quote marks.
-
- Example Usage:
-
- Ex. 1:
- fixcr oldfile newfile /f 0a, 0d /t 0d
-
- result:
- Replaces the MSDOS newline sequence to the single byte carriage
- return common on most 8 bit micros such as Apple IIs, Commodore
- 64, etc. Important to change for proper text output to printers
- for example, when output from those machines.
-
- Ex. 2:
- fixcr oldfile newfile /f "/Sampson/," 0a, 0d /t "/Samson/," 0d
-
- result: Respells a string, but only if it is found at the end of a line.
- Also, the following newline sequence is changed to $0D, suitable for
- file transfer to a Commodore 64, for example. The quotes around the
- string prevent DOS case conversion, so an exact match only
- will be converted. Note that the comma separator is also enclosed
- by quote marks.
- Ex. 3:
- fixcr to newfile from oldfile -s -f /pig/
-
- result: Removes all occurances of the UPPER CASE string PIG (because DOS
- does the conversion). Note that the parameters may be put in
- different orders to get the same result. Also note the alternate
- flag form. The UNIX-like hyphen can be used as well as the slash.
-
- Ex. 4:
- fixcr oldfile newfile -f 41, *, 43 -t 41, 41, 41, 41
-
- result: Hunts for "A?C" ASCII strings. The * chr means 'match any chr'.
- This would, for instance, change "ABC" OR "AZC" to "AAAA". The
- asterisk is the only wildcard character implemented in version
- 1.2 of this program.
-
- Other notes:
-
- Type the command without arguments for a command template.
-
- For on-line help, type:
-
- fixcr ?
-
- or...
-
- fixcr -h
-
- or...
-
- fixcr /h
-
-
- End of file FIXCR.DOC ------------------------------------------------------
-
-