home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / tasm / filt.doc < prev    next >
Text File  |  1988-08-28  |  8KB  |  165 lines

  1.  
  2.  
  3.                                 FILT Version 1.0
  4.                Copyright (c) 1988 by Borland International, Inc.
  5.  
  6.        FILT is a text-filter program that performs some low-level
  7.        formatting and translation functions. As a filter, FILT
  8.        does its input and output through the console device
  9.        (CON). Input and output files must be specified with the
  10.        DOS redirection commands. Here's the basic syntax:
  11.  
  12.          FILT options < input_file > output_file
  13.  
  14.        The options consist of single letters and are described
  15.        below. The input_file and output_file, in conjunction with
  16.        the redirection characters < and >, tell DOS what files to
  17.        use for input and output. If no input file is specified,
  18.        the keyboard will be used. If no output file is specified,
  19.        the screen will be used.
  20.  
  21.        The options are single, case-sensitive letters. Any number
  22.        of options may be specified, and some of the options are
  23.        followed by a number. All numbers are decimal and come
  24.        immediately after the option letter (with no intervening
  25.        spaces); numbers over 65,535 will cause an error.
  26.  
  27.        Summary of options (# denotes number):
  28.  
  29.          Tab Replacement:                 Tab Assignment:
  30.  
  31.            x  = expands tabs to spaces      e  = erases all tab stops
  32.            c  = compresses spaces to tabs   t# = sets tab stop
  33.  
  34.          Character Replacement:           Line Format:
  35.  
  36.            S  = strips high bits            m  = adds left margin
  37.            C  = strips control chars        d  = deletes left margin
  38.            H  = strips high (>127) bytes    l# = truncates long lines
  39.            U  = all letters to uppercase    r  = removes trailing spaces
  40.            L  = all letters to lowercase    b# = byte to end input lines
  41.            A  = capitalize words            s  = saves carriage returns
  42.  
  43.          End of File:                     I/O Buffer:
  44.  
  45.            z  = ignores ^Z in input         i# = input buffer size (20000)
  46.            Z  = suppresses ^Z in output     o# = output buffer size (20000)
  47.  
  48.        The following fully describes all options in alphabetical
  49.        order (lowercase first):
  50.  
  51.          ?   Help.  Displays a summary of the options.
  52.  
  53.          b#  Byte to end input lines.  Defines the character that will
  54.              identify an end of line (EOL).  For instance, b13 will cause
  55.              a line to be ended when a carriage return is reached.  The
  56.              default is b10.  This option does not effect how EOL's will
  57.              be written; they are always ended with a CR+LF combination.
  58.  
  59.          c   Compresses spaces to tabs.  When possible, spaces will be
  60.              replaced by tab characters (ASCII 9).  The default tab stops
  61.              are every eight columns, but can be set manually with the e
  62.              and t options.
  63.  
  64.          d#  Deletes left margin.  The specified number of characters will
  65.              be deleted from the left side of all the lines.  Any
  66.              characters will be deleted.  Note that tabs only count as
  67.              one character.
  68.  
  69.          e   Erases all tab stops. All tab stops will be erased.
  70.              User-defined tab stops (set with the t option) should
  71.              come after the e option.
  72.  
  73.          h   Help.  Displays a summary of the options.
  74.  
  75.          i#  Input buffer size.  Sets the size of the input buffer.  The
  76.              default is i20000.  Making it larger might improve the
  77.              processing rate for a slow input device, while making it
  78.              smaller will use less memory.
  79.  
  80.          l#  Truncate long lines.  Lines longer than the specified length
  81.              will be truncated.  Normally any length lines (up to about
  82.              600 characters) are acceptable.
  83.  
  84.          m#  Add left margin.  The specified number of spaces will be
  85.              added to the left margin.
  86.  
  87.          o#  Output buffer size.  Set the size of the output buffer.  The
  88.              default is o20000.  Making it larger might improve the
  89.              processing rate for a slow output device, while making it
  90.              smaller will use less memory.
  91.  
  92.          s   Saves carriage returns.  All carriage returns (ASCII 13) are
  93.              normally deleted from the input.  This option might be
  94.              useful in a file that contains line boundaries without
  95.              carriage returns, but does contain carriage returns as some
  96.              kind of special formatting code.
  97.  
  98.          r   Removes trailing spaces.  Any spaces (or tabs when using the
  99.              c option) that come at the end of lines will be removed.
  100.              Spaces at the end of lines, though superfluous, are often
  101.              left over from word processors.
  102.  
  103.          t#  Sets a tab stop.  A tab stop will be set at the specified
  104.              column number.  The leftmost column is column one.  Any
  105.              number of tab stops can be specified.  The default tab stops
  106.              are every eight columns, i.e., t9 t17 t25 etc.
  107.  
  108.          x   Expands tabs to spaces.  All tab characters (ASCII 9) will be
  109.              replaced with an equivalent number of spaces.  The default
  110.              tab stops are every eight columns, but can be set manually
  111.              with the e and t options.
  112.  
  113.          z   Ignores ^Z in the input file.  A ^Z (ASCII 26) normally
  114.              identifies the end of a file.  If this option is used, the
  115.              full number of bytes recorded in the directory will be read.
  116.  
  117.          A   Capitalize words.  Letters that follow another letter will
  118.              be converted to lowercase, all other letters will be
  119.              converted to uppercase.
  120.  
  121.          C   Strips control characters.  All characters below ASCII 32
  122.              will be removed. The exceptions are the CR, LF, and
  123.              Ctrl-Z characters.
  124.  
  125.          H   Strips high bytes.  All characters above ASCII 127 will be
  126.              removed.
  127.  
  128.          L   Converts all letters to lowercase.
  129.  
  130.          S   Strips high bits.  The high bit of all bytes above ASCII 127
  131.              will be cleared.
  132.  
  133.          U   Converts all letters to uppercase.
  134.  
  135.          Z   Suppresses ^Z in the output file. Normally a ^Z (ASCII
  136.              26) is written to the end of the file. If this option is
  137.              used, a ^Z will not be written.
  138.  
  139.        The following are some examples of FILT option and file
  140.        specifications:
  141.  
  142.          filt ?
  143.            Displays a summary of all options to the screen.
  144.  
  145.          filt cr < data.fil > data.new
  146.            Means: c = compress spaces to tab characters; and r = remove
  147.            trailing spaces.  The input file is DATA.FIL and the output
  148.            file is DATA.NEW.  This combination of options may greatly
  149.            reduce the size of a file by compressing or removing
  150.            unnecessary spaces.
  151.  
  152.          filt zZCHi500o500 < a:text.xxx > c:\doc\text.txt
  153.            Means: z = ignore any input ^Zs; Z = do not write a ^Z to the
  154.            end of the file; C = remove all control characters; H = remove
  155.            any characters with a value greater than 127; i500 = set the
  156.            input buffer size to 500 bytes; and o500 = set the output
  157.            buffer size to 500 bytes.  The input file is A:TEXT.XXX and
  158.            the output file is C:\DOC\TEXT.TXT.  This combination of
  159.            options converts the input file into a pure ASCII file with no
  160.            control characters (except for the line boundaries).  Note
  161.            that about 39,000 fewer bytes of memory are used during
  162.            execution because of the buffer sizes, 500+500=1000 instead of
  163.            the default 20000+20000=40000.
  164.  
  165.