;
                                   FILT.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
               4k (30)   0393  8.10       Gene Pizzetta 10/91      Z3COM7

  1- Syntax/Options  2- Screen Display  3- Notes                              


   FILT is a ZCPR3 utility that sets or expands tabs and removes several types
of unwanted characters in ASCII text, WordStar documents, or assembler  source
code files.   A summary of what the program found and what it did is presented
upon completion.

   FILT is a Z'ified version of  FILT7  (vs 7.0a, 5/11/86)  by  Irv Hoff.  The
various interactively-chosen modes have been converted into a group of logical
command line options.
:1
 Syntax   FILT {dir:}infile {{dir:}outfile} {{/}options}

   Only the input filename is  required.   If no output filename is given, the
default is the name of the input file.   Any existing file with the  same name
in the destination directory will be renamed to filetype BAK.  If no DIR or DU
specifications are given, the current directory is assumed.

   As distributed,  FILT  defaults to  ASCII text  mode.   Control  characters
(except carriage returns and line feeds) are removed, high-bits are reset, and
trailing spaces and tabs are removed.  Lines ending with only a line feed will
have a carriage return inserted.  All tabs are expanded to spaces and then the
file is retabbed in 8-column increments as long as a tab will  replace  two or
more spaces.
 Mode Options 

  Only one mode option should be given.   If more than one is given,  the last
one found will be used.

     S    Source code.  Quoted strings are not retabbed, but even 
          single spaces are replaced by tabs until a semi-colon 
          is encountered.

     A    ASCII Text.  This is the default mode (see above).

     W    WordStar, no dot commands.  Lines beginning with a period
          (dot commands) are removed, but ".pa" commands are replaced
          by form feeds and existing form feeds are retained.  Soft 
          carriage returns and binding spaces are converted to normal.
          Soft hyphens at the end of a line are made normal, but other
          soft hyphens (which are control characters) are removed.

     D    WordStar, with dot commands.  Identical to option W, above,
          except that lines beginning with a period (dot commands) are
          retained and ".pa" commands are not replaced by form feeds.
 Other Options 

     T    Don't use tabs.  Tabs are expanded to spaces, but the 
          file is not retabbed.

     Q    Quiet mode toggle.  If the ZCPR3 quiet flag is on, FILT 
          defaults to quiet mode.  In that case, this option puts 
          FILT in verbose mode.  If the quiet flag is off, this 
          option puts FILT into quiet mode.  In quiet mode all 
          screen output is suppressed except error messages and 
          the usage screen.

   All options can be configured as the defaults using ZCNFG and the FILTn.CFG
file.
:2
 Screen Display 

   By default, an incrementing line count is displayed while  FILT is working.
The final summary screen varies  depending  on  the  current  file  mode.  The
default summary shows counts of the total lines in the file,  original spaces,
original tabs,  current spaces,  current tabs,  form feeds deleted,  high bits
zeroed, control characters deleted,  orphan line  feeds  fixed,  and  trailing
spaces deleted.

   In WordStar mode, the display shows the number of form feeds present, since
they are not deleted.   It  also adds counts for dot  commands  deleted  (with
option W), dot commands retained (with option D), soft carriage returns fixed,
soft hyphens fixed, and binding spaces fixed.

   Under ZSDOS or ZDDOS, FILT will  transfer the  create  date  stamp from the
source file to the new file.   If the source  file has  no  create  date,  the
source file's modify date will be used instead.

   On error,  such as an invalid directory or a file not found,  FILT sets the 
program error flag to the standard codes listed in Z34ERR.LIB  and invokes the
error handler.   Even  a user  abort via  ^C  invokes  the  error handler so a
pending SUB or ZEX operation can be aborted.
:3
 FILT Notes 

   a. Vs 8.1 updates (9/30/91, Gene Pizzetta):
      - FILT did not check for  ambiguous  filenames  (and  never has),  which
        could cause a small disaster.  It checks now.
      - Made display of line count progress reports a configurable option.

   b. Vs 8.0 updates (9/10/91, Gene Pizzetta):
      - Disassembled enough to change to a relocatable file (it was easy after
        working on JUSTIFY).  
      - Changed to Z80 opcodes to partially compensate for space used  by add-
        itional features.  
      - Replaced some routines with library routines.  
      - Now allows destination directory without destination filename.  
      - Changed key options to command line entry.  
      - Changed some messages to make them more descriptive.  
      - Added DU support,  intelligent usage screen, error flag setting, error
        handler invocation, quiet mode, and ZCNFG configuration.  
      - Under  ZSDOS and  ZDDOS file create date stamps are transferred to the
        new file.  
      - Incorporates some of the code efficiencies suggested for JUSTIFY.  


