[comp.os.cpm] CRCKK.LBR - new version of file CRC checking program

michaelk@ucb-vax.ARPA (11/27/86)

Now available from SIMTEL20...

Filename                        Type     Bytes   CRC

Directory PD:<CPM.FILUTL>
CRCKK.LBR.1                     BINARY   23168  BAFBH


crckk.c  --  CP/M version of the Unix version of the CP/M utility crck
             Version 3.0

Usage:
    crckk [-t|c|u|i] [filename ...   (wildcards OK)  ]

  Calculates a 16-bit cyclic redundancy check on its input files and
 prints the resulting number in hexadecimal.  CRCK(K) is manually invoked
 on two versions of the same file to ensure that they are the same.
 Prints the the filename, size in bytes or sectors depending on the
 option flag, and the CRC.

 This program produces the same check number as do "CRCK" programs,
 the extra "k" in this program's name is for identity-control. This is a 
 different program from CRCK.ASM (currently in version 4.4) used in
 the CP/M world now.

 Options:
     -t    Perform CRCK on a CP/M text file that is stored as a CP/M
           file. CTL-Z is used as valid EOF.

     -u    Perform CRCK on a regular CP/M file.  Takes whatever is there.

     -c    Perform CRCK on a CP/M ".COM" file. Same as -u flag,
           except sectors are reported rather than bytes.

     -i    Perform CRCK on a CP/M ".COM" file stored in ITS binary 
           format.  Same as -c, but ignores the first four bytes of file.

     If no option flag is chosen, the default option is -u.
 

===================================================
=====                                         =====
===== DIFFERENCES WITH EXISTING CP/M VERSIONS =====
=====                                         =====
===================================================


   1.  This version actually runs a fair bit FASTER than CRCK44 !!!

   2.  Has the true-text "t" option.

       This is good for downloading text files (like shar files)
       from UNIX. If you download a text file "as is"from UNIX OR,
       your modem program doesn't "fill with multiple CTL-Z's",
       then there's a problem matching the CP/M CRCK with the UNIX
       version of CRCK program.  With this option, this crckk "-t" will
       match the "plain" UNIX crck for unadulterated text file transfers.

   3.  User-interface is a bit friendlier and/or more UNIX-like.

       a) Invalid dash option (like crckk -z) will give verbose
          help/error message.

       b) Multiple filenames as parameters are allowed.

       c) Each filename can be wildcarded.

       d) Each wildcard expansion is sorted.

       e) Standard-in is allowed source ("< filename")

       f) Output list can be redirected to file using standard output
          (" > outputfile ").

       g) Error message(s) can be redirected into standard error.
          (" >> errorfile").

       h) Pipes are also allowed (but in general not too useful except
          for with other CP/M programs that are suitably compiled).


   NOTE:  I didn't write this program, but I did make rather substantial
          changes to the original UNIX version.  Some changes were for
          functional reasons (the -t option), but mostly for huge
          speed-performance reasons.  My original port was slow as
          a dog (not released).  This version is VERY fast.

Mike Kersenbrock   USENET: tektronix!copper!michaelk  
Tektronix Computer Aided Software Engineering
Aloha, Oregon