home *** CD-ROM | disk | FTP | other *** search
/ Tools en Utilities / CDASS_5.ISO / shell / comp / dwc-a510.exe / DWC.DOC < prev    next >
Encoding:
Text File  |  1991-10-13  |  38.5 KB  |  993 lines

  1.  
  2.  
  3.                                DWC
  4.  
  5.  
  6.                          Archive Utility
  7.                           Release A5.10
  8.  
  9.                              3/07/90
  10.  
  11.  
  12.  
  13.  
  14.                                by
  15.  
  16.                          Dean W. Cooper
  17.  
  18.  
  19.  
  20.  
  21.   (C) Copyright 1986,1987,1988,1989,1990 by Dean W. Cooper
  22.       ALL RIGHTS RESERVED
  23.  
  24.  
  25.   NOTE: The source code to the compressor/decompressor modules of DWC,
  26.         as of this release,  is now considered Proprietary Information
  27.         and will no longer be distributed.  However, the executable
  28.         version of DWC, and the source code that is not part of the
  29.         compressor/decompressor modules, is still available free of
  30.         charge for both private and commercial use and may be
  31.         distributed provided NO fee is charged.  Updates are available
  32.         by sending a SASE with a floppy disk to: Dean W. Cooper,
  33.         18028 Cottage Garden Dr #103, Germantown, MD 20874
  34.  
  35.   Contributions (of any kind) to help improve this program are welcomed.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.   INTRODUCTION:
  43.   ------------
  44.  
  45.        An archive utility is a program that lets a User take a set of files,
  46.   compresses them, and put them together into one DOS file.  This DOS file
  47.   is called the archive.  DWC is an archive utility program that can be used
  48.   to add files to an archive, extract files from an archive, list the files
  49.   that are contained in the archive, and to delete one or more files in the
  50.   archive.
  51.  
  52.   Please note, that DWC is NOT file compatible with ARC, (C) Copyright System
  53.   Enhancement Assoc., and cannot be used to add or extract ARC files.
  54.  
  55.  
  56.  
  57.   USAGE:
  58.   -----
  59.  
  60.   When DWC is run with No arguments, the following usage information is
  61.   displayed:
  62.  
  63. ..............................................................................
  64.   DWC - Archive utility, Release 5.10, Created 3/07/90
  65.   (C) Copyright 1986-90 by Dean W. Cooper; All rights reserved.
  66.  
  67.  
  68.   DWC may be freely distributed provided NO fee is charged and provided it is
  69.   not modified.  If you use DWC, a contribution of $20 will be appreciated.
  70.   Commercial site licenses are available upon request.  Write to:
  71.  
  72.                               Dean W. Cooper
  73.                               18028 Cottage Garden Dr #103
  74.                               Germantown MD 20874
  75.                               Phone: 301/428-7210
  76.  
  77.  
  78.   To ADD     files:  DWC a <archive>  <file1> <file2> <file3>...
  79.   To EXTRACT files:  DWC x <archive>  <file1> <file2> <file3>...
  80.   Full usage info:   DWC ?
  81. ..............................................................................
  82.  
  83.  
  84.   When full usage is requested, the following is displayed:
  85.  
  86. ..............................................................................
  87. DWC [-]<command>[<options>][g<passwd>]  [@]<archive>[/s]  [[@]<file>[/s] ...]
  88.  
  89.       (Two basic Commands)                     (Options)
  90.   a  Add files to archive       <nnnn> Max number of entries in directory
  91. e,x  Extract files from archive     s  Suppress compression of file
  92.                                     b  Retain backup copy of archive
  93.        (Other Commands)             n  Suppress normal display messages
  94.   m  Move files to archive        w,!  Suppress (w)arnings, or all (!) messages
  95.   u  Update files to archive        o  Only extract files with newer dates
  96.   f  Freshen files to archive       q  Query on each add or extract
  97.   d  Delete files in archive        i  Inquire comment field on each add
  98.   p  Print files to screen        z,y  Optimize for size (z), or speed (y)
  99.   t  Test integrity of files      E,=  Make archive date equal newest file
  100.   c  Convert files in archive       j  Merge archives on add
  101.                                     r  Record directory on add, use on extract
  102.        (In-place Commands)          g  Encrypt on add, decrypt on extract
  103.   l  List files in the archive      ~  Negate the following option
  104.   v  Verbose list of files
  105.   F  Find files in archives                 (File Options)
  106.   h  Name header file of archive    @  File contains list of files
  107. i,k  Edit comment field of files   /s  Include all sub-directories in wildcard
  108. E,=  Make date equal newest              expansion
  109. ..............................................................................
  110.  
  111.  
  112.   DWC can be run four ways as follows:
  113.  
  114.   1) DWC by itself       (displays above short usage list)
  115.  
  116.   2) DWC followed by '?' (displays above full  usage list)
  117.  
  118.   2) DWC followed by,
  119.      - An archive file name (implies default command, usually list 'l')
  120.  
  121.   3) DWC followed by,
  122.      - One of the commands
  123.        and None, one, or more of the options
  124.      - An archive file name
  125.      - An optional list of files
  126.  
  127.  
  128.   Normal DOS-style wildcards are allowed in both the archive's name and
  129.   all file names in the file list.  If wildcards are given in the archive's
  130.   name and more than one archive is matched, then the given command is
  131.   simply run once for each archive that matches.
  132.  
  133.   All commands work with the specified list of files.  This list of files
  134.   can be only one of two things: either a list of DOS files to add to the
  135.   archive, or a list of one or more files in the archive to operate on.
  136.   If no files are given in the file list, then "*.*" is assumed.
  137.  
  138.  
  139.  
  140.   ADD COMMANDS:
  141.   ------------
  142.  
  143.   These are commands that "add" DOS files to the archive.  They are:
  144.  
  145.      a  Add      - Adds all files in file list to the archive.
  146.  
  147.      m  Move     - Adds all files in file list to the archive and then
  148.                    deletes them from DOS.
  149.  
  150.      u  Update   - Adds only the files in the file list that are not already
  151.                    in the archive or that have a more recent date then the
  152.                    ones in the archive.
  153.  
  154.      f  Freshen  - Adds only the files in the file list that are already
  155.                    in the archive and have a more recent date then the ones
  156.                    in the archive.
  157.  
  158.   If "*.*" is given for the the file list (or no files are listed), then
  159.   all files in the current directory are used for the file list.  For
  160.   instance:
  161.  
  162.      DWC a test
  163.  
  164.   Adds all files in the current directory to the archive "test.dwc"
  165.   Paths may also be specified in order to add files from other drives
  166.   and directories:
  167.  
  168.      DWC u test a:*.doc  \include\sys\*.h  *.c
  169.  
  170.   This adds all "doc" files from the current directory on drive A, all
  171.   "h" files from the directory "\include\sys" on the current drive, and
  172.   all "c" files in the current directory to the archive test, except for
  173.   those files that are older than files already in the archive.
  174.  
  175.   Adding a file to an archive that already has a file in it with the
  176.   same name, will cause the file in the archive to be replaced.  An
  177.   archive cannot contain two files in it with the same name.  Also,
  178.   the archive (and its backup) that is being added to is always auto-
  179.   matically eliminated from the file list and cannot be added to itself.
  180.  
  181.  
  182.  
  183.   ADD VARIATION COMMANDS:
  184.   ----------------------
  185.  
  186.   These commands are variations on the "add" command:
  187.  
  188.      d  Delete   - (Negative Add)  Deletes all files in the file list from
  189.                    the archive.
  190.  
  191.      c  Convert  - (Internal Add)  Temporarily extracts all files in the
  192.                    file list and then re-adds them.
  193.  
  194.    i,k  Comment  - (Attribute Add) Edits the comment field of all files in
  195.                    the file list in the archive.
  196.  
  197.   A file list must be given for the delete command as, otherwise, a null
  198.   file list would cause all files to be deleted.
  199.  
  200.   The convert command can be used to convert the files from one storage
  201.   method to another.  Files can be added during the day in un-compressed
  202.   form and then later converted to compressed form.  Or they could be
  203.   converted from un-encrypted form to encrypted form (note that one cannot
  204.   convert from encryption using one password to encryption using another
  205.   password.)
  206.  
  207.   The comment command is used to add a short comment to each file stored
  208.   in the archive.  The comments are displayed when the archive is listed
  209.   with the 'l' command.
  210.  
  211.  
  212.  
  213.   EXTRACT COMMANDS:
  214.   ----------------
  215.  
  216.   These are commands that extract files from the archive:
  217.  
  218.    e,x  Extract  - Extract all files in the list from the archive to DOS
  219.                    files.
  220.  
  221.      p  Print    - Extract all files in the list from the archive to
  222.                    standard output (the screen).  This can be re-directed
  223.                    to the printer.
  224.  
  225.      t  Test     - Extract all files in the list from the archive to the
  226.                    null output (nowhere) in order to test the integrity
  227.                    of the files.
  228.  
  229.   To extract all the files in an archive, just enter:
  230.  
  231.       DWC e test
  232.  
  233.   This will extract all files in the archive "test".  To extract just
  234.   some of the files in an archive, just list them:
  235.  
  236.       DWC t test  *.h  *.c
  237.  
  238.   This will test all the "h" and "c" files in the archive "test".
  239.   The test command will uncompress the files, checking for valid CRC's
  240.   and other integrity checks.
  241.  
  242.   The extract command can include directory paths to specify where to
  243.   put the extracted files.  For example:
  244.  
  245.       DWC x test  \some\where\*.txt  fred*  b:\*.txt  sam*
  246.  
  247.   This will extract all "txt" files and all "fred" files to the directory
  248.   "\some\where", and it will extract all "txt" files (a second time) and
  249.   all "sam" files to the root directory of drive B.  Note, that the 
  250.   directory used on one file is remembered until it is overridden by
  251.   another directory.
  252.  
  253.  
  254.   If you extract a file and the file already exists in DOS, then you
  255.   will be warned and asked if you want to overwrite the existing file.
  256.   The warning message tells if the existing file is older, newer, or the
  257.   same date as the file being extracted.  If warnings are suppressed, then
  258.   it is assumed you want to overwrite the file.  However, if there is
  259.   any error in extracting the file, then you will be prompted if you
  260.   really want to overwrite the file with a corrupted one.  Thus, one
  261.   does not need to worry about accidentally overwriting a file.
  262.  
  263.  
  264.  
  265.   LIST COMMANDS:
  266.   -------------
  267.  
  268.   These are commands that list the files in the archive:
  269.  
  270.      l  List     - Lists all files in the file list along with their comments.
  271.  
  272.      v  Verbose  - A more detailed (verbose) list of the files in the file
  273.                    list.
  274.  
  275.      F  Find     - Only lists archives containing specified files.  This is
  276.                    basically the 'l' command except that a '/s' is auto-
  277.                    matically appended to the archive name (if not already)
  278.                    and archives that have no match are not listed.
  279.  
  280.   The list command displays as follows:
  281.  
  282. Name          Length    Date       Comment
  283. ============  ========  =========  ============================================
  284. CHKDSK.COM        6468  19 Oct 83  System command to check disk integrity
  285. DEBUG.COM        12223  19 Oct 83  Machine language debuger
  286. DISKCOPY.COM      1703  30 Jan 84  Makes an image copy of one disk to another
  287. EDLIN.COM         8080  19 Oct 83  DOS line oriented editor
  288.         ====  ========
  289. Total      4     28474
  290.  
  291.   "Length" is the size of the file when un-compressed, and "Date" is
  292.   the date that DOS had for the file when it was added to the archive.
  293.   "Comment" is the User added comment field for each file.
  294.  
  295.   Please note, that the "r" option will make the list command display
  296.   the directory path saved with each file instead of the comment field.
  297.  
  298.   The verbose command displays as follows:
  299.  
  300. Last modified: 18 Dec 86   8:26a
  301.  
  302. Name          Length    Stowage   SF    Size now  Date       Time    Pass
  303. ============  ========  ========  ====  ========  =========  ======  ====
  304. CHKDSK.COM        6468  Crunched   17%      5419  19 Oct 83   7:51p   -- 
  305. DEBUG.COM        12223  Crunched   13%     10680  19 Oct 83   7:52p  Pass
  306. DISKCOPY.COM      1703     --       0%      1703  30 Jan 84  12:59a   -- 
  307. EDLIN.COM         8080  Crunched   52%      3912  19 Oct 83   7:51p   -- 
  308.         ====  ========            ====  ========
  309. Total      4     28474             24%     21714
  310.  
  311.   The verbose list includes the method of storage ("Stowage") which is
  312.   either:
  313.  
  314.            --       No compression
  315.         Crunched    Lempel-Ziv compression
  316.  
  317.   The stowage factor, "SF", is the percent the file was compressed.
  318.   "Size now" is the size of the file in the archive.  "Pass" is either
  319.   "--" for not encrypted, or "Pass" for encrypted.  The date given for
  320.   "Last modified" is the date the archive was last added to or modified.
  321.  
  322.   The find command displays as follows:
  323.  
  324. Archive: I:\USERS\DEAN\NEW\DSP-R10E.DWC  
  325. DSPPRV.H          1816  16 Sep 89  
  326. NCM.H             5197  26 Sep 89  
  327. NDP.H             3104  26 Sep 89  
  328. NSL.H             9109  26 Sep 89  
  329.  
  330. Archive: I:\USERS\DEAN\NEW\PXL-0212.DWC  
  331. PXL.H             5376  12 Feb 90  
  332. PXLM.H           15305  14 Aug 89  
  333. PXLTYPE.H         8576  21 Jul 88  
  334. TSRPXL.H          2380   6 Jan 89  
  335.  
  336. Archive: I:\USERS\DEAN\STORAGE\PXL86.DWC  
  337. PXL.H             4241  15 Aug 88  
  338.  
  339.  
  340.  
  341.   ATTRIBUTE COMMANDS:
  342.   ------------------
  343.  
  344.   These are commands that modify an attribute of the archive:
  345.  
  346.      h  Header   - Names one file in the archive to be the "header" file
  347.                    of the archive.  The header file is extracted and displayed
  348.                    before a listing of the archive.  There is no restriction
  349.                    to the size or contents of this file.
  350.  
  351.    E,=  Equal    - Resets the date of the archive to equal the newest file
  352.                    in the archive if No file is specified in the file list.
  353.                    Or resets the date to equal the date of one file given
  354.                    in the file list.
  355.  
  356.  
  357.  
  358.   ADD OPTIONS:
  359.   -----------
  360.  
  361.   These are options that modify the "add" commands:
  362.  
  363.      s  Suppress - Suppresses compression of files when they are added. Just
  364.                    an image copy will be added. (Does not apply to the delete
  365.                    or comment commands.)
  366.  
  367.      b  Backup   - Creates a backup copy of the archive before it is changed
  368.                    by adding to it.
  369.  
  370.      i  Inquire  - Prompts User for comment fields for each file as they are
  371.                    added.  (Does not apply to the delete command.)
  372.  
  373.      z  Size     - Optimizes compression of files for smaller size when they
  374.                    are added.  The default compression technique is optimized
  375.                    for speed and requires less memory.  (Does not apply to
  376.                    the delete or comment commands.)
  377.  
  378.      y  Speed    - Uses the compression algorithm that is designed for speed
  379.                    of compression as compared to size.  This algorithm
  380.                    requires less memory then the "size" option.  (Does not
  381.                    apply to the delete or comment commands.)
  382.  
  383.      =  Equal    - Makes the date of the new archive equal the date of the
  384.                    newest file in the archive.
  385.  
  386.      j  Merge    - When a file in the file list is an archive, it is merged
  387.                    into the new archive instead of being added like a normal
  388.                    file.  (Does not apply to delete, comment, or convert.)
  389.  
  390.  
  391.  
  392.   EXTRACT OPTIONS:
  393.   ---------------
  394.  
  395.   These are options that modify the "extract" commands:
  396.  
  397.      o  Only     - Causes only the files with more recent dates than the
  398.                    DOS files they would overwrite to be extracted.  The
  399.                    warning that a file is going to be overwritten, is
  400.                    automatically suppressed.
  401.  
  402.  
  403.  
  404.   BOTH ADD & EXTRACT OPTIONS:
  405.   --------------------------
  406.  
  407.   These are options that modify both the add and extract commands:
  408.  
  409.      q  Query    - Queries the User for confirmation before each add or
  410.                    extract is performed. (Applies to the print command
  411.                    but not the comment command.)
  412.  
  413.      r  Record   - Records what DOS directory the file was in when added
  414.                    to the archive and then extracts the file to that
  415.                    directory when extracting unless overridden.  Can be
  416.                    used with the list command to display the directories
  417.                    recorded for each file.  (Does not apply to delete,
  418.                    comment, or convert.)
  419.  
  420.      g  Garble   - This option must be the last option listed.  The
  421.                    characters following it are interpreted as a password.
  422.                    Using this password, files are encrypted when added
  423.                    and decrypted when extracted.  If a file is encrypted
  424.                    and one attempts to extract it without supplying a
  425.                    password, he will be warned.
  426.  
  427.      n  Notes    - Normal screen output is suppressed by sending it to the
  428.                    null output.
  429.  
  430.      w  Warnings - Warning messages are suppressed such as the warning that
  431.                    an extracted file will overwrite an existing DOS file.
  432.                    Also suppressed is the warning that the directory one is
  433.                    extracting to does not exist.  In this case, the
  434.                    directory is automatically created.
  435.  
  436.      !  All      - All messages will be suppressed including notes, warnings
  437.                    and errors.  This is useful in a batch file that can
  438.                    check for any error codes returned by DWC.  The only
  439.                    things that can't be suppressed are the query option, the
  440.                    inquire option/command, and the list commands.
  441.  
  442.  
  443.   Examples:
  444.  
  445.        DWC agxyz test *.txt
  446.  
  447.   This will add all "txt" files in the current directory to the archive
  448.   "test".  They will be encrypted using the password "xyz" (case insensitive).
  449.   The attribute that the files were encrypted is recorded, but the password
  450.   is not saved.  Thus, care must be taken using this option, as it is
  451.   unlikely that the file could be recovered if the password was lost.  To
  452.   extract these files, just type:
  453.  
  454.        DWC egxyz test
  455.  
  456.   The record option is a good way to backup an entire directory including
  457.   all sub-directories.  When restoring, the directories will automatically
  458.   be created.  For example:
  459.  
  460.        DWC ar backup \source/s
  461.  
  462.   This will add all files in the directory "source", and all of its sub-
  463.   directories, to the archive "backup".  The names of the directories
  464.   that the files are in will be recorded with the files in the archive.
  465.   To reproduce the entire directory tree on another drive, one could type:
  466.  
  467.        DWC erw backup d:
  468.  
  469.   This will extract all the files in the archive "backup" to drive D.
  470.   The files that have a directory recorded with them will be put in those
  471.   directories on drive D.  If the directories do not exist, they will
  472.   automatically be created.  If the "warning" option was not used, you
  473.   would be prompted whether or not you want the directories created.  If
  474.   the "record" option was not used, all files would simply be extracted to
  475.   the current directory of drive D.  If the following was typed:
  476.  
  477.        DWC erwq backup  d:*.c  a:\*.c
  478.  
  479.   This would extract all "c" files in the archive to drive D, to their
  480.   recorded directories, and create the directories automatically.  Then
  481.   all "c" files would be extracted (a second time) to the root directory
  482.   of drive A ignoring what directories were recorded with the files.  As
  483.   each file is extracted, the User would be be prompted for confirmation
  484.   as to whether or not that file should be extracted.
  485.  
  486.   Please note that currently, no two files with the same name can be added
  487.   to the archive even though they are in different directories.  This will
  488.   be corrected in a future release.
  489.  
  490.  
  491.  
  492.   MISCELLANEOUS OPTIONS:
  493.   ---------------------
  494.  
  495.      ~  Negate   - Negates or reverses the effect of the option following.
  496.                    This is useful to override options that were prepended
  497.                    automatically when using the DWCADD environment variable.
  498.                    For example:
  499.  
  500.                         "~b" means don't do backups
  501.                         "~s" means don't suppress compression
  502.                         "~w" means don't suppress warning messages
  503.                         "~z" means don't optimize for size (use speed)
  504.                                  .. etc ..
  505.  
  506.      <digits>    - This number is the maximum number of entries allowed
  507.                    in the archive's directory when loaded into memory.
  508.                    The default is 900 which requires about 30K, but can
  509.                    be set from 100 to 1800.
  510.  
  511.  
  512.   WILDCARDS:
  513.   ---------
  514.  
  515.   Wildcards can be used in both the archive name and all files in the
  516.   file list.  If a name used is the name of a DOS directory, then
  517.   "*.*" is assumed.  For example:
  518.  
  519.        DWC a test  dos
  520.  
  521.   If "dos" is a file, then it will be added as normal.  But if "dos"
  522.   is a directory then all files in that directory will be added just
  523.   as if the following command was given:
  524.  
  525.        DWC a test  dos\*.*
  526.  
  527.   This is the same for the archive name.  If "test" is the name of a
  528.   directory, then all archives in that directory will be operated on just
  529.   as if the following command was given:
  530.  
  531.        DWC a test\*.*  dos\*.*
  532.  
  533.   Wildcards in the archive name are more common when listing or extracting.
  534.   For example:
  535.  
  536.        DWC ewo a:*  \include\*.h  *.lib   \doc\*.doc
  537.  
  538.   This will extract from all archives on drive A.  Only the files with
  539.   more recent dates, or that do not already exist, will be extracted and
  540.   all warnings (such as "File not found" warnings) will be suppressed.
  541.   "h" files and "lib" files will be extracted to the directory "\include",
  542.   while "doc" files will be extracted to the directory "\doc".
  543.  
  544.  
  545.   The "@" option may be prepended onto any file name (including the archive
  546.   file name) and indicates that the specified file is actually a text file
  547.   containing a list of file names to use.  The files listed in such a list
  548.   may include wildcards and even further levels of '@' list files.
  549.  
  550.   The file names in the list may be separated by any number of the following
  551.   characters:
  552.  
  553.      - Control characters (including tabs and returns)
  554.      - Spaces or commas
  555.      - Illegal file characters:  [ ] ^ " | > <
  556.  
  557.  
  558.   The "/s" option may be tacked onto the end of any archive name or file
  559.   name to extend wildcard expansion to all sub-directories.  For example:
  560.  
  561.        DWC a test dos\*.txt/s
  562.  
  563.   This means to add all "txt" files in the "dos" directory and all
  564.   directories in the "dos" directory and all directories in those
  565.   directories, and so on.  One can add all files on a drive by giving
  566.   the command:
  567.  
  568.        DWC a test \*.*/s
  569.  
  570.   Or even more simply:
  571.  
  572.        DWC a test \/s
  573.  
  574.   Or:
  575.  
  576.        DWC a test a:\/s
  577.  
  578.   Which adds all files in all directories on the A drive.
  579.  
  580.  
  581.  
  582.   PATHNAMES:
  583.   ---------
  584.  
  585.   All file path names may be formed using either back slashes or forward
  586.   slashes.  Thus, the following two commands are identical:
  587.  
  588.        DWC a c:\util\save  d:\stuff\*.*
  589.  
  590.        DWC a c:/util/save  d:/stuff/*.*
  591.  
  592.  
  593.  
  594.   RAMDISK SUPPORT:
  595.   ---------------
  596.  
  597.   When adding to an archive, a temporary archive is created and then
  598.   re-named to the new archive when the add is successfully completed.
  599.  
  600.   This archive is normally put in the current directory, but can be
  601.   put in any other directory by specifying the path in an environment
  602.   variable.  The following environment variables are searched in order
  603.   for a path to use:
  604.  
  605.         DWCTEMP
  606.         ARCTEMP
  607.         TEMP
  608.         TMP
  609.  
  610.   To make DWC put the temporary archive on a ramdisk on drive D, just
  611.   type:
  612.  
  613.         set DWCTEMP=D:
  614.  
  615.   Another temporary file that DWC uses is a temporary extract file.
  616.   When a file is extracted, it is first extracted to a temporary file
  617.   and, if successful, re-named to the actual extracted file.  (Note,
  618.   this only happens if an existing file is being overwritten.)
  619.  
  620.   When re-naming a temporary file from one drive to another, there
  621.   may be an out of disk space error.  In this case, the file is re-named
  622.   in place and the User is warned what happened to his file.  If there
  623.   is an error re-naming the file in place, then the User is told the
  624.   name of the temporary file where his data is now at.
  625.  
  626.   Also, the control-C interrupt is handled, and all temporary files
  627.   are deleted before the program terminates.
  628.  
  629.  
  630.  
  631.   ENVIRONMENT VARIABLES:
  632.   ---------------------
  633.  
  634.   Besides the environment variable used to indicate where the temporary
  635.   files should be place, there are three other environment variables as
  636.   follows:
  637.  
  638.         DWCDEF   -  Defines the default command and options to execute
  639.                     when none are given.
  640.  
  641.         DWCADD   -  Defines options to prepend to the ones given on the
  642.                     command line.
  643.  
  644.         TZ       -  Sets the time zone for your computer.  (This is a
  645.                     standard MicroSoft C library environment variable.)
  646.  
  647.   For example:
  648.  
  649.         C>set DWCDEF=x
  650.  
  651.   Will cause an archive to be automatically extracted when no command is
  652.   given as in:
  653.  
  654.         C>dwc test
  655.  
  656.   Here all files from the archive "test" will be extracted because the
  657.   default command is "x" as defined be the environment variable DWCDEF.
  658.   If this environment variable is not set, the default command will be
  659.   'l', or the list command.
  660.  
  661.         C>set DWCADD=zq
  662.  
  663.   Will cause the options "z" and "q" to be prepended to whatever options
  664.   the user supplies on the command line.  The command:
  665.  
  666.         C>dwc a test
  667.  
  668.   will in effect become,
  669.  
  670.         C>dwc zqa test
  671.  
  672.   Here, files will be added using the "size" algorithm and the user will
  673.   be prompted before each file is added.  Please note that options are
  674.   parsed in left to right order, so that the following command:
  675.  
  676.         C>dwc ay test
  677.  
  678.   would override the effect of the "z" option.  Also, options that do
  679.   not apply for a given command are simply ignored.
  680.  
  681.   The environment variable TZ is used to set the time zone that you
  682.   are in.  This effects how a file's time (and possibly date) is
  683.   displayed when files are listed with the 'v' and 'l' options and
  684.   effects what date and time the files are given when they are extracted.
  685.  
  686.   Say someone who lives in New York adds a file dated Nov 23, 87 - 9:19p
  687.   to an archive and then gives the archive to a friend in California.
  688.   Normally, if neither user has set the TZ environment variable, the
  689.   file when extracted in California would be given the same date and
  690.   time.  However, if both users have set the TZ variable appropriately,
  691.   then the file extracted in California would be given the time 6:19p,
  692.   which shows the correct time of its creation.
  693.  
  694.   The default time zone is Pacific daylight savings time.  This is
  695.   denoted as follows:
  696.  
  697.         SET TZ=PST8PDT
  698.  
  699.   The value of TZ must be a three-letter time zone name (such as EST),
  700.   followed by a signed or unsigned number giving the difference between
  701.   Greenwich mean time and the local time zone.  The number may be followed
  702.   by a three-letter daylight-saving-time zone name (such as EDT).
  703.  
  704.  
  705.  
  706.  
  707.   MEMORY:
  708.   ------
  709.  
  710.   Memory requirements vary.  Given lots of memory, the program will use
  711.   the following amounts:
  712.  
  713.         "size" compression   -  410K
  714.         "speed" compression  -  320K
  715.         decompression        -  306K
  716.  
  717.   Those figures include two very large buffers that can be as large as
  718.   63K each.  However, if memory does not permit, then these buffers will
  719.   be automatically reduced so that memory requirements are as follows:
  720.  
  721.         "size" compression   -  290K
  722.         "speed" compression  -  198K
  723.         decompression        -  182K
  724.  
  725.   Now this assumes the default size of the in-memory directory which
  726.   at 900 entries requires about 30K.  This can be reduced to 100
  727.   entries or raised to 1800 entries.  Say it's reduced to 300, that
  728.   would give us:
  729.  
  730.         "size" compression   -  270K
  731.         "speed" compression  -  178K
  732.         decompression        -  162K
  733.  
  734.   Now, the "size" compression is a special case, as it can be reduced
  735.   even more.  If one wants to use the "z" option, but memory does not
  736.   permit, then the program will automatically reduce the size of the
  737.   hash table until memory permits.  The hash table starts out at 31K
  738.   and will be reduced down to 26K.  This is the number of entries in
  739.   the hash table each of which requires 4 bytes.  Thus, at best this
  740.   would give us:
  741.  
  742.         "size" compression   -  250K
  743.  
  744.   This as the trade-off requiring more time (shouldn't be more than
  745.   twice as slow).  If memory still doesn't permit, then the string table
  746.   will be reduced in order to make more room.  The string table has 22K
  747.   entries and will be reduced down to 16K if need be.  This will save
  748.   us 5 bytes per entry, or at best would give us:
  749.  
  750.         "size" compression   -  220K
  751.  
  752.   This has the trade-off of worse compression as the "size" compression
  753.   gets most of its advantage by using a large string table.  However,
  754.   this is still better than the "speed" option which uses a 12K string
  755.   table and squashing which uses a 8K string table (ARC uses a 4K table).
  756.  
  757.   Please note, that the "l" and "v" commands (the list commands) usually
  758.   require only about 60K of memory.  However, if one is listing an
  759.   archive that has a header file, then the header file will be extracted
  760.   during the list, and thus, require the same amount of memory described
  761.   above for decompression.  Also, if one lists more than one archive at
  762.   a time, then DWC assumes the worst case and allocs memory assuming one
  763.   of the archives will contain a header file.
  764.  
  765.   Also note, that in the case of the "l", "v", "h", and "x" or "e"
  766.   commands, when used with only one archive, that the size of the
  767.   in-memory directory is based on the actual number of entries in the
  768.   archive.  Thus, if the archive has more entries than had been specified
  769.   for the directory to hold, there will be no directory overflow error.
  770.   Also, the minimum amount of memory will be used.
  771.  
  772.  
  773.  
  774.  
  775.   ERROR CODES:
  776.   -----------
  777.  
  778.   DWC returns error codes to DOS that can be tested for in batch files.
  779.   If no errors or warnings occur, then DWC will return 0.  The following
  780.   sections list all possible errors and warnings along with the codes
  781.   returned if that warning or error occurs.
  782.  
  783.   Please note that often, DWC will continue as best it can even after a
  784.   warning or error occurs.  In this case, multiple errors or warnings
  785.   may occur.  They are given the following error codes:
  786.  
  787.        Multiple errors:     2
  788.        Multiple warnings:   3
  789.  
  790.   Also, error codes override any warnings.  So if to two warnings occur
  791.   and only one error with the code of 20, then DWC will return 20.
  792.  
  793.   If DWC is terminated by a Control-C, then DWC will return:
  794.  
  795.        Control-C:           1
  796.  
  797.  
  798.  
  799.  
  800.   USAGE ERRORS:
  801.   ------------
  802.  
  803.   These are the possible errors that result in immediate termination
  804.   of DWC with an error message and the normal usage display.  They
  805.   can only be suppressed with the "!" option.
  806.  
  807.   Code  Message
  808.  
  809.    10   ERROR: Illegal parameter in argument list.
  810.            - A character in the command and options argument was not
  811.              a known command or option.  If "!" follows the offending
  812.              character, this message would not be suppressed.
  813.  
  814.    11   ERROR: No command specified.
  815.            - Only options but no command was found in the command and
  816.              options argument.
  817.  
  818.    12   ERROR: Only ONE command allowed.
  819.            - More than one command was found in the command and options-
  820.              argument.  This is illegal.
  821.  
  822.    13   ERROR: Password required with the 'g' option.
  823.            - No password was found to follow the "g" option in the command
  824.              and options argument.
  825.  
  826.    14   ERROR: Missing archive file in argument list.
  827.            - Archive file listed on command has an extension other than
  828.              ".DWC", or ".*".
  829.  
  830.  
  831.  
  832.  
  833.   ERRORS:
  834.   ------
  835.  
  836.   These are the possible errors that DWC can report.  They can only be
  837.   suppressed with the "!" option.
  838.  
  839.   Code  Message
  840.  
  841.   20    ERROR: Out of memory
  842.          - Ran out of memory.  See section on memory requirements.  It's
  843.            possible to run out of memory even if your computer has lots
  844.            as memory for various reasons.  One possible reason is too many
  845.            files matching the wildcards specified.  This error causes
  846.            immediate termination.
  847.  
  848.   21    ERROR: Files must be specified to be deleted.
  849.          - The delete command was given but no files specified.  This error
  850.            causes immediate termination.
  851.  
  852.   22    ERROR: No header file specified.
  853.          - The header command was given but no header file was specified.
  854.            This error causes immediate termination.
  855.  
  856.   23    ERROR: Can't open NULL output channel
  857.          - When messages are suppressed, they are redirected to the nul
  858.            output, but it failed to open.  This error causes immediate
  859.            termination.
  860.  
  861.   24    ERROR: Can't open archive ssss.xxx for writing to.
  862.          - The header command could not re-open the archive in write mode.
  863.            This error causes immediate termination.
  864.  
  865.   25    ERROR: Out of disk space on drive X:, giving up.
  866.          - Ran out of space on the indicated drive.  The temporary archive
  867.            file is deleted.  This error causes immediate termination.
  868.  
  869.   40    ERROR: Archive file ssss.xxx does not exist.
  870.          - Command requires an archive and it cannot be opened.
  871.  
  872.   41    ERROR: Can't create temporary file tttt.xxx ... Skipping ssss.xxx
  873.          - The temporary extract file could not be created, so the file
  874.            ssss.xxx is not extracted.
  875.  
  876.   42    ERROR: Unexpected EOF while reading ssss.xxx ... Skipping
  877.          - An unexpected EOF was encountered while seeking to the position
  878.            in the archive where the file ssss.xxx was supposed to be.
  879.  
  880.   43    ERROR: File ssss.xxx corrupted, CRC error
  881.   43    ERROR: File ssss.xxx corrupted, Stack Overflow
  882.   43    ERROR: File ssss.xxx corrupted, Size Mismatch
  883.          - The extracted file was corrupted as detected by a CRC error, or
  884.            a Lempel-Ziv un-compress stack overflow, or the extracted file's
  885.            size does not equal the saved size.
  886.  
  887.   44    ERROR: ssss.xxx not a DWC archive file or is corrupted.
  888.          - The last three bytes of a DWC archive file must be the letters
  889.            "DWC".  Either this or some other obvious error in the file
  890.            was found when opening it.
  891.  
  892.   45    ERROR: Directory of archive ssss.xxx corrupted.
  893.          - The number of directory entries stored with the archive caused
  894.            a seek past the beginning of the file.
  895.  
  896.   46    ERROR: Can't create temporary DWC file ssss.xxx
  897.          - Temporary archive file used on a add could not be created.
  898.  
  899.   47    ERROR: Archive ssss.xxx too corrupted to use.
  900.          - All directory entries in the archive are corrupted.
  901.  
  902.   48    ERROR: Can't create file ssss.xxx
  903.          - While re-naming a file, the new file could not be created.
  904.  
  905.   49    ERROR: Ran out of disk space.  File ssss.xxx is now in the temporary
  906.          directory dddd
  907.          - While copying a temporary file from one drive to another, we
  908.            ran out of disk space, so the file specified is now in the
  909.            directory specified.
  910.  
  911.   50    ERROR: Ran out of disk space.  File ssss.xxx is now in the temporary
  912.          directory and file ddd\tttt.xxx
  913.          - While copying a temporary file from one drive to another, we
  914.            ran out of disk space, so the file specified is now in the
  915.            directory specified and has the new name specified.
  916.  
  917.   51    ERROR: Drive x: does not exist.
  918.          - When trying to open the archive file, we found that the drive
  919.            specified did not exist.
  920.  
  921.   52    ERROR: Can't create archive tttt.xxx.
  922.          - The archive name includes wildcard characters and cannot be
  923.            created.
  924.  
  925.  
  926.  
  927.  
  928.   WARNINGS:
  929.   --------
  930.  
  931.   These are the possible warnings that DWC can report.  They can be
  932.   suppress using the "w" option or the "!" option.
  933.  
  934.   Code  Message
  935.  
  936.   none  WARNING: Not enough memory to optimize
  937.            - In order to optimize for size, one needs at least 248K of
  938.              free memory (up to 410K will be used.)  Normal compression
  939.              requires at least 198K of free.  These figures assume the
  940.              default size of the in-memory directory.
  941.  
  942.   60    WARNING: File ssss.xxx repeated ... Ignoring
  943.            - One cannot add more than one file with the same name.
  944.  
  945.   61    WARNING: File not found: ssss.xxx
  946.            - The file specified is not in the archive.
  947.  
  948.   62    WARNING: Can't open temporary file tttt.xxx ... Skipping ssss.xxx
  949.            - The temporary extract file could not be created, so the file
  950.              ssss.xxx, that was to be converted, is skipped
  951.  
  952.   63    WARNING: Can't find file ssss.xxx ... Skipping it.
  953.            - The file that was to be added could not be found, so it is
  954.              skipped
  955.  
  956.   63    WARNING: Can't open file ssss.xxx ... Skipping it.
  957.            - The file that was to be added could not be opened, so it is
  958.              skipped
  959.  
  960.   64    WARNING: File ssss.xxx archived with password ... Skipping
  961.            - An attempt was made to extract an encrypted file without
  962.              giving a password, so it is skipped
  963.  
  964.   65    WARNING: Extraction of the archive file ssss.xxx from itself
  965.            and on top of itself is NOT allowed ... Skipping\n");
  966.            - This warning is not likely, but is given to warn the User
  967.              of a destructive extraction.
  968.  
  969.   66    UNKNOWN compression method ... Skipping
  970.            - The file was compressed using an unknown method and cannot
  971.              be uncompressed using this release of the archiver.
  972.  
  973.   67    WARNING: Header file not found in archive.
  974.            - The header file named does not match any file in the archive.
  975.  
  976.   68    WARNING: More than one header specified. Using ssss.xxx.
  977.            - More than one archive file was listed in the file list.
  978.              So DWC will just use the first one.
  979.  
  980.   69    WARNING: File(s) specified not found in archive.
  981.            - The file (or files) specified for the equal command could
  982.              not be found in the archive.
  983.  
  984.   70    WARNING: Only xx directory entries out of nn found.
  985.            - The archive's directory is tacked onto the end of the archive
  986.              file and EOF was reached before all entries were read in.
  987.  
  988.   71    WARNING: Directory entry # xx, file "ssss.xxx" corrupted .. Ignoring.
  989.            - The specified directory has corrupted data
  990.  
  991.   72    WARNING: Unexpected EOF, ignoring...
  992.            - While copying a file, an unexpected EOF was encountered.
  993.