home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / txtutl / fixcr.arc / FIXCR.DOC next >
Encoding:
Text File  |  1988-08-09  |  6.0 KB  |  157 lines

  1. Program:        fixcr
  2.  
  3. Executable:     fixcr.exe
  4.  
  5. Version:        1.2  (for MSDOS machines)
  6.  
  7. Created:        May 30, 1988
  8.  
  9. Author:         Bob Dickow
  10.  
  11. Copyright:      Copyright 1988 by R. Dickow
  12.  
  13. Distribution:   FreeWare. May be freely distributed, but please
  14.                 retain the credits to the author and to SMA Inc.
  15.  
  16. Description:    Utility to convert ascii text file carriage returns to/from
  17.                 various formats, or perform other file filtering functions.
  18.                 May also do global edits on files to change, replace, or
  19.                 delete text or control code sequences.
  20.  
  21. Credits:        The executable file was developed with the PROMAL language
  22.                 compiler. PROMAL is a product of Systems Management
  23.                 Associates, Raleigh, NC.
  24.  
  25. Disclaimer:     Golly, it works ok for me!
  26.  
  27. Mail comments 
  28. or suggestions
  29. to:             Bob Dickow
  30.                 Lionel Hampton School of Music
  31.                 University of Idaho
  32.                 Moscow, ID  83843
  33.   
  34.                 or BITNET:      dickow@idui1
  35.                 or BITNET:      dickow@groucho.mrc.uidaho.edu
  36.                 or USENET:      ui3!dickow
  37.  
  38.                 Source code is obtainable on request, if you are REALLY
  39.                 interested, but only via electronic mail.
  40.  
  41. Command
  42. Usage:    fixcr [FROM] <infile> [TO] <outfile> /f <##, ##,...> /t <##, ##,...>
  43.  
  44.           #s are assumed to be two-digit hexadecimal numbers.
  45.  
  46.           The FROM and TO option flags are optional, but allow for
  47.           unambiguous source and target file designation. Without the
  48.           options, the default order is 'source...target'. The single-
  49.           letter /f and /t are mandatory.
  50.  
  51.           The general order of input is quite free, if the switches are
  52.           included. Filenames can be put at the end of the command line
  53.           if desired, for example.
  54.  
  55. Command Line Options and Flags:
  56.  
  57.               from         The filename string following this switch is
  58.                            designated the source file. The source file
  59.                            is left untouched.
  60.  
  61.               to           The filename string following this switch is
  62.                            designated the target file. The filename should
  63.                            be unique. The words 'from' and 'to' may not be
  64.                            filenames.
  65.  
  66.               /f           Precedes a single (or optionally a series) two-
  67.                            digit hexadecimal number within the range 0-255
  68.                            that is to be matched in every instance through-
  69.                            out the source file.
  70.  
  71.               -f           Same as /f.
  72.  
  73.               /t           Precedes a single (or optionally a series) two-
  74.                            digit hexadecimal number within the range 0-255
  75.                            that is to be substituted for the /f pattern in
  76.                            the target file.
  77.  
  78.               -t           Same as /t.
  79.  
  80.               /s           Used instead of the /t pattern, will 'strip' the
  81.                            /f pattern from the file without a replacement
  82.                            pattern.
  83.  
  84.               -s           Same as /s.
  85.  
  86.               /<string>/   Must surround ascii text strings. In order to keep
  87.                            an exact case match, the /<string>/ must itself be
  88.                            enclosed in double quotes. A single character is
  89.                            also allowed as a string.
  90.  
  91.               *            Wildcard character in the /f pattern. Matches any
  92.                            byte.
  93.  
  94.               ,            Comma. Used to separate numbers and strings in /f
  95.                            and /t patterns. The last byte or string not fol-
  96.                            by the comma designates the end of the series in
  97.                            that pattern. If strings of characters are to be
  98.                            separated by commas, the comma should follow the
  99.                            trailing slash, but the comma must be WITHIN any
  100.                            patterns that are enclosed in double quote marks.
  101.  
  102. Example Usage:
  103.  
  104.   Ex. 1:  
  105.           fixcr oldfile newfile /f 0a, 0d /t 0d
  106.  
  107.   result:
  108.           Replaces the MSDOS newline sequence to the single byte carriage
  109.           return common on most 8 bit micros such as Apple IIs, Commodore
  110.           64, etc. Important to change for proper text output to printers
  111.           for example, when output from those machines.
  112.  
  113.   Ex. 2:
  114.           fixcr oldfile newfile /f "/Sampson/," 0a, 0d /t "/Samson/," 0d
  115.  
  116.   result: Respells a string, but only if it is found at the end of a line.
  117.           Also, the following newline sequence is changed to $0D, suitable for
  118.           file transfer to a Commodore 64, for example. The quotes around the
  119.           string prevent DOS case conversion, so an exact match only
  120.           will be converted. Note that the comma separator is also enclosed
  121.           by quote marks.
  122.   Ex. 3:
  123.           fixcr to newfile from oldfile -s  -f /pig/
  124.  
  125.   result: Removes all occurances of the UPPER CASE string PIG (because DOS 
  126.           does the conversion). Note that the parameters may be put in 
  127.           different orders to get the same result. Also note the alternate
  128.           flag form. The UNIX-like hyphen can be used as well as the slash.
  129.  
  130.   Ex. 4:  
  131.          fixcr oldfile newfile -f 41, *, 43 -t 41, 41, 41, 41
  132.  
  133.   result: Hunts for "A?C" ASCII strings. The * chr means 'match any chr'.
  134.           This would, for instance, change "ABC" OR "AZC" to "AAAA". The
  135.           asterisk is the only wildcard character implemented in version
  136.           1.2 of this program.
  137.  
  138. Other notes:
  139.          
  140.              Type the command without arguments for a command template.
  141.  
  142.              For on-line help, type:
  143.         
  144.              fixcr ?
  145.                 
  146.                 or...
  147.  
  148.              fixcr -h
  149.  
  150.                 or...
  151.  
  152.              fixcr /h
  153.  
  154.  
  155. End of file FIXCR.DOC ------------------------------------------------------
  156.  
  157.