home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / UNARJ / UNARJ.DOC < prev    next >
Text File  |  1993-12-01  |  10KB  |  266 lines

  1. 
  2.      UNARJ.DOC, UNARJ 2.21                              September 1991
  3.  
  4.  
  5.         UNARJ software and manual copyright (c) 1991 by Robert K Jung.
  6.         All rights reserved.
  7.  
  8.         UNARJ version 2.21 release
  9.  
  10.  
  11.      This documents new or updated information since UNARJ 2.10.
  12.  
  13.  
  14.      ** IMPORTANT NEWS ****************************************************
  15.  
  16.      There is an extended header bug in older versions of ARJ, AV.C and
  17.      UNARJ.C.  The extended header processing in read_header() should skip
  18.      4 bytes for the extended header CRC and not 2 bytes.  This is NOT a
  19.      current problem as no versions of ARJ use the extended header.
  20.  
  21.      The following source line in DECODE.C is AMBIGUOUS and has been
  22.      corrected.
  23.  
  24.         weight[i++] = 1 << (16 - i);
  25.  
  26.      **********************************************************************
  27.  
  28.      Here is the C source code for a simple UNARJ extractor program.  It
  29.      has been portabilized courtesy of Mark Adler for platforms that do not
  30.      support ANSI C.  This UNARJ is NOT meant for use as a production
  31.      quality ARJ extractor.  It is meant for the use of 3rd party
  32.      developers who want to build file readers, etc, for ARJ.  The UNARJ
  33.      source code has been built and tested under Turbo C++ 1.0, Quick C
  34.      2.5, and Coherent 3.2.0.
  35.  
  36.      It has none of the program protection and other fancy features of
  37.      ARJ 2.21.  It is also VERY SLOW compared to ARJ!!!  In ARJ, all of
  38.      the critical routines are written in assembly language.
  39.  
  40.  
  41.      COMMAND SYNTAX:
  42.  
  43.      UNARJ has been modified to support the four commands: "e", "l", "t",
  44.      and "x".  These are equivalent to the ARJ version of these commands.
  45.      However, UNARJ does not create directories when using the "x" command.
  46.  
  47.      Usage:  UNARJ archive[.arj]    (list archive)
  48.              UNARJ e archive        (extract archive)
  49.              UNARJ l archive        (list archive)
  50.              UNARJ t archive        (test archive)
  51.              UNARJ x archive        (extract with pathnames)
  52.  
  53.      UNARJ does not accept any other commands or options.  You cannot
  54.      specify a base directory or select individual files to extract.  UNARJ
  55.      does not support empty directories or volume labels.  UNARJ is much
  56.      slower than ARJ because ARJ is highly optimized using assembly
  57.      language.
  58.  
  59.  
  60.      "e" extract command
  61.  
  62.      This command extracts the contents of the ARJ archive to the current
  63.      directory.  Files in the archive that already exist in the current
  64.      directory will not be extracted.
  65.  
  66.  
  67.      "l" list command
  68.  
  69.      This command lists the contents of the archive to the screen.  The
  70.      UNARJ l command replaces the old AV.EXE program.
  71.  
  72.      The last field on the display TPMGVX stands for:
  73.          T -> text/binary/directory/volume label type
  74.          P -> path information available in "V" listing
  75.          M -> compression method used
  76.          G -> file has been garbled (encrypted)
  77.          V -> archive has been continued to another volume
  78.          X -> this file is an extended portion of a larger file
  79.  
  80.  
  81.      "t" test command
  82.  
  83.      This command tests the contents of the archive by extracting the files
  84.      to the NUL device (no data will be written to disk).  If the contents
  85.      of a file is corrupted, UNARJ will display "CRC error!".  If the
  86.      contents are valid, UNARJ will display "CRC OK".
  87.  
  88.      You can use this command to see if an archive contains pathnames.
  89.  
  90.  
  91.      "x" extract with pathnames command
  92.  
  93.      This command extracts the contents of the ARJ archive to the pathnames
  94.      stored in the archive.  If only filespecs are stored in the archive,
  95.      then the files will be extracted to the current directory.  UNARJ will
  96.      not create missing directories in the pathnames.  You must create them
  97.      manually.  Use the UNARJ t command to see the full pathnames stored in
  98.      the archive.
  99.  
  100.  
  101.      PROGRESS INDICATOR
  102.  
  103.      UNARJ uses a small spinning bar to indicate extraction/testing
  104.      progress.
  105.  
  106.  
  107.      BUILDING THE UNARJ PROGRAM
  108.  
  109.      Source files:  UNARJ.C, DECODE.C, ENVIRON.C, UNARJ.H, UNARJ.DEF,
  110.                     TCCUNARJ.MAK, QCLUNARJ.MAK, OS2UNARJ.MAK.
  111.  
  112.      For Turbo C/C++, type MAKE /ftccunarj.mak
  113.  
  114.      For QuickC,      type NMAKE /F qclunarj.mak
  115.  
  116.      For OS/2,        type NMAKE /F os2unarj.mak
  117.  
  118.      For Coherent,    type
  119.          cc -DUNIX -DCOHERENT -o unarj unarj.c decode.c environ.c
  120.  
  121.      For UNIX         type cc -DUNIX -o unarj unarj.c decode.c environ.c
  122.  
  123.      If you use a compiler other than listed above, the resulting UNARJ.EXE
  124.      will not support restoring file date-time stamps.  You can modify the
  125.      ENVIRON.C file to add these functions for your particular
  126.      implementation environment.
  127.  
  128.      If you send me your implementations, I will try to incorporate them
  129.      into the next version of UNARJ.
  130.  
  131.  
  132.      ACKNOWLEDGEMENTS:
  133.  
  134.      I wish to thank Haruhiko Okumura for providing the ideas for ARJ and
  135.      UNARJ.  His AR001 and AR002 provided the basic compression algorithms
  136.      for ARJ 1.0.  At ARJ 2.0, ARJ uses only the secondary Huffman
  137.      compressor from AR002.
  138.  
  139.      I wish to thank Mark Adler for helping make UNARJ more portable.
  140.  
  141.      I also wish to acknowledge the use of the file date-time stamping
  142.      routines in Rahul Dhesi's ZOO archiver.
  143.  
  144.      And to those who have contributed bug reports and porting
  145.      information, I extend my thanks.
  146.  
  147.  
  148.      UNARJ LICENSE POLICY FOR ALL USERS:
  149.  
  150.      The UNARJ program, source code, and the associated documentation
  151.      are copyright (c) 1990,91 Robert K Jung, all rights reserved.
  152.  
  153.      If you distribute this software to others, you are required to
  154.      distribute the ENTIRE package consisting of the following files:
  155.  
  156.      README.DOC
  157.      UNARJ.EXE
  158.      UNARJ.DOC
  159.      UNARJ.C
  160.      DECODE.C
  161.      ENVIRON.C
  162.      UNARJ.H
  163.      UNARJ.DEF
  164.      TCCUNARJ.MAK
  165.      QCLUNARJ.MAK
  166.      OS2UNARJ.MAK
  167.      TECHNOTE.DOC
  168.  
  169.      I strongly prefer that the files be distributed in the format
  170.      originally released:  UNARJ221.EXE with the ARJ-SECURITY envelope as
  171.      created by the author.  If you must distribute the UNARJ archive in
  172.      another archive format, please archive the UNARJ221.EXE as one file
  173.      inside the other archive.  Re-archival of the software as separate
  174.      files means losing the ARJ security envelope.
  175.  
  176.      You may freely use the UNARJ C source code provided the end product is
  177.      NOT an ARJ archiver (both compress and extract ARJ files).  If you
  178.      wish to distribute a modified version of UNARJ.EXE, you MUST indicate
  179.      that it is a modified version both in the program and source code.
  180.  
  181.      If you create a modified version of UNARJ.EXE, I would appreciate a
  182.      copy of the new source code.  I am holding the copyright on the source
  183.      code, so please do not delete my name from the program files or the
  184.      documentation.
  185.  
  186.      The UNARJ.EXE program is built from this source using Turbo C++ 1.0.
  187.  
  188.      You may freely use, copy, and distribute UNARJ.EXE, provided that no
  189.      fee is charged for such use, copying or distribution.
  190.  
  191.      You may use UNARJ.EXE in a commercial software package provided that
  192.      no additional fee is charged for using UNARJ.EXE and provided that the
  193.      user fully understands that NO warranty or support is provided for
  194.      UNARJ.EXE.  Moreover, the user must fully understand that UNARJ does
  195.      not have the long usage history as ARJ does.
  196.  
  197.      This source code is intended to promote the building of utilities to
  198.      support the use of ARJ and ARJ archives.
  199.  
  200.  
  201.      TECHNICAL SUPPORT:
  202.  
  203.      Please report any bugs.  I will TRY to fix them.  If you have
  204.      portability improvements, I would appreciate receiving a copy of them.
  205.  
  206.      If you find UNARJ of value, a gift of 10 dollars or any amount would be
  207.      greatly appreciated.
  208.  
  209.      I can be reached at:
  210.  
  211.      Robert Jung at The Black Depths BBS  (508) 427-5379
  212.  
  213.      Robert Jung at Bay State BBS         (617) 598-6646
  214.  
  215.      Robert Jung at FIDONET address:  1:16/390.7
  216.  
  217.      Robert Jung in the ARJ (RIME/RELAYNET), COMPRESS (ILINK), LHARC /
  218.      COMPRESSIONS (SMARTNET), or ARCHIVERS (RIME/RELAYNET) echo
  219.      conferences.
  220.  
  221.      2606 Village Road West
  222.      Norwood, Massachusetts 02062
  223.      USA
  224.  
  225.      Internet address:  robjung@world.std.com  (Checked daily)
  226.  
  227.      Compuserve users can enter   >INTERNET: robjung@world.std.com
  228.      at the "Send to" prompt.  I prefer CompuServe users to send mail
  229.      to this address as opposed to my CompuServe userid below.
  230.  
  231.      CompuServe userid: 72077,445  (Checked infrequently)
  232.  
  233.  
  234.      DISCLAIMER:
  235.  
  236.      This software UNARJ is provided on an "as is" basis without warranty
  237.      of any kind, expressed or implied, including but not limited to the
  238.      implied warranties of merchantability and fitness for a particular
  239.      purpose.  The person using the software bears all risk as to the
  240.      quality and performance of the software. Should the software prove
  241.      defective, the user assumes the entire cost of all necessary repair,
  242.      servicing, or correction.  The author will not be liable for any
  243.      special, incidental, consequential, indirect or similar damages due to
  244.      loss of data or any other reason, even if the author or an agent of
  245.      the author has been advised of the possibility of such damages.
  246.  
  247.  
  248.      HISTORY:
  249.  
  250.      UNARJ 2.21 - Changed uint ratio() to static uint ratio().
  251.                   Added #ifdef VMS to unarj.c.
  252.                   Tested unarj on COHERENT (UNIX clone).
  253.                   Fixed use of _chmod to handle directories.
  254.                   Modified unarj.c to support the MAC THINK_C compiler.
  255.                   Added #include <stdlib.h> to vanilla section of environ.c.
  256.                   Added file date-time stamping to UNIX section of environ.c.
  257.  
  258.      UNARJ 2.20 - Changed arguments in get_mode_str() and set_ftime_mode() to
  259.                   at least int size.
  260.  
  261.                   Added default_case_path() for convenience in UNIX.
  262.  
  263.                   Added two missing %c from printf statement in list_arc().
  264.  
  265.    end document
  266.