
                        O          O     O    OOOOO
                        O          O     O   O     O
                        O          OOOOOOO   OOOOOOO
                        O          O     O   O     O
                        OOOOOOO    O     O   O     O

             A simple but efficient archiver for QDOS computers.
                           Public Domain Software

                        (c) Haruhiko Okumura / Japan
                            - no commercial use -

                          Release: Tue, 03 Mar 1992



   COPYRIGHT AND DISCLAIMER
   ~~~~~~~~~ ~~~ ~~~~~~~~~~
        Under no circumstances is anybody except maybe yourself responsible
        for any direct or indirect damage caused by this software.

        You are allowed to freely use, modify and distribute this software
        if
            - copyright and authorship statements throughout program, sources
              and texts are not removed,
            - this program is not sold or hired, copying fees of course
              excluded, and
            - this lha_readme text is not modified.

        The copyright of the LHA compression archiver belongs to Haruhiko
        Okumura, this port conforms to international copyright law. QDOS
        specific parts of the sources and adaptions are written by Franz
        Herrmann.


   FEATURES
   ~~~~~~~~
        - modern compressing algorithm
            - the most efficient archiver for QDOS computers
            - one of the most efficient archivers at all (!)
        - wildcards
        - restores QDOS file header
            - file access key
            - file type
            - type specific information
        - optionally -lh5- compatible (not yet tested)
        - destination directory for extraction not necessarily DATAD$
        - stores whole sub-directory trees, ideal for backups
        - the most consequent silent option :-)

        
   BRIEF MANUAL   {not complete}
   ~~~~~ ~~~~~~
        LHA is started with

            EX lha;"<command>[<option(s)>] <archive> [<file> ...]

        from the SuperBASIC interpreter or

            lha <command>[<option(s)>] <archive> [<file> ...]

        from a shell, where the 'lha' file is expected to be in the
        default program directory (check with PRINT PROGD$). Add a
        drive/directory to the 'lha' filename in other cases, eg.

            EX flp2_Archivers_lha; ...
               ^^^^^^^^^^^^^^^
        LHA will not change any window attributes if standard output
        was redirected to an existing window via

            EX lha,#1; ...
                  ^^^
        for example. Note that the replacement channel has to be stated
        in front of the command line. Redirection to files or other
        devices with additional >, >> or >>& options (please refer to the
        C68 documentation) is not critical in any respect.

        If lha was started without any command line, the default window
        is opened and a short help printed. To make lha do anything usefull
        it is however necessary to provide a command line.

        There are four commands available, their case doesn't matter:

        A   Add files to an archive. If the archive did not exist already,
            it will be created. LHA archives always have a _hrq as suffix.
            During packing, LHA uses a temporary file 'LHA_tmp' on the same
            drive (but in the same directory) of the archive. It is necessary
            to state files to be added, standard C wildcards are allowed.
            TK2's default device (DATAD$) is fully supported.

            Examples:   EX lha;"a ram2_test flp1_myprog_bas"
                        EX lha;"a duddle *_c *_h makefile"
                        EX lha;"ai test prog_bas"
                        EX lha;"asS test prog_bas"
                        EX lha;"aisS test prog_bas"
                        EX lha;"at test ram1_*"
                        EX lha;"awts test ram1_include_ansi_h"
                        EX lha;"aq test prog_bas"

        X   Examples:   EX lha;"x ram2_test"
                        EX lha;"xdflp2_ ram2_test"
                        EX lha;"xdwin1_C_LHA_ flp1_SOURCES"
                        EX lha;"xi ram2_test"
                        EX lha;"xidram2_ test"
                        EX lha;"xq test"
                        EX lha;"xiqdram2_ test"
                        EX lha;"xwidram2_ test"


   KNOWN PROBLEMS
   ~~~~~~~~~~~~~~
        - Up to release 24/2/92, it is proved that HAR does not run
          at all on the Atari ST/QL emulator.
        - Adding files to an existing archive gives odd results
          in in-compatible mode, filenames get truncated.
        - Sometimes packing fails (usually after the first dot)
          and data is written anywhere to memory, mainly to burried
          windows. (This is possibly fixed.)
        - Although LHA is awfull difficult to use, documention is
          still very poor. :-(

   HELP
   ~~~~
        H a r u h i k o   O k u m u r a   generously put his original
        program in the public domain, wrote an exceptional clean and
        portable code and kindly provided me the sources.

        The principal method used for storing the file headers was proposed
        by  K e e s   v a n   d e r   W a l  in the "Intl.Ql" Fido area.

        The idea of replacing underscores by dots and vice-versa for
        compatibility reasons originates from  A n d r e a s   R u d o l f .

        J a n   B r e d e n b e e k ' s  public domain QED editor has been
        used for editing the sources.

        LHA was adapted and further developed with the public domain C68
        Compilation System, the QDOS port existing thanks to  J e r e m y
        A l l i s o n  and  D a v e   W a l k e r . Version 2.00 used.


   MINIMUM SYSTEM CONFIGURATION
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Disk drives
        Toolkit II
        80K memory, for packing 270K


   FEEDBACK
   ~~~~~~~~
        This program is still under development, all kinds of comments
        are welcome. Please report problems to me, all questions welcome:

        Franz Herrmann, Talstrae 21, W-5460 Ockenfels, Germany
        Email: Franz_Herrmann @ bn.maus.de (Internet)
        Phone: 02644/1855 (weekends only)


   UPDATE HISTORY
   ~~~~~~~~~~~~~~
        (this is for my own use, to keep track of modifications and find bugs)

        02 Dec 1991     basic port
        24 Jan 1992     first really working version
        27 Jan 1992     debugged to pack files of any size
                        temporary file on same drive as archive
                        drive and subdirectories no more stored
                        wildcards for adding files implemented
        30 Jan 1992     default archive suffix (_har)
                        more pretty print file on screen
                        option 'W' for large window
     *  31 Jan 1992     save and restore file headers (bytes 5-15)
                           temporarily no longer -lh5- compatible
                           incompatibility to be fixed with 'I' option
                           replacing files does not work any more
                        new default suffix (_harq)
        02 Feb 1992     wildcard method changed
                           contents of sub-directories is recognized
                        archive suffix definitively fixed to '_hrq'
                        option 'S' to specify sort criteria for packing
        03 Feb 1992     whole directory trees can be packed
                           absolute sub-directory names are stored
                           sub-directories will not be recreated
                           optionally enabled by 'T' modifier
                        trivial screen output improvements
                        serious bug detected, localized and corrected
                        extraction target specified by 'D' option
                        existing files are always overwritten
                        large scale debugging tests failed
        04 Feb 1992     serious bug effectively cured but not corrected
                           packing directory trees works
                        introduction of systematic debugging code
                        other bugs found and corrected
                           extraction filenames got confused
                           no more trailing underscores when adding
                        compile option for B&W display output
                        new usage screen
                        more user friendly error handling
                        extensive successfull tests
                        absolutely future proof quiet option
                        distribution version compiled
        05 Feb 1992     packing found to be still not fully stable
                        default sort criteria changed to uN
                        fast add option 'F' (forcing -lh0-)
        07 Feb 1992     _lzh replaces _lh5 extention
                        underscores-dots conversion in compatible mode
        11 Feb 1992     reading directories is reported
                        default sorting criteria swapped: Nu
                        replacing re-enabled
                        'D' option directory for replacing used as well
                        standard window size amended
                        code size slightly optimised
                        systematic function call debugging code
                        today changes activate addressing bug (*)
        12 Feb 1992     more flexible debugging code
                        HAR does not work anymore without debugging code
                        cut-down version RAH compiled
        19 Feb 1992     the serious bug (*) fixed
                        '/' and '\' added to compatibility character conversion
                        meanwhile compatibilty proved
                        MausTausch_txt added to documentation
                        small bug in archive list removed
        24 Feb 1992     'm' option for MausTausch
                        slash conversion corrected
                        code size optimized
                        more user friendly error messages
        03 Mar 1992     'm' option removed, MausTausch_txt updated
                        level-2 driver's buffer set
        .....................................................................

        11 Dec 1992     Debugged, with new additions by Werner Woehr ( DJ9EZ )

                        New program name is now:  LHA

        1 )             "_hrq" has been removed !
                        Using -lh5- mode, QL file headers are now always
                        included - compatibility to standard LHA is still
                        maintained in any case.
                        LHA is no longer compatible to the previous HAR,
                        but much more flexible and handy. Please don't
                        throw away HAR - to be still able to decode older
                        _hrq files - but please make LHA or ZIP to your
                        QL standard packers now.

                        New commands:

        2 )             'r' Replace - now works.

        3 )             'k' remove files,  - added.

                        New options:

        4 )             'o' option
                        Older -lh1- is now added for encode and decode. In this
                        mode no QL file header is copied. This mode is just
                        installed for convenience and flexiblity, but is slower
                        than -lh5- and packing is less efficient ..

        5 )             'u' do not substitute underscores - added.

        6 )             'y' replace modified files without prompting.
                            - Prompting is added as default .

        7 )             'n' replace only files with newer date/time. This
                            mode is default in quiet mode.

        8 )              SFX ( SelF eXpanding ) prefixes of alien files will
                         get skipped and the real archive is handled as usual.

        9 )              Archive file naming is now more flexible. File names
                         without "_lzh" suffixes will get unpacked without
                         need to rename them.

       10 )              Date/Time insertion is now included. The last modifi-
                         cation file time is converted to MS/DOS time conven-
                         tion and added into every archive header. In reverse,
                         after decoding the unpacked file gets the old modif.
                         time of the original file - works only with level-2
                         drivers.

       11 )              All commands are now working successfully with wild-
                         cards "*" and "?" ..

       20 Mar 1933 ......... WW DJ9EZ ........................................

       12 )              The "t" command now works also with decoding.
                         Subdirectories will get installed and files are
                         decoded to their own subdirs. This feature has
                         been made possible by introducing the backslash "\"
                         into the LHA header file names ( same like MSDOS )
                         to distinquish subdirs.

       13 )              'c' option  - added
                         will prevent to copy the file time of the encoded
                         original file
      ........................................................................
