home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / z / zpay93_1.zip / LHARC.MAN < prev    next >
Text File  |  1993-01-01  |  41KB  |  1,195 lines

  1. /*----------------------------------------------------------------------
  2.  
  3.       User's Manual for High-Performance File-Compression Program
  4.  
  5.                            LHARC  Version 1.13c
  6.  
  7.            Copyright (c) Haruyasu Yoshizaki (Yoshi), 1988-89
  8.  
  9.                                                     Nifty Serve PFF00253
  10.                                                     ASCII PCS   pcs02846
  11.  
  12. ----------------------------------------------------------------------*/
  13.  
  14. 0. It Came to Pass One Day...
  15.  
  16.    After reading "A Hard Disk Cookbook" from Shouei Press, I had a
  17.    strong desire to write my own archiving utility.  On the Nifty Serve
  18.    network, I was first exposed to Mr. Miki's Larc, which surpasses the
  19.    well-known PKware in compression ratios, as reported in the Forum
  20.    Software Debut and Review.  The next shock came when I saw Mr.
  21.    Okumura's LZari, which has even better compression-ratio performance.
  22.    I started to rewrite LZari in assembly language, trying to make it
  23.    run faster, but I could find hardly no good way to speed up the
  24.    process of un-archiving.
  25.  
  26.    So, as an alternative, I used adaptive Huffman coding with an LZSS
  27.    encoder in order to achieve similar compression ratios with shorter
  28.    decompression times.  This is the idea used in  LHARC .
  29.  
  30.    No one can be sure of eradicating all possible bugs, yet if SPACE is
  31.    more valuable than TIME to you, please give this program a try.  It
  32.    may be slower in execution, but it achieves the tightest compression
  33.    ratios of any general archiver in the present "shareware" environ-
  34.    ment.
  35.  
  36.    (Copyright reserved).
  37.  
  38.  
  39. 1. How to Use It:
  40.  
  41.    Just type "LHARC" to see a concise help screen of the program's
  42.    command structure.
  43.  
  44.  
  45.    Command-line synopsis:
  46.    ======================
  47.  
  48.     LHARC  [<command>] [{{/|-}{<switch>[-|+|2|<option>]}}...] <archive_name>
  49.          [{<drive_name>:}|{<home_directory_name>\}] [<path_name> ...]
  50.  
  51.    Only a single command can be specified on the command line, but a
  52.    group of switches can be specified together after the '/' or '-'
  53.    delimiter.  You may place switch(es) anywhere following the command.
  54.  
  55.    Hitting 'Ctrl-Break' or 'Ctrl-C' at any time will abort  LHARC 's
  56.    current operation and return you to the DOS prompt.
  57.  
  58.  
  59.  
  60.  LHARC  User's Manual                                               page 2
  61.  
  62.  
  63.  
  64.    Terminology:
  65.    ============
  66.  
  67.    A path name comprises a directory name and a file name:
  68.  
  69.         a:\tc\include\stdio.ext
  70.         |<---- Path_name ---->|
  71.         |<Directory_>||<File_>|
  72.         |<-- name -->||<name >|
  73.  
  74.    Both the archive name and file name(s) specified in the command line
  75.    can optionally include a path i.e., a drive or directory name.  If
  76.     LHARC  becomes excessively confused by your typing, it will just stop
  77.    and wait for keyboard input.  Hit 'CTRL-Break' or 'CTRL-C' to escape
  78.    back to the prompt and then use the DOS function keys to edit and
  79.    reenter your command line.   LHARC  will continue to answer your
  80.    request.
  81.  
  82.  
  83.  
  84.  LHARC  User's Manual                                               page 3
  85.  
  86.  
  87.  
  88.    Commands:
  89.    =========
  90.  
  91.    a (Add files to archive)
  92.  
  93.       LHARC  a ARCHIVE.LZH file1.ext
  94.  
  95.         Adds 'file1.ext' to 'ARCHIVE.LZH'.  If 'ARCHIVE.LZH' does
  96.         not exist, then  LHARC  will create it.  If a file with the
  97.         name 'file1.ext' already exists in the archive,  LHARC  will
  98.         replace it with the specified file.
  99.  
  100.         Including the extension '.LZH' with the archive name is
  101.         optional and  LHARC  will default to using it unless you
  102.         specify otherwise (see below under "Archive name").
  103.         However, you would certainly need to include the extension
  104.         (or just '.' for a blank extension) with any single-
  105.         character archive name or file name that might look like
  106.         one of  LHARC 's commands.
  107.  
  108.  
  109.  
  110.    u (Update files to archive)
  111.  
  112.       LHARC u ARCHIVE.LZH file1.ext
  113.  
  114.         Adds 'file1.ext' to 'ARCHIVE.LZH', the same as with the 'a'
  115.         command.  However, if 'file1.ext' already exists in the
  116.         archive,  LHARC  will check its time stamp and will keep the
  117.         newer one and ignore the older one.  (Use the /c switch to
  118.         tell  LHARC  to skip this time-stamp comparison.)
  119.  
  120.  
  121.    m (Move new files into archive)
  122.  
  123.       LHARC m ARCHIVE.LZH file1.ext
  124.  
  125.         is equivalent to
  126.  
  127.       LHARC u ARCHIVE.LZH file1.ext
  128.      DEL file1.ext
  129.  
  130.         Beware the fact that the second line is implicit.  You might
  131.         lose 'file1.ext' forever.
  132.  
  133.    f (Freshen files in archive)
  134.  
  135.       LHARC f ARCHIVE.LZH file1.ext
  136.  
  137.         Replaces 'file1.ext' in 'ARCHIVE.LZH' with the newer one
  138.         only if a file with this name already exists in the archive.
  139.         Otherwise, no action is taken.  (Use the /c switch to tell
  140.          LHARC  to skip this time-stamp comparison.)
  141.  
  142.  
  143.  
  144.  LHARC  User's Manual                                               page 4
  145.  
  146.  
  147.  
  148.    e or x (EXtract files from archive)
  149.  
  150.       LHARC e ARCHIVE.LZH d:\temp\
  151.  
  152.         Extracts all the files from 'ARCHIVE.LZH
  153.         directory \temp\ on drive D:.  If the specified directory
  154.         does not exist, then  LHARC  will prompt you whether to create
  155.         it with the message "Make directory? [Y/N]".  If no home
  156.         directory name is specified,  LHARC  will extract all files to
  157.         the current directory.
  158.  
  159.       LHARC e ARCHIVE.LZH file1.ext
  160.  
  161.         Extracts only 'file1.ext' from 'ARCHIVE.LZH'.  If a file
  162.         with the name 'file1.ext' exists in the home directory,
  163.          LHARC  will compare their time stamps and if the existing
  164.         file is older, then  LHARC  will prompt you whether to
  165.         overwrite it.  (Use the /c switch to tell  LHARC  to skip this
  166.         time-stamp comparison.)
  167.  
  168.       LHARC e ARCHIVE.LZS file.ext
  169.  
  170.         Extracts 'file.ext' from an .LZS file archived with Larc
  171.         3.xx.
  172.  
  173.         Note:  Larc is another popular archiver on Japanese PDS's.
  174.  
  175.  
  176.    p (disPlay files in archive)
  177.  
  178.       LHARC p ARCHIVE.LZH file1.ext
  179.  
  180.         Extracts 'file1.ext' from 'ARCHIVE.LZH' and redirects it to
  181.         standard output.
  182.  
  183.       LHARC p /v ARCHIVE.LZH file1.ext
  184.  
  185.         Uses the default utility LESS to format and display the
  186.         redirected output.   LHARC  creates a temporary file
  187.         '  LHARC.TMP' for viewing.  It will be deleted afterward.
  188.  
  189.       LHARC p /vsee ARCHIVE.LZH file1.ext
  190.  
  191.         Invokes the text formatter SEE, which then displays
  192.         'file1.ext' to standard output in a paged format.  Refer to
  193.         PC-LESS.ARC, LIST64A.ARC and SEE15.ARC.  (These should be
  194.         available in most BBS libraries.)
  195.  
  196.  
  197.    d (Delete files from archive)
  198.  
  199.       LHARC d ARCHIVE.LZH file1.ext
  200.  
  201.         Deletes 'file1.ext' from 'ARCHIVE.LZH'.
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  LHARC  User's Manual                                               page 5
  211.  
  212.  
  213.  
  214.    l (List files in archive)
  215.  
  216.       LHARC l ARCHIVE.LZH
  217.  
  218.         Lists information about all the files in 'ARCHIVE.LZH':
  219.         name, original size, stored size, compression ratio, date
  220.         and time, attributes, compression type (see below under
  221.         "Archive File Header") and CRC check.  Each file takes one
  222.         line of output.  A '+' before a file name indicates that a
  223.         directory name is stored with the file name.  (Use the /x
  224.         switch to tell  LHARC  to also display these directory names.)
  225.  
  226.         If you specify any file names and extensions, then only the
  227.         files with matching names or extensions will be listed:
  228.  
  229.       LHARC l ARCHIVE.LZH *.c *.h readme.doc
  230.  
  231.         Lists information on all the .C, .H and README.DOC files
  232.         in 'ARCHIVE.LZH'.
  233.  
  234.  
  235.    v (View list of files in archive)
  236.  
  237.       LHARC v ARCHIVE.LZH
  238.  
  239.         Which is equivalent to:
  240.  
  241.       LHARC l /x ARCHIVE.LZH
  242.  
  243.         Lists information about all the files in 'ARCHIVE.LZH',
  244.         except that each listing takes two lines: the first for the
  245.         full path name and the second for the rest of the
  246.         information.  The /x switch tells  LHARC  to display file
  247.         names extended with directory names.
  248.  
  249.  
  250.    s (make Self-extracting archive)
  251.  
  252.       LHARC s ARCHIVE.LZH d:\temp\
  253.  
  254.         Creates a "small" self-extracting file 'ARCHIVE.COM' (or
  255.         'ARCHIVE.EXE' if larger than 64K) from 'ARCHIVE.LZH' in the
  256.         directory \temp\ on drive D:.  If no home directory name is
  257.         specified, then  LHARC  will create this file in the current
  258.         directory.
  259.  
  260.         A "small" self-extracting archive (SFX) can be as large as
  261.         DOS' working memory space (640K), but normally no larger
  262.         than about 400K for safety.  A "large" SFX, however, is
  263.         limited only by available disk storage (see below under
  264.         "Self-Extracting Archives").
  265.  
  266.  
  267.  
  268.  LHARC  User's Manual                                               page 6
  269.  
  270.  
  271.  
  272.       LHARC s /x ARCHIVE.LZH
  273.  
  274.         Creates a "large" self-extracting file 'ARCHIVE.EXE' from
  275.         'ARCHIVE.LZH'.  The /x switch tells  LHARC  to use the
  276.         "large" (extended) SFX model. You must first have an .LZH
  277.         file, before you can have a Self-Extracting file.
  278.  
  279.  
  280.    t (Test integrity of archive)
  281.  
  282.       LHARC  t ARCHIVE.LZH
  283.  
  284.         Tests the integrity of 'ARCHIVE.LZH' by running a CRC check
  285.         on each file and comparing the result against the file's
  286.         stored CRC value.
  287.  
  288.  
  289.    (no command specified)
  290.  
  291.       LHARC  ARCHIVE.LZH
  292.  
  293.         Acts exactly the same as the 'l' command.  This optional
  294.         action is temporary.  Don't count on it in future versions.
  295.  
  296.  
  297.  
  298.  LHARC  User's Manual                                               page 7
  299.  
  300.  
  301.  
  302.    Switches:
  303.    =========
  304.  
  305.    Specify switch(es) following the switch delimiter '/' or '-'.  If
  306.    you want to specify more than one switch, type characters
  307.    continuously without any intervening spaces, like "/rx-we:\work" or
  308.    "/cxvless".  When the 'v' and 'w' switches are used with other
  309.    switches, they must be specified at the end of a sequence, as shown
  310.    in the above examples.
  311.  
  312.    You may place a '+' or '-' sign after switches, with the following
  313.    meanings: '+' turns the switch on and '-' turns the switch off.
  314.    The '2' creates a special option for the /r and /v switches (see
  315.    below).  If you just specify /<switch> without '+' or '-', then
  316.    <switch> will be toggled from 'on' to 'off' or vARC versa, e.g., to
  317.    override any switch set in an environment variable (see below).
  318.  
  319.    NOTE:  Use only lowercase letters for switches.  Capital letters
  320.           are reserved for future use.
  321.  
  322.  
  323.      /x[-|+] (allow eXtended file names)
  324.  
  325.         By default,  LHARC  stores only the file names of archived
  326.         files and disregards the names of the directory(s) in which
  327.         they reside.  This switch tells  LHARC  to extend all file
  328.         names with directory names and to extract archived files
  329.         together with their stored directory names.
  330.  
  331.         Example: Suppose you are in the root directory, \ and you
  332.         have two files 'stat.h' and '\tc\include\sys\stat.h':
  333.  
  334.       LHARC  a ARCHIVE.LZH stat.h
  335.  
  336.         Adds only the file 'stat.h' from the current (root)
  337.         directory to 'ARCHIVE.LZH', but
  338.  
  339.       LHARC  a ARCHIVE.LZH stat.h \tc\include\sys\stat.h
  340.  
  341.         Will cause  LHARC  to abort with the message "Same names in
  342.         another path", because directory names are normally
  343.         disregarded when storing file names.  However,
  344.  
  345.       LHARC  a /x ARCHIVE.LZH stat.h \tc\include\sys\stat.h
  346.  
  347.         Adds both files to 'ARCHIVE.LZH'.  Then,
  348.  
  349.       LHARC  e ARCHIVE.LZH stat.h
  350.  
  351.         Extracts both 'stat.h' files to the current directory and
  352.         compares their time stamps and if one is newer, then  LHARC 
  353.         will prompt you with the message "'STAT.H': Already exists.
  354.         Overwrite? [Y/N]".
  355.  
  356.  
  357.  
  358.  LHARC  User's Manual                                               page 8
  359.  
  360.  
  361.  
  362.       LHARC  e /x ARCHIVE.LZH stat.h
  363.  
  364.         Extracts both 'stat.h' files together with their directory names:
  365.         one to the current directory and the other to the directory
  366.         \tc\include\sys\.  If this directory does not exist, then  LHARC 
  367.         will prompt you whether to create it.
  368.  
  369.         You can also use the /r switch to tell  LHARC  to archive all
  370.         files with the same file name by recursively searching
  371.         directories.  Thus,
  372.  
  373.       LHARC  a /r ARCHIVE.LZH stat.h
  374.  
  375.         Adds two 'stat.h' files, with path names, to 'ARCHIVE.LZH':
  376.         one from the root directory and the other from the directory
  377.         \tc\include\sys\.
  378.  
  379.         The /r switch sets the /x switch simultaneously.  If you
  380.         don't want full path names, include /x- after specifying the
  381.         /r switch.
  382.  
  383.       LHARC  s /x ARCHIVE.LZH
  384.  
  385.         Creates the "large" (= extended) self-extracting archive
  386.         'ARCHIVE.EXE' from 'ARCHIVE.LZH' (see below under "Self-
  387.         Extracting ARCHIVEs").
  388.  
  389.  
  390.      /p[-|+] (distinguish full Path names)
  391.  
  392.         By default,  LHARC  disregards directory names when extracting
  393.         files.  This switch tells  LHARC  to distinguish files by full
  394.         path name during un-archiving.
  395.  
  396.         Example: Suppose your archive 'tc.LZH' contains both
  397.         'stat.h' and 'sys\stat.h'.  Then,
  398.  
  399.       LHARC  e tc stat.h
  400.  
  401.         Extracts both 'stat.h' files to the current directory and
  402.         the older one will be overwritten by the newer one, whereas
  403.  
  404.       LHARC  e /p tc stat.h
  405.  
  406.         Extracts only 'stat.h' to the current directory and ignores
  407.         'sys\stat.h', because its path name is not specified.
  408.  
  409.         If you specify full path names without the /p switch,  LHARC 
  410.         will extract only those files from your archive, but
  411.         otherwise it will disregard stored directory names.  (If you
  412.         want to extend file names with directory names, use the /x
  413.         switch.)
  414.  
  415.  
  416.  
  417.  LHARC  User's Manual                                               page 9
  418.  
  419.  
  420.       LHARC  e tc sys\stat.h
  421.  
  422.         Extracts only 'sys\stat.h' to the current directory.
  423.  
  424.  
  425.      /c[-|+] (skip time-stamp Comparison)
  426.  
  427.       LHARC  [e|f|u|x] /c ARCHIVE.LZH [file1.ext file2.ext ...]
  428.  
  429.         If a file with the same name is to be created,  LHARC  will
  430.         default to comparing the time stamp of each pair of files,
  431.         and so some files will be overwritten and some just ignored.
  432.         This switch tells  LHARC  to overwrite any existing files with
  433.         extracted ones with the same name.
  434.  
  435.  
  436.      /m[-|+] (no Message for query)
  437.  
  438.       LHARC  [<command>] /m ARCHIVE.LZH [file1.ext file2.ext ...]
  439.  
  440.         By default, before operations that alter files or
  441.         directories,  LHARC  will query you with messages like
  442.         "Overwrite? [Y/N]".  This switch suppresses these messages
  443.         and tells  LHARC  to proceed as if "y" is typed in.
  444.  
  445.  
  446.      /a[-|+] (allow any Attribute of files)
  447.  
  448.       LHARC  a /a ARCHIVE.LZH file1.arc
  449.  
  450.         adds 'file1.arc' to 'ARCHIVE.LZH'.
  451.  
  452.         By default,  LHARC  will not archive files with the hidden,
  453.         read-only or system attribute.  This switch tells  LHARC 
  454.         also to archive files with these attributes.
  455.  
  456.  
  457.      /r[-|+|2] (Recursively collect files)
  458.  
  459.  
  460.  
  461.  LHARC  User's Manual                                              page 10
  462.  
  463.  
  464.  
  465.       LHARC  has three modes of collecting the files to be archived:
  466.  
  467.         (a) specified file(s):  /r-
  468.  
  469.              LHARC  a /r- ARCHIVE.LZH file1.ext [file2.ext ...]
  470.  
  471.                  Adds to 'ARCHIVE.LZH' only the specified files
  472.                  (default mode).
  473.  
  474.         (b) across directories:  /r or /r+
  475.  
  476.              LHARC  a /r ARCHIVE.LZH *.c
  477.  
  478.                  Adds to 'ARCHIVE.LZH' all the files with
  479.                  extension .C on the current drive, starting
  480.                  from the current directory.   LHARC  will store
  481.                  all file names extended with directory names.
  482.                  Use this switch to archive all versions of a
  483.                  file or all files of a certain type.
  484.  
  485.         (c) specified directory(s):  /r2
  486.  
  487.              LHARC  a /r2 ARCHIVE.LZH \doc
  488.  
  489.                  Adds to 'ARCHIVE.LZH' all the files in the
  490.                  directory specified by the path \doc and its
  491.                  branches, similar to the Unix -r option.  Use
  492.                  this switch to archive complete directories.
  493.  
  494.         The /r and /r2 switches set the /x switch simultaneously.
  495.         You may have to toggle the /x switch off (with /x-) after
  496.         using /r or /r2.  The /x- switch tells  LHARC  to disregard
  497.         stored directory names.
  498.  
  499.  
  500.      /w[-|+|<directory_name>] (set Working directory)
  501.  
  502.       LHARC  a /w[d:\temp] ARCHIVE.LZH [file1.ext file2.ext ...]
  503.  
  504.         Creates all the temporary files for 'ARCHIVE.LZH' in the
  505.         directory \temp\ on drive D:.  If no directory name is
  506.         specified with this switch, then the current directory
  507.         becomes the working directory and all the temporary files
  508.         created in the process of archiving will reside in this
  509.         directory and be deleted afterward.
  510.  
  511.      Use the /w switch when
  512.  
  513.         (1) you have no room in the directory where the archive is,
  514.             or
  515.         (2) you want your work done silently and swiftly on a RAM
  516.             disk.
  517.  
  518.  
  519.  
  520.  LHARC  User's Manual                                              page 11
  521.  
  522.  
  523.  
  524.         This switch overrides the working directory that may be
  525.         specified in an environment variable (see below).
  526.  
  527.  
  528.      /v[-|+|2|<utility_name>] (View file by another utility)
  529.  
  530.       LHARC  p /v ARCHIVE.LZH file1.ext
  531.  
  532.         Extracts 'file1.ext' from 'ARCHIVE.LZH' and invokes the
  533.         default utility LESS for formatted display to standard
  534.         output.
  535.  
  536.         NOTE:  LESS.COM is an utility similar to MORE.COM of
  537.                MS-DOS and something more, but less than the
  538.                "LESS" of American Unix networks.  PC-LESS.ARC,
  539.                LIST64A.ARC or SEE15.ARC (available from many
  540.                BBS sources in the U.S.A.) work as well as the
  541.                Japanese utility.
  542.  
  543.          LHARC  first creates an un-archived file '  LHARC.TMP' and then
  544.         invokes the specified utility, usually a page formatter like
  545.         LIST.EXE or SEE.EXE.  Temporary files will normally be
  546.         deleted after you have viewed their output.
  547.  
  548.       LHARC  p /v2 /vbrowse ARCHIVE.LZH file1.ext
  549.  
  550.         Invokes BROWSE.COM for paged display of 'file1.ext' to
  551.         standard output, but suppresses the output of file names or
  552.         path names.  This special '2' option is provided for viewing
  553.         binary files with a dump utility.
  554.  
  555.      /n[-|+] (No Indicator)
  556.  
  557.         Suppress progress display oooo... in the process of
  558.         archiving and de-archiving.  The display is on the standard
  559.         error stream so that the dsiplay is on even in the process
  560.         of redirection.
  561.  
  562.  
  563.     /k<keyword> (Keyword for AUTOLARC.BAT)
  564.  
  565.         When used together with the /x switch to make a "large"
  566.         self-extracting archive (SFX), this switch tells  LHARC  to
  567.         embed the specified keyword into the .EXE file and then to
  568.         turn on the AUTOLARC.BAT auto-execution feature.  That is,
  569.         if the SFX contains a file named 'AUTOLARC.BAT' (which can
  570.         consist of any sequence of batch commands), this file will
  571.         be executed immediately after all the files are extracted,
  572.         but only if the correct keyword is supplied along with the
  573.         SFX name.
  574.  
  575.  
  576.  
  577.  LHARC  User's Manual                                              page 12
  578.  
  579.  
  580.  
  581.       LHARC  s /x /kon ARCHIVE.LZH
  582.  
  583.         Creates the "large" SFX 'ARCHIVE.EXE' from 'ARCHIVE.LZH'
  584.         and turns on auto-execution of AUTOLARC.BAT, conditional
  585.         upon typing the keyword "on".  Then,
  586.  
  587.      C:\>ARCHIVE
  588.  
  589.         Executes 'ARCHIVE.EXE' and extracts all the files, but does
  590.         not auto-execute AUTOLARC.BAT, whereas
  591.  
  592.      C:>ARCHIVE on
  593.  
  594.         Extracts all the files and immediately executes AUTOLARC.BAT.
  595.  
  596.         Note:  Because DOS ignores case on the command line,
  597.                this keyword cannot be made case sensitive.
  598.  
  599.  
  600.      /t[-|+] (Time Stamp)
  601.  
  602.         Update the time stamps of Archive to the newest file in the
  603.         archive, effective with switches (a,u,m,f,d).
  604.  
  605.       LHARC  a /t ARCHIVE.LZH file1.ext
  606.  
  607.         Will set the time stamp of ARCHIVE.LZH to that of file1.ext
  608.         if it has the newest time stamp in ARCHIVE.LZH, otherwise
  609.         ARCHIVE.LZH has the time stamp of command-line execution
  610.         above.
  611.  
  612.  
  613.  
  614.  LHARC  User's Manual                                              page 13
  615.  
  616.  
  617.  
  618.    Archive name (path name):
  619.    =========================
  620.  
  621.    All the files archived by  LHARC  have the same format as those
  622.    archived by Larc, except that Larc uses the extension '.LZS'.  If you
  623.    specify a different extension,  LHARC  will prompt you whether to use
  624.    it with the message "Extension of archive is not '.LZH.' Continue
  625.    processing? [Y/N]".
  626.  
  627.    Wildcards are valid in specified file names with the 'e', 'x', 'p',
  628.    'l', 'v' and 's' commands:
  629.  
  630.       LHARC  e *.LZH *.c
  631.  
  632.         Extracts all files with extension .C from all archives in
  633.         the current directory.
  634.  
  635.  
  636.    Home directory name (drive name):
  637.    =================================
  638.  
  639.    If you specify a home directory name, then  LHARC  will refer to that
  640.    directory as if it is the current directory.  Specify a home
  641.    directory name ending with either '\' or ':'.  All files will be
  642.    archived without storing this directory name unless you also use the
  643.    /r or /x switch.
  644.  
  645.    Example:  Suppose you have the following directory tree:
  646.  
  647.                          |-- BIN --
  648.                          |
  649.         |-- \ --|-- TC --|-- LIB --
  650.                          |
  651.                          |-- INCLUDE --|-- SYS --|-- STAT.H
  652.  
  653.    From the root directory, \,
  654.  
  655.     LHARC  a /r ARCHIVE.LZH stat.h tc\include\
  656.  
  657.         adds '\tc\include\sys\stat.h' to 'ARCHIVE.LZH' with the path
  658.         name 'sys\stat.h' from your home directory \tc\include\.
  659.  
  660.  
  661.    File name (path name):
  662.    ======================
  663.  
  664.    The file names or path names of files to be archived must be
  665.    specified or else  LHARC  will assume *.* with no directory names.
  666.    The wildcards '*' and '?' behave exactly as in DOS.  You cannot use
  667.    them to specify directories except with the /r2 switch, similar to
  668.    the Unix -r option for cp, mv and rm.
  669.  
  670.  
  671.  
  672.  LHARC  User's Manual                                              page 14
  673.  
  674.  
  675.  
  676.    Switch delimiter:
  677.    =================
  678.  
  679.    If you are currently using some other character, like '-', in place
  680.    of the forward slant '/' as a switch delimiter (from the undocu-
  681.    mented DOS Function 37H, Set/Query Switchar), then you have to use
  682.    your character in place of '/', like "-cx".  This makes '/' available
  683.    as a directory delimiter instead of '\', as in Unix convention.  (You
  684.    can use '-' as a switch delimiter with  LHARC  anyway.)
  685.  
  686.    The above comment may not apply unless you are running MS-DOS 3.xx.
  687.  
  688.  
  689. 2. Setting Switches in an Environment Variable
  690.  
  691.    You may set any of  LHARC 's default switches with the environment
  692.    variable '  LHARC':
  693.  
  694.      SET   LHARC=/we: /r2
  695.  
  696.         will set drive E: as the working directory and archive all
  697.         files in directory mode.
  698.  
  699.    You may also specify  LHARC 's working directory with the environment
  700.    variable 'TMP':
  701.  
  702.      SET TMP=E:
  703.  
  704.         but the /w switch will override this setting.
  705.  
  706.  
  707.  
  708.  LHARC  User's Manual                                              page 15
  709.  
  710.  
  711.  
  712. 3. Self-Extracting Files
  713.  
  714.     LHARC  can create a self-extracting archive (SFX), which makes file
  715.    transfers very easy because the recipient does not need to have
  716.     LHARC  itself to extract the contents.
  717.  
  718.    There are two models of SFX: "small" and "large." A "small" SFX is
  719.    designed to fit in working memory, but a "large" SFX depends only on
  720.    available disk storage.  When run, each model will sign on with a
  721.    corresponding screen message: " LHARC  SFX 1.14ß ".
  722.  
  723.    On execution, either model SFX looks first for an archived file with
  724.    the name '!' and displays it to the screen followed by the simple
  725.    message "[Y/N]", which is prompting you whether or not to extract the
  726.    rest of the files.  This option, called a telop, is provided for your
  727.    convenience; it might be used for an announcement, an invitation, a
  728.    cover letter for E-mail, a shipping label, an ANSI graphics screen,
  729.    or whatever you please.  Thus, the telop will politely reassure the
  730.    recipient of your SFX as to sender, contents and intentions.  To
  731.    make a telop, simply create a suitable ASCII file with your favorite
  732.    text editor and then rename it to '!' before archiving.
  733.  
  734.    If you create a file with the name 'AUTOLARC.BAT' (which can consist
  735.    of any sequence of batch commands) and include in a "large" SFX, you
  736.    can optionally embed a keyword that will activate auto-execution of
  737.    this batch file immediately after all the files are extracted.
  738.    Otherwise, any AUTOLARC.BAT file will simply be harmlessly extracted
  739.    along with the rest of the files.
  740.  
  741.    It is, of course, possible to smuggle destructive "jokes" or so-
  742.    called viruses into this AUTOLARC.BAT file (a "Trojan horse"). So, to
  743.    guard against such unscrupulous use of this powerful feature of
  744.     LHARC , I have provided a measure of security with the telop and the
  745.    keyword.
  746.  
  747.    The attribute byte of all the extracted files will normally be 20h.
  748.    If you specify /x switch in Large SFX files, then you may restore any
  749.    attributes.  This feature is only for Large model.  A typical command
  750.    line looks like:
  751.  
  752.      ARCHIVE [/kword] [/edirectory_name][/x][/a].
  753.  
  754.    Note:  In MS-DOS2.xx a program has no way to know its filename
  755.           or pathname for its own.  So move the self-extracting
  756.           .EXE file on the very directory where is is going to be
  757.           de-archived.  Then execute.
  758.  
  759.  
  760.  
  761.  LHARC  User's Manual                                              page 16
  762.  
  763.  
  764.  
  765.    "Small" model:
  766.    ==============
  767.  
  768.    A "small" SFX must fit within the size of your available memory, so
  769.    theoretically it can be as large as DOS' 640K workspace.  In
  770.    practARC, however, it should not be much larger than 400K, especially
  771.    when you distribute your program, it is not YOU who extract the file.
  772.    Think of people who may not have a fully memory populated machine.
  773.  
  774.       LHARC  s ARCHIVE.LZH
  775.  
  776.         Creates 'ARCHIVE.COM' or 'ARCHIVE.EXE', depending on the
  777.         size of your original archive.  Then,
  778.  
  779.      C:\>ARCHIVE
  780.  
  781.         Displays the telop file '!' on the screen and prompts you
  782.         whether to proceed to extract files, with the simple message
  783.         "[Y/N]" (add your own message to the end of the telop to
  784.         take advantage of this prompt).  The telop itself is not
  785.         extracted; to record it to disk, type
  786.  
  787.      C:\>ARCHIVE >!
  788.  
  789.  
  790.  
  791.  LHARC  User's Manual                                              page 17
  792.  
  793.  
  794.  
  795.    "Large" model:
  796.    ==============
  797.  
  798.    A "large" SFX is limited in size only by available disk storage and
  799.    will optionally auto-execute an AUTOLARC.BAT file immediately after
  800.    extracting all the files.
  801.  
  802.       LHARC  s /x /kon ARCHIVE.LZH
  803.  
  804.         Creates 'ARCHIVE.EXE' (the extension is always .EXE in this
  805.         case) and turns on auto-execution of AUTOLARC.BAT,
  806.         conditional upon typing the keyword "on".
  807.  
  808.    Auto-execution of AUTOLARC.BAT will take place if and only if you
  809.    supply the keyword (case insensitive) along with the SFX name.  For
  810.    the above example,
  811.  
  812.      C:\>ARCHIVE on
  813.  
  814.        or
  815.  
  816.      C:\>ARCHIVE ON
  817.  
  818.         Extracts all the files and immediately executes AUTOLARC.BAT,
  819.         whereas:
  820.  
  821.      C:\>ARCHIVE
  822.  
  823.         Just extracts all the files after displaying the telop, if
  824.         any.
  825.  
  826.         Note:  If a file with the name 'AUTOLARC.BAT' already
  827.                exists in the current directory, it will auto-
  828.                matically be overwritten.
  829.  
  830.  
  831.  
  832.  LHARC  User's Manual                                              page 18
  833.  
  834.  
  835.  
  836.    Destination directory(s):
  837.    =========================
  838.  
  839.    You can use the /e switch with the SFX name to specify the
  840.    destination directory for all the extracted files, but only for a
  841.    "large" SFX:
  842.  
  843.      C:\>ARCHIVE /ed:\temp
  844.  
  845.         Extracts all the files in 'ARCHIVE.EXE' to the directory \
  846.         temp\ on drive D:.
  847.  
  848.    In addition, if any directory names are stored with the file names
  849.    in the original archive, you can use the /x switch to extract files
  850.    with full path names:
  851.  
  852.      C:\>ARCHIVE /ed: /x
  853.  
  854.         Extracts all the files to drive D: and extends file names
  855.         with directory names.  If any of these directories does not
  856.         exist, then it will be automatically created.  Any
  857.         AUTOLARC.BAT file, however, is always extracted to the
  858.         current directory, whether you use the /x switch or not.
  859.  
  860.  
  861.  
  862.    View Self-extracting files.
  863.    ===========================
  864.  
  865.    From version 1.12b on, you may handle self-extracting .COM or .EXE
  866.    files as .LZH files with commands e, x, p, t, l, v, s.  Please use
  867.    full filename with extension .com or .exe.  Like:
  868.  
  869.       LHARC  l ARCHIVE.exe
  870.  
  871.    To take a list of files inside a self-extracting ARCHIVE.exe file.
  872.    Be ALERT to the danger of overwriting or creating a new file with
  873.    the 's' switch.  Try to keep a backup when viewing.
  874.  
  875.  
  876.  
  877.  
  878.  LHARC  User's Manual                                              page 19
  879.  
  880.  
  881.  
  882. 4. Archive File Header
  883.  
  884.     LHARC 's header is compatible with that of Larc.  Methods of
  885.    archiving are two:
  886.  
  887.      -lh0-   stored as it was and
  888.      -lh1-   compressed by LHARCuf coding.
  889.  
  890.     LHARC  can also extract files stored in Larc-created archives (with
  891.    the extension .LZS) if they are type 4 or 5.
  892.  
  893.    NOTE:  Larc is another Japanese archiver, with source code
  894.           published in a journal.  It is now also available in the
  895.           United States.  Larc, also, has a SFX self-extractor.
  896.           The structure of self-extracting large SFX file looks
  897.           like:  (SFX + "key word") archived + header + archived
  898.           file.
  899.  
  900.  
  901. 5. Result Codes
  902.  
  903.     LHARC  returns the following result codes to the parent process:
  904.  
  905.         0   Normally finished.
  906.  
  907.         1   Process finished with nonexistent file names ignored
  908.             during archiving or CRC error occurred during
  909.             un-archiving.
  910.  
  911.         2   Process terminated by fatal error; no archive created
  912.             or files moved.
  913.  
  914.         3   Unable to write temporary files into the archive.  Work
  915.             file renamed to '  LHARC.)2(' and original archive
  916.             deleted.  Try renaming   LHARC.)2( as your archive,
  917.             although it might be damaged.
  918.  
  919.  
  920. 6. Temporary Files
  921.  
  922.           LHARC.)1(   Original archive, renamed.
  923.           LHARC.)2(   Work file used to create new archive.
  924.           LHARC.TMP   Work file created for viewing by another utility.
  925.  
  926.    If a file with one of these file names already exists in the working
  927.    directory, then the behavior of  LHARC  is unpredictable.
  928.  
  929.  
  930.  
  931.  LHARC  User's Manual                                              page 20
  932.  
  933.  
  934.  
  935. 7. My Distribution Policy
  936.  
  937.    Under the following conditions, you may freely copy and distribute
  938.    this software:
  939.  
  940.    1. Under all circumstances, "Copyright by Haruyasu Yoshizaki"
  941.       must be attached to the copy.
  942.  
  943.    2. This manual or its hardcopy should go together with the
  944.       software.
  945.  
  946.    3. You may modify the program, but in that case, you must distri-
  947.       bute the complete source code for the program, including your
  948.       specific contributions and you must make it clear that you
  949.       have made such modifications.
  950.  
  951.    4. You must try to distribute the latest version available.
  952.  
  953.    5. I assume no warranty for any claim of damage you may sustain
  954.       by using this software.
  955.  
  956.    6. I have no obligation to revise the program to correct any
  957.       fault in this software.
  958.  
  959.    7. For any commercial use of this software, I add the following:
  960.  
  961.       a. The entire software made incorporating this program should
  962.          not be copy protected in the sense that the DISKCOPY
  963.          program of MS-DOS makes an imperfect copy.
  964.  
  965.       b. Every part of the package should print the name " LHARC " and
  966.          the copyright banner.
  967.  
  968.       c. The distribution policy of this software should be printed
  969.          either in the manual, in the package or on the disk label.
  970.  
  971.          Comment:  If a commercial package or a shareware
  972.                    product uses  LHARC  with self-extracting SFX
  973.                    form for the distribution, then the Copy-
  974.                    right statement must appear with SFX header.
  975.                    I consider this as a claim of  LHARC 's Banner.
  976.  
  977.  
  978.  
  979.  LHARC  User's Manual                                              page 21
  980.  
  981.  
  982.  
  983. 8. Acknowledgments
  984.  
  985.    Special gratitude to Haruhiko Okumura, who uploaded the code for
  986.    LZari to PC-VAN on which my LHARCuf coding is based; and to Kazuhiko
  987.    Miki, the author of Larc I, who re-posted LZari on Nifty Serve.  To
  988.    all who contributed reviews, comments and bug reports, I express my
  989.    thanks.
  990.  
  991.    Thanks also to Prof. Kenjirou Okubo who has spent much of his own
  992.    time in reviewing the English manual and resources in distributing
  993.     LHARC  into the United States.
  994.  
  995.    The .EXE file for  LHARC  is nearly 2K smaller owing to use of
  996.    pcs27162 by S. Takanami.  I honor this utility and thank him for
  997.    letting me use it to prepare  LHARC .
  998.  
  999.    I have made so many revisions to  LHARC , yet I do not think I can
  1000.    ever expel all the bugs dwelling inside.  I would appreciate any
  1001.    comments and bug reports.  Please route them to me via the SDR
  1002.    Forum on Nifty Serve or salon.pds of ASCII Net.  In the United
  1003.    States, CompuServe subscribers can contact me through Kenjirou
  1004.    Okubo 74100,2565 or on GEnie via 'K.OKUBO'.
  1005.  
  1006.  
  1007. 9. References
  1008.  
  1009.    1) Labo, A.P., A Hard Disk Cookbook:  Shouei Press (1987).
  1010.  
  1011.    2) Kurita, T., Huffman coding, bit:  Jewelry Box of Computing 43,
  1012.       vol. 20, no. 7, pp. 100-101 (1988).
  1013.  
  1014.    3) Miki, K., Documentation for Larc:  LARC.MAN.
  1015.  
  1016.  
  1017.  
  1018.  LHARC  User's Manual                                              page 22
  1019.  
  1020.  
  1021.  
  1022. 10. History of Revisions
  1023.  
  1024. v1.14b
  1025.     1. Modified the '.' and the 'o' , to '░' and '█' for the graph
  1026.        when (Un)LHARC'ing. This was done because someone patched my
  1027.        v1.13 to do this and then called it ICE, preventing (s)he was
  1028.        me!
  1029.  
  1030.  
  1031. v1.13c
  1032.     1. Following Mr.Okumura's sugestion, a check is now made for
  1033.        the size of extractable files being added.
  1034.     2. Check size of the specified directory for extraction.
  1035.     3. In using temporary files,  LHARC  checks the size of available
  1036.        area and in case of shortage, restore in old archives.
  1037.  
  1038. v1.13b
  1039.     1. /t switch to update even if no transaction is made.
  1040.     2.  LHARC  accepts self-extracting .COM &.EXE files like .LZH
  1041.        files in e, x, p, t, l and s commands.
  1042.     3. Bugs in B: D: drive specification removed.
  1043.  
  1044. v1.13a
  1045.     1. New /t switch added
  1046.     2. Display redirected to standard error stream.
  1047.     3. Bugs fixed in large SFX model.
  1048.     4. /a switch in large SFX model.
  1049.     5. Some trial t let a program know its path_name and own name.
  1050.     6. Some mixed dislay when a file_name contains '$'.
  1051.     7. User's Manual rewritten to reflect changes since v1.00.
  1052.  
  1053. v1.12b
  1054.     1. Fixed bug in auto-execution of AUTOLARC.BAT after self-
  1055.        extraction.
  1056.  
  1057. v1.12
  1058.     1. Added 't' command.
  1059.     2. Changed screen display to show new commands and switches.
  1060.     3. Fixed bug in CRC error check with archived file of zero
  1061.        length.
  1062.     4. Revisions to self-extracting archives:
  1063.        - "large" and "small" SFXs
  1064.        - telop file '!'
  1065.        - /k switch for security against Trojan horses
  1066.  
  1067. v1.01
  1068.     1. Minor touchups to help screen and program messages.
  1069.     2. User's Manual rewritten for clarity and intelligibility.
  1070.  
  1071. v1.00
  1072.     1. Mode without work file added.
  1073.     2. /r switch forces /x switch on simultaneously.
  1074.  
  1075. v0.07c
  1076.     1. Removed bug in detecting memory shortage.
  1077.     2. Compacted self-extraction program.
  1078.  
  1079. v0.07a
  1080.     1. Vers. 0.05-0.07 break down heap areas.  Corrected.
  1081.     2. Now accepts any directory name with any attributes.
  1082.  
  1083.  
  1084.  
  1085.  LHARC  User's Manual                                              page 23
  1086.  
  1087.  
  1088.  
  1089. v0.07
  1090.     1. Prohibited actions to a write-protected archive.
  1091.     2. 'm' command now removes files made by older versions.
  1092.     3. Error-handling routine revised in dealing with wildcards for
  1093.        archive names.
  1094.     4. No command specified is now interpreted as 'l' command
  1095.        specified.
  1096.     5. Error level 1 returned when CRC checking detects an error
  1097.        during un-archiving.
  1098.     6. Program now halts when self-extraction process meets an
  1099.        error.
  1100.     7. Bug fixed in CRC checking when a directory name is met in
  1101.        the un-archiving process.
  1102.  
  1103. v0.06b
  1104.     1. Removed possibility of a damaged cluster appearing in failing
  1105.        to re-create (= freshen) an archived file.
  1106.     2. Removed '+' bug in redirecting output with 'p' command.
  1107.  
  1108. v0.06
  1109.     1. If a file transaction fails with 'u', 'm' or 'f' command,
  1110.         LHARC  will leave the archive as it was.
  1111.     2. File attributes were sometimes misunderstood by 'f' command.
  1112.        This possibility eliminated.
  1113.  
  1114. v0.05
  1115.  
  1116.     1. CRC checks extended to self-extracting archives.
  1117.     2. Completely recursive modes made possible for 'a,u,m' commands.
  1118.     3. Meets requirements of APPEND.EXE of MS-DOS version 3.3.
  1119.     4. '\' no longer needed at end of working directory name with /w
  1120.        switch.
  1121.  
  1122. v0.04
  1123.     1. Support for environment variable 'TMP'.
  1124.  
  1125.     2. " LHARC  p /v a.ARC a_file" used to delete 'a_file' in case of
  1126.        an error.  Bug fixed.
  1127.     3. Added check for a file with the same name in making a self-
  1128.        extracting archive.
  1129.     4. In a self-extracting archive, if a file with the same name
  1130.        of larger size existed, then  LHARC  kept the difference when
  1131.        it was overwritten by one of smaller size.  This bug removed.
  1132.  
  1133. v0.03
  1134.     1. Environment variable '  LHARC' sets some of the switches.
  1135.     2. Made it possible to specify '+', '-' with switches.
  1136.     3. /v switch included.
  1137.     4. Wildcards can now be used for archive names with 'e,x,p,l,v,s'
  1138.        commands.
  1139.     5. Home directory names had some interactions with Kanji-code.
  1140.        Fixed.
  1141.     6. Fixed header-file bugs of self-extracting .EXE files.
  1142.  
  1143.  
  1144.  
  1145.  LHARC  User's Manual                                              page 24
  1146.  
  1147.  
  1148.  
  1149. v0.02
  1150.     1. Support for 'm' command.
  1151.     2. Larc 3.xx compatibility.  Type 4, 5 .LZS files are un-
  1152.        archived.
  1153.     3. Accommodation to systems with different switch characters.
  1154.     4. Minor bugs fixed with 'e' command.
  1155.     5. Revised format for 'l' command.
  1156.  
  1157. v0.01
  1158.     1. Support for self-extracting archives.
  1159.     2. 'p' command added.
  1160.     3. /c switch applies to more combinations of commands and
  1161.        switches.
  1162.     4. Error handling revised.
  1163.     5. Bug fixed in 'l' command.
  1164.     6. New algorithm introduced in sorting path names.
  1165.  
  1166.  
  1167.  
  1168. 11. Comments
  1169.  
  1170.  a. Some other algorithms I have in mind.
  1171.  
  1172.     With some specific files, the compression ratios are not as good as
  1173.     with PKware's PKZIP.  For such files, I may use LZSS compression
  1174.     with correlated arithmetic compression.  This is an effective
  1175.     method and my experiments show that the ratios are no less than
  1176.     PKware's.  Yet it takes too much time in both the archiving and
  1177.     un-archiving processes, with much higher memory consumption.
  1178.     Consequently, I intend to keep working on the algorithm.
  1179.  
  1180.     Naturally, I am ready to receive any comments and I continue to
  1181.     experiment.
  1182.  
  1183.  
  1184.  b. Naming of  LHARC 
  1185.  
  1186.         I have named the New program LHARC, because it goes along better
  1187.         with the wording within the program such as FREEZING,FROZEN,
  1188.         MELTING,MELTED alot better than .LZH was.
  1189.  
  1190.         Plus when an .LZH file is listed in a directory, you can 
  1191.         more easily figure out which program will unARC it.
  1192.  
  1193.  
  1194.                                 -=≡ end ≡=-
  1195.