                          Archive X-Ray Programs

                            Doc Revision 1.02

                              AR 1.10 (ARJ)
                              LR 1.01 (Lharc)
                              ZR 1.26 (ZIP)
                             ZOR 1.00 (ZOO)


           Copyright 1990 - 1992 by Gordon Haff and Bit Masons Consulting.
                             All rights reserved.

          Command:  ZR or AR or LR or ZOR

          Purpose:  Provides a scrollable environment for selecting
                    files contained within a ZIP file and viewing or
                    extracting their contents

          Syntax:   ZR [d:][\path\]filename.ZIP [/n]

          Commands: <Enter> views files
                    <Space> or <e> extracts files
                    <d> deletes files

          Prereqs:  100% IBM Compatible PC running DOS 3.0 or higher

          Archive Name:   XRAY102.ZIP

          Associated Programs:

                    In their default configuration, the programs REQUIRE
                    Vern Buerg's LIST file viewing program (or 4DOS
                    with LIST as the viewer name) and the corresponding
                    archive program (PKUNZIP, LHA, ARJ, or ZOO).  LIST,
                    PKUNZIP, 4DOS, and ARJ are Shareware and and either
                    require separate registration with their authors or
                    request a donation.  See the individual program
                    license agreements for details. AR also requires the
                    included UNARJXR, a slightly modified version of
                    Robert Jung's UNARJ to which he retains full
                    copyright.

                    While these programs can be operated from the DOS
                    command line using the format described above, they
                    are most conveniently called as a user-defined shell
                    command (or SmartViewer in DF 4.0 and later) from
                    within the author's Directory Freedom (DF) program.

          Other:    Your COMSPEC variable must be set.  See Section 2.1.

                                 Ŀ
                           Ŀ                   (tm)
                         ĳ         o    
                              Ŀ   Association of
                                         Shareware
                           ĳ    o        Professionals
                         ĳ        
                                   MEMBER

          X-Ray 1.02                                                  2

                              DISCLAIMER OF WARRANTY

          This program is provided AS IS. Bit Masons Consulting MAKES NO
          WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING WITHOUT
          LIMITATION, ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR
          A PARTICULAR PURPOSE.

          The entire and exclusive liability and remedy for breach of this
          Limited Warranty shall be limited to replacement of defective
          diskette(s) or documentation and shall not include or extend to
          any claim for or right to recover any other damages, including
          but not limited to, loss of profit, data, or use of the
          software, or special, incidental, or consequential damages or
          other similar claims, even if Bit Masons has been specifically
          advised of the possibility of such damages. In no event will the
          publishers' liability for any damages to you or any other person
          ever exceed the lower of suggested list price or actual price
          paid for the license to use the software, regardless of any form
          of the claim.

          BIT MASONS SPECIFICALLY DISCLAIMS ALL OTHER WARRANTIES, EXPRESS
          OR IMPLIED, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTY
          OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.


                                    LICENSE

          The X-Ray archive viewers are distributed as free, copyrighted
          software.  What this means is that you can use these programs
          for as long as you like without cost or obligation.  What you
          cannot do is to sell this software or make a profit off of it
          (except as described below) without the express written
          permission of the author.

          The X-Ray archive viewers are the sole property of Gordon Haff.
          These programs may be freely copied and transferred to
          individual parties.  They may be posted on Bulletin Board
          systems (BBS) for electronic access as long as NO FEE is charged
          for its distribution except for private BBS operations that
          charge a regular user subscription fee.  Computer information
          services such as Compuserve (CIS), Genie, and Byte Information
          Exchange (BIX) are authorized to post this product for
          subscriber access.  The X-Ray archive viewers may be distributed
          on diskette only by 1) disk distributors/vendors who are
          associate members of the Association of Shareware Professionals
          (ASP) or 2) users groups which do not charge more than a nominal
          fee ($5) to cover the costs of distribution.  Any changes to
          these policies must be made in writing by the author.

          X-Ray 1.02                                                  3

          This software is produced by a member of the Association of
          Shareware Professionals (ASP).  The ASP wants to make sure that
          the shareware principle works for you. If you are unable to
          resolve a shareware-related problem with an ASP member by
          contacting the member directly, ASP may be able to help. The ASP
          Ombudsman can help you resolve a dispute or problem with an ASP
          member, but does not provide technical support for members'
          products.  Please write to the ASP Ombudsman at 545 Grover Rd.,
          Muskegon, MI 49442-9427 or send a Compuserve message via
          easyplex to ASP Ombudsman 70007,3536.


                                  TECHNICAL SUPPORT


          Since this program is a freebie, unlike the shareware programs
          for which I request a registration fee, I'm not going to make any
          guarantees here with respect to bug fixes or other technical
          support.  Having said that, I do like my programs to be as
          bug-free as possible, so feel free to report any problems which
          you run across.


               Contact via:

                    Channel 1 BBS            (617) 354-8873
                    Compuserve User ID#      72561,2637  (See Note 1)
                    InterNet/ARPANET         72561.2637@compuserve.com

                    U.S. Mail                3205 Windsor Ridge Dr.
                                             Westboro MA 01581
                    Telephone                (508) 898-3321 (after 6pm
                                                          Eastern time)

          The above are roughly in order of preference (i.e. how quickly
          I'm likely to see your message and be able to respond).  I check
          Channel One almost daily and the other electronic services at
          least weekly in most cases.  In addition, I monitor the Interlink
          and the PCRelay Shareware relays through Channel One.

          Note 1:
          When contacting me via Compuserve, please use the Easyplex mail
          system since I do not regularly monitor any of the IBM SIG
          message bases.

          X-Ray 1.02                                                  4


          1.0     Why and Whence the X-Ray Viewers?
          ----------------------------------------

          The main reason that I originally wrote Z-Ray (as in Zip X-Ray)
          is the following:  I have a shareware file management program
          called Directory Freedom which is small and fast in spite of
          having more wonderful and exciting features than I could
          possibly describe here (Plug #1).  Yet, there was still one
          thing which I continually ended up having to exit DF to do --
          namely, to view the contents of files contained within ZIP
          files.

          This annoyed me.

          I looked high and low for a program which I could call with DF's
          nifty user-defined shell function (Plug #2), but nothing did
          exactly what I needed.  So out came the assembler and, a week or
          so later, out popped ZR.

          As time passed, I also wanted to be able to do the same thing
          with other archive formats I sometimes used -- ARJ and Lharc.
          So, taking Z-Ray as a base, I wrote AR and LR.  These latter two
          programs do work a little differently (inside) from ZR -- see
          the Technical notes -- but these differences should generally be
          invisible to the user.

          So.... armed with these viewers, DF can now perform most of the
          major archiving and de-archiving functions for the major
          formats used on PC's.  (DF 4.0 and later has the capability to
          archive files.)  For the fancy stuff (such as selective archive
          updates), you'll still need a program like ARCMASTER or SHEZ,
          but DF will be able to handle all the everyday stuff.


          X-Ray 1.02                                                  5


          2.0     How does it Work?
          -------------------------

          I'm glad you asked that question.  It works incredibly well.
          Oh.. HOW does it work.  Well, there's nothing to it.

          (Note: The rest of this section just shows ZR.  There are no
          differences at the operational level between ZR and the other
          programs.  Just substitute AR (for ARJ files), LR (for Lharc
          files), or ZOR (for ZOO files) if you are using one of those
          formats.)

          The command line syntax is just:

                ZR [d:][\path\]filename.ZIP [/n]

          So, any of the following are valid:

               ZR TEST.ZIP
               ZR C:\FOO\TEST.ZIP
               ZR E:\FOOBAR.ZIP /n

          You do need to type the extension since ZR will look into any
          file with a ZIP format (including self-extracting files).

          /n (or -n) will sort the list in ascending alphabetical order.

          Assuming the specified file exists and is valid, you'll get a
          window on the screen which looks something like the following.
          The top line in the directory will be highlighted.

   Z-Ray 1.26 Copyright 1990,91 by Gordon Haff and Bit Masons Consulting
Ŀ
                                                                              
  Filename       Before  Method  CR   After    Date    Time    CRC    Attr    
  ------------ -------- -------- --- ------- -------- ------ -------- ----    
  ASCAN.C         11591 Imploded 72%    3278  3-15-90  8:29p C48F03BC ---a    
  ASIZE.C         17195 Imploded 76%    4134  3-15-90 12:31a A68B0C17 ---a    
  BBSWEEP.C        6465 Imploded 69%    2031  1-22-90  1:06a 68E0379C ---a    
  CONVERT.C       37526 Imploded 77%    8446  3-14-90 10:21p 2B42D1B8 ---a    
  HEADER.C        11732 Imploded 72%    3342  3-03-90 10:03p E67A9698 ---a    
  IBMDOS.C         2765 Imploded 71%     812  2-17-90  5:39p 4575BF5C ---a    
  MACROS.C          301   Shrunk 31%     207 11-27-89  7:49p 9D902C85 ---a    
  MAKEFILE         1602 Imploded 74%     412  3-06-90  4:51p 9C92811F ---a    
  REDATE.C        17883 Imploded 79%    3710  1-22-90  1:07a 86A021A8 ---a    
  SELF.C           1654 Imploded 66%     567  1-21-90 10:21p 65F69EE4 ---a    
  TEST.C          10242 Imploded 69%    3142  3-15-90  8:29p B53434B5 ---a    
  UNARC.C         15631 Imploded 74%    4136  3-06-90  7:35p 50C371B8 ---a    
  UNIVERSE.C       7370 Imploded 69%    2256  3-14-90  9:21p 91B1CE5F ---a    
  VERSION.C        1551 Imploded 48%     804  2-16-90 11:27p B7B98077 ---a    
  VIEW.C          23958 Imploded 75%    6006  3-06-90  9:38p 5E983326 ---a    
                                                                              
                                                                              
                                                                              

    15 Files      167466          74%   43283      PKZIP Version: 1.1

          X-Ray 1.02                                                  6

          You can move the highlight bar arround with the <Up Arrow>, <Down
          Arrow>, <PgUp>, <PgDn>, <Home>, and <End Keys>,  These do pretty
          much what you'd expect them to do.

          You can quit by hitting the <Esc> key.

          And now we come to the useful part -- you can view the contents
          of a file by pressing the <Enter> key.

          What the <Enter> key does is pipe the contents of the highlighted
          file to Vernon Buerg's LIST program.  PKUNZIP and LIST MUST BE
          PRESENT IN YOUR PATH OR THIS WON'T WORK!!!  Later on, I explain
          how the default command line can be changed in case you've
          renamed LIST or know some other way to do the same thing.  The
          default exec line is:

               PKUNZIP -c ~ ` | list /s

               where:

                    ~ is the name of the archive being viewed
                    ` is the name of the selected file

               These names are filled in dynamically by ZR.  The command
               lines differ for AR, LR, and ZOR.  See the customization
               section.

          But Wait!  There's more! You can also EXTRACT the highlighted
          file.  Pressing <space> or e will extract the highlighted file
          with the following default command line:

               PKUNZIP ~ `

          As with the viewer, this function requires that PKUNZIP be
          present in your path.  The extraction will take place to the
          current DOS directory.  Finally, pressing d will delete the
          highlighted file.

          About the Totals line:

          The totals line on the bottom gives you some summary information
          about the archive -- total files, uncompressed and compressed
          bytes, compression percentage, and PKZIP version number (in the
          case of ZR).

          The PKZIP version number is the oldest version of PKZIP which
          was used in creating the archive.  USUALLY (as in almost all of
          the time) all files in an archive will have been archived using
          the same version, but this isn't necessarily the case -- files
          can be added to an existing archive and the versions don't
          necessarily have to match.

          X-Ray 1.02                                                  7


          2,1  COMSPEC Variable.
          ----------------------

          In order for any of the X-Ray viewers to work, your COMSPEC
          environment variable must be set.  This variable tells ZR
          {AR,LR,ZOR} the name and the location of the command interpreter to
          use when it shells to the appropriate archive program.  Without
          a COMSPEC variable, ZR will display a file listing, but you will
          be unable to view the contents of files.  AR, LR, and ZOR will not
          even get this far since they depend on the archive program
          itself to generate the file list.

          To set the COMSPEC variable, include a line such as:

               SET COMSPEC=C:\COMMAND.COM

          in your AUTOEXEC.BAT file.  The above example is typical for a
          hard disk system but other COMSPEC lines such as:

               SET COMSPEC=C:\4DOS.COM       and
               SET COMSPEC=\COMMAND.COM

          are also possible.  The former uses J.P. Software's excellent
          4DOS as the shell and the latter uses COMMAND.COM on the current
          logical disk (This would be common for a floppy-only system).

          You can view your environment settings at any time
          by typing SET at the DOS prompt.

          (Actually with recent versions of 4DOS, it probably isn't
          necessary to set a COMSPEC since 4DOS is smart enough to use an
          intelligent default.  Still, it doesn't hurt.  And it MUST be
          set if you use the standard DOS COMMAND.COM shell.)

          X-Ray 1.02                                                  8


          3.0     Customizing ZR, AR, ZOR, and LR.
          ----------------------------------------

          I haven't gone and written a fancy user-friendly configuration
          program for these programs, but you can do some limited
          modification if you have a hex editor of some sort such as
          Norton's DiskEdit or NU.  Debug will also do in a pinch for the
          more adventurous.

          MAKE ALL MODIFICATIONS ON A COPY!  ALSO -- make sure that the
          rev of the program matches this documentation since the offsets
          could change between revisions!

               Colors:
               -------

                    Variable          Offset          Default
                    --------          ------          -------
                    C_NORMAL            0Eh            02h
                    C_INVERSE           0Fh            74h
                    C_INTENSE           10h            03h
                    C_BORDER            11h            4Eh

          C_BORDER is the attribute for the window border, C_INTENSE for
          the heading in the window, C_INVERSE for the bar.  The color
          values are in standard DOS combined foreground/background format.
          See the Appendix for details on the values you can enter.

          The value at offset 11h can be changed from a 0 to a 1 to
          disable the archive file delete function.

               Command Lines:
               -------------

          The default command line for the viewer is:

          ZR:     PKUNZIP -c ~ ` | list /s
          AR:     ARJ p ~ ` | list /s
          LR:     LHA p ~ ` | list /s
          ZOR:    ZOO -p ~ ` | list /s

          and resides from offset 16h through 33h, padded with spaces
          (20h).  (These offsets, like those for the colors, are relative
          to the beginning of the file at 0000h.)  If you modify this
          command line, be careful not to overflow the space allotted to
          it (there's a NULL (00) on the end) or the results will likely
          be very unpleasant.


          X-Ray 1.02                                                  9

          The default command line for the Archive extract is:

          ZR:     PKUNZIP ~ `
          AR:     ARJ e ~ `
          LR:     LHA e ~ `
          ZOO:    ZOO -e ~ `

          and resides from offsets 38h through 55h.

          The default command line for the Archive delete is:

          ZR:     PKUNZIP -d ~ `
          AR:     ARJ d ~ `
          LR:     LHA d ~ `
          ZOO:    ZOO -d ~ `

          and resides from offsets 5Ah through 77h.


          In addition, LR, AR, and ZOR specify a command line which
          extracts the archive file list information to a temporary file.
          The equivalent line does not exist in ZR because ZR does its own
          decoding of the archive.

          The default command line for this is:

          AR:     UNARJXR ~ > xr99tmp
          LR:     LHA ~ > xr99tmp
          ZOR:    ZOO VC ~ > xr99tmp

          and resides from offsets 7Ch through 99h.

          The temporary file name, which must match the name in the
          above command line, resides from 9Bh through A8h.

          X-Ray 1.02                                                 10


          4.0     Configuring DF to use ZR:
          --------------------------------

          This is also very easy.  Just configure SmartViewer lines (using
          DFCONFIG) to read:

               Command line             Extension
               ------------             ---------
               ZR ~                     ZIP
               AR ~                     ARJ
               LR ~                     LZH
               ZOR ~                    ZOO

          When you highlight an archive file with DF and press the <Enter>
          key, you will pop directly into the file listing window of the
          appropriate utility from which you can select files to view.  No
          file names to type!  Isn't that easy?  Of course, you can
          also setup standard user-defined function keys if you wish.)

          5.0     Technical and Acknowledgments.
          --------------------------------------

          ZR does its own decoding of a ZIP archive file by reading in the
          central directory structure.  It will read all versions of PKZIP
          archives up to and including at least version 1.10.

          LR, and ZOR on the other hand, create a temporary file which
          contains the contents of an archive listing generated by the
          archiver itself.  This archive listing is then parsed into the
          appropriate format for the scrollable display.  The programs
          were developed using Lharc (LHA) 2.10, and ZOO 2.1.
          Differences in the archive display format in either program
          could therefore cause difficulties.  AR does something similar
          but because of some problems caused by changing formats, it
          uses a modified version of ARJ's demo viewer to generate the
          listing.

          One of these days, my goal is to write native mode decoders for
          at least ARJ.

          ZR, AR, ZOR, and LR were written using Borland's Turbo Assembler
          2.5 and Turbo Debugger 2.5, American Cybernetic's Multi-Edit
          4.0, and Base Two Development's Spontaneous Assembly assembler
          library 2.0.

          The hardware environment was a homebrew 386 (named Dejah Thoris)
          based on an AMI 20MHz full-size motherboard with a Micropolis
          160MB ESDI disk and Ultrastore 12(F) ESDI controller.  It is a
          dual monitor system with an Orchid Prodesigner 512KB VGA board
          and an IBM MDA board.

          Last, but certainly not least, thanks to my Directory Freedom
          beta crew who have also helped out in debugging ZR as well.


          X-Ray 1.02                                                  11


          6.0     Other Programs from Gordon Haff and Bit Masons Consulting:
          -----------------------------------------------------------------

          Directory Freedom (DF):

              Offers users a fast, compact alternative to DOS Shells which
            provides 1) selective file and directory operations; 2) a
            scrollable environment for examining files and directories; 3)
            user-defined keys which can operate upon highlighted files
            (e.g. by defining an editor).  All this in a program which
            takes less than 25KB since it is written in assembler! Easily
            customized through an external configuration program. A "look-
            and-feel" similar to PC Mag's DR, but does much more.  Now with
            SmartViewers and many more exciting new features.
                         Shareware: $20 Registration
                         Latest version: 4.50 (DF450.ZIP)


          the last word:

            'the last word' is a quotations trivia game in which 1 to 4
            players compete against each other and their own high scores in
            identifying the source of quotations and completing partial
            quotes.  Most answers are entered free-form and are matched
            against a set of acceptable responses with a sophisticated
            pattern-recognition algorithm.  'the last word' runs in text
            mode -- including on mono displays -- and offers a high level
            of user configurability.
                         Shareware: $15 Registration
                         Latest version: 1.00  (LWORD100.ZIP)

          Name Date:

            Renames a file to a template such as the current date.  In
            other words, if the current date were 10-06-90, the file
            'FILENAME.QWK' would be renamed to 901006.QWK.  Version 2.0
            is highly configurable with many command-line options
            including the complete specification of the format template
            to be used for renaming.  This is a handy program for
            archiving message packets from bulletin boards, for example.
                         Free, copyrighted software
                         Latest version: 2.0 (NAMD200.ZIP)

          Convert:

            Unit conversion calculator for Windows 3.0.  Comes with a data
            file containing a large number of common (and not so common)
            conversions in categories such as length, speed, pressure,
            volume, and time.  The data file is a plain ASCII text file so
            the user may add or delete units to best fit his individual
            needs.
                           Free, copyrighted software
                           Latest version: 1.01  (CNVRT101.ZIP)


          X-Ray 1.02                                                  12

          Volume label Edit and Copy:

            Edit, delete, and copy volume labels.  Will use absolute disk 
            read/write operations as required to deal with "non-standard" 
            volume labels such as those with lower case characters.  The 
            Copy function could be used as part of a batch file to backup 
            distribution disks to a different sized floppy.
                           Free, copyrighted software
                           Latest version: 1.10  (VEC110.ZIP)


          MAKETEST:

            Command-line utility to create test files.  Lets you create
            any number of test files with user-specified names and sizes.
            Automatically can add characters to avoid duplicate names.
            This is an easy way to create something like 100 zero-length
            files.  Handy for users or programmers who want to test a
            program's capabilities.
                           Free, copyrighted software with QB source
                           Latest version: 1.0  (MKTST100.ZIP)



          These programs and others (Multi-Edit macros for use with Qmail
          Deluxe, for example) are available on many fine bulletin boards.
          The latest releases are always available on Channel One.   If you
          just have to get a copy of one or more of these programs and
          can't find one, however, I can send them out for a nominal media
          and postage charge.

          X-Ray 1.02                                                  13


          7.0     History:
          ---------------

          ZR:
          ---
          Rev. 1.26      Added delete archive file option
          Rev. 1.25      Changed display routines so directory no longer
                           overlaid over previously viewed file
                         Added bottom totals/version display
          Rev. 1.24      Additional memory management modifications
          Rev. 1.23      Rewrote memory management so that larger (in
                           terms of number of ZIPped files) archives can be
                           handled (archives containing > 256 files at
                           least are OK)
                         /n command-line to optionally sort list is
                           ascending filename order
                         Name changed from ZV (ZipView) to ZR (Z-Ray)
          Rev. 1.22      Corrected error message for when not enough
                         memory to store interpreted file names
          Rev. 1.21      Fixed another big with <End> and <PgDn> keys when
                         directory less than a screenful
          Rev. 1.20      Fixed bug with <End> key when cursor at bottom of
                              directory
                         Added <PgUp> and <PgDn> keys
                         Added Extract Archive function
          Rev. 1.11      Fixed problem when SHARE was installed (Thanks to
                         Dr. Herbert Markley for finding this -- the .ZIP
                         file wasn't closed when the EXEC occurred and
                         PKUNZIP, being the well written program that it
                         is, was rightly refusing to have anything to do
                         with the file as a consequence.)
          Rev. 1.10      Fixed display problem on monochrome systems
                         Fixed problems with ZIP files < 10Kbytes
          Rev. 1.0       Initial Release

          AR:
          ---
          Rev. 1.10      By using a modified version of the UNARJ extract
                         program (called UNARJXR.EXE), AR can now handle a
                         variety of ARJ archives it was choking on (Rev
                         2.30, environment settings, etc.)
          Rev. 1.01      Added delete archive file option
          Rev. 1.0       Initial Release

          LR:
          ---
          Rev. 1.01      Added delete archive file option
          Rev. 1.0       Initial Release

          ZOR:
          ----
          Rev. 1.0       Initial Release



          X-Ray 1.02                                                  13


          8.0     Known Limitations and Peculiarities:
          --------------------------------------------

          (i.e. These are free programs and I got tired of beating out my
          brains over it for the time being.)

          All:
          ----
              o  The piping mechanism to LIST can truncate long files.
                 Unfortunately, there is no warning that such truncation
                 has taken place.

          ZR:
          ---
              o  Truncates the display of files archived with their paths
                 and will not pipe them to the viewer properly if the
                 entire path and filename is greater than 13 characters.

          AR,LR:
          ------
              o  Will not handle paths

              o  Rely on a specific file display format generated by the
                 archiver (not really true any longer with AR)

          ZOR:
          ----
              o  As for AR, LR

              o  Sometimes the file display as piped to LIST comes out
                 double-spaced.  I'm not sure of the reason for this, but
                 it is not a function of ZOR; you will obtain the same result
                 if you pipe an archived file to LIST from the DOS command
                 line.


          X-Ray 1.02                                                  14

                              APPENDIX A

                                COLORS


          The color number stored for use in ZR, AR, LR, and ZOR are
          combined foreground/background attributes of the type used by
          DOS.  This combined attribute value is simply the foreground and
          background numbers, as given below, bit-wise OR'd together.
          That's a fancy way of saying added together for our purposes
          here.  (Remember though that these are hexadecimal numbers.)
          For example, yellow on a blue background is given by 1Eh (0Eh +
          10h).


          Foreground (normal)  Foreground (intense)         Background
          --------------------------------------------------------------
           0  black              8   dark gray               0   black
           1  blue               9   light blue             10h  blue
           2  green             0Ah  light green            20h  green
           3  cyan              0Bh  light cyan             30h  cyan
           4  red               0Ch  light red              40h  red
           5  magenta           0Dh  light mag.             50h  magenta
           6  brown             0Eh  yellow                 60h  brown
           7  gray              0Fh  intense white          70h  gray