15 Apr 1998 (updated 5 Sept 2002)

This contains an error-ridden description of UNZIPAPI.DLL.
I've found that in some places where a "stem" variable is
claimed to be needed, you have to use a string instead.
And unziptovar chokes when a file name contains a &.

By the way, the sites for the INFO-Zip project (from
whence this hailed) are:
  http://www.cdrom.com/pub/infozip/     (functioning as of 11 March 2000)
  ftp://ftp.uu.net/pub/archiving/zip/ (this may no longer work)

Hint: You might want to consider using the rxGzLIB
      procedures (http://www.srehttp.org/apps/rxgzlib)
      instead.

-------------------------------------------------------

ZDropFuncs
  Use this function to drop all the loaded UnZip functions.
  Once this function is processed by a REXX program, the 
  UnZip functions are not accessible in any OS/2 sessions.  
  
UZLOADFUNCS  
   call UZLoadFuncs

               Use this function to make all of the UnZip functions
               in this package available to all OS/2 sessions.
          Example:	call RxFuncAdd 'UZLoadFuncs', 'UNZIPAPI', 'UZLoadFuncs' 
  
UZFILETREE   
   rc = UZFileTree(zipfile, stem, [include], [exclude], [options])  

        zipfile	- Name of ZIP file to search 
        stem	- Name of the stem variable for results 
                  Note: stem.0 contains the number of files found.
        include - Optional stem variable specifying a list of files (including 
                  wildcards) to include.  stem.0 must indicate number of items. 
                  exclude - Optional stem variable specifying a list of files 
                  (including  wildcards) to exclude.  
                  stem.0 must indicate number of items.
               NOTE: If lists are not needed, filespec strings may be passed.
        options - One of the following:
                   'O' - Give file names only.  This is the default. 
                   'F' - Give file statistics in the form: 
                              "Length Date Time Name 
                   'Z' - Also give ZIP statistics in the form: 
                            "Length Method Size Ratio Date Time CRC-32 Name

     Finds all files in the specified ZIP with the specified
        filespec and places their descriptions in a stem variable.  
        rc:	Return codes 
                0	Successful 
                2	Error.  Not enough memory.  
        Examples: 
                /*Return a list of all .NDX files in pcboard.qwk*/
                 rc = UZFileTree('pcboard.qwk', 'stem.', '*.ndx')
                /* Return a list of all files except *.NDX and *.DAT */
                exc.0 = 2; exc.1 = '*.ndx'; exc.2 = '*.dat' 
                rc = UZFileTree('pcboard.qwk', 'stem.',,'exc.')  
  
UZUNZIP
       rc = UZUnZip('parameters', [stem])  

                parameters	- The entire list of parameters you would use from 
                                  the command-line 
                stem		- The name of an optional stem variable where any 
                                  output should be redirected. 
                          NOTE: If a stem is not specified, all output will 
                                go to the console.
 Provide a direct entry point to the command line interface.  
    rc:	UnZip return code  
    Examples:	/* Test the archive 'unzip51s.zip' and return output in stem.*/
                rc = UZUnZip('-t unzip51s.zip','stem.')
               /* Extract the archive, display output on screen */
               call UZUnZip 'doom.zip' 
                        /* Extract all .NDX files from the archive  */
                        call UZUnZip 'pcboard.qwk *.ndx','stem.'  
  
UZUNZIPTOVAR 

     rc = UZUnZipToVar('zipfile', 'filename', [stem])  
                zipfile	 - Name of ZIP file to search 
                filename - Name of file to extract from zipfile 
                stem	 - Optional stem variable to extract the file to. 
                           If you specify a stem variable, the file will be 
                           extracted to the variable, one line per index, 
                           stem.0 containing a line count.  
                           In this case, 0 will be returned in rc.
                           If NO stem variable is specified, the entire file   
                           will be extracted to rc.
	       Unzip one file to a variable.  
	rc:	If no stem variable is specified, rc contains the contents of 
		the extracted file if successful or an error-code if not. 
		If a stem variable IS specified, rc contains 0 if successful. 
  
UZUNZIPTOSTEM

  rc = UZUnZipToStem(zipfile, stem, [include], [exclude], [mode]) 

	zipfile  - Name of ZIP file to search
	stem	- Stem variable used to store the extracted files 
	include - Optional stem variable specifying a list of files (including 
		  wildcards) to include.  stem.0 must indicate number of items. 
	exclude - Optional stem variable specifying a list of files (including 
		  wildcards) to exclude.  stem.0 must indicate number of items. 
	    NOTE: If lists are not needed, filespec strings may be passed. 
	mode	- Optional mode parameter specifies either 'F'lat (the default) 
		  or 'T'ree mode. 
		-- In flat mode, each file is stored in stem.fullname i.e. 
		   stem.os2/dll/unzipapi.c.  A list of files is created in 
		   stem.<index> 
		-- In tree mode, slashes are converted to periods in the 
		   pathname thus the above file would have been stored in 
		   stem.OS2.DLL.unzipapi.c and an index stored for each 
		   directory, i.e. stem.OS2.DLL.<index> = \"unzipapi.c\", 
		   stem.OS2.<index> = \"DLL/\", stem.<index> = \"OS2/\"",
	       "Unzip files to a stem variable.  
	Example:	Assuming a file unzip.zip containing: 
			  unzip.c, unshrink.c, extract.c, 
			  os2/makefile.os2, os2/os2.c 
			  os2/dll/dll.def, os2/dll/unzipapi.c  
		rc = UZUnZipToStem('unzip.zip', 'stem.') 
		Returns:	stem.0 = 7 
				stem.1 = unzip.c 
				stem.2 = unshrink.c 
				stem.3 = extract.c 
				stem.4 = os2/makefile.os2 
				stem.5 = os2/os2.c 
				stem.6 = os2/dll/dll.def 
				stem.7 = os2/dll/unzipapi.c 
			And the following contain the contents of the 
			various files: 
				stem.unzip.c 
				stem.unshrink.c 
				stem.extract.c 
				stem.os2/makefile.os2 
				stem.os2/os2.c 
				stem.os2/dll/dll.def 
				stem.os2/dll/unzipapi.c  
		rc = UZUnZipToStem('unzip.zip', 'stem.',,,'TREE') 
		Returns:	stem.0 = 4 
			stem.1 = unzip.c 
			stem.2 = unshrink.c 
			stem.3 = extract.c 
			stem.4 = OS2/ 
			stem.OS2.0 = 3 
			stem.OS2.1 = makefile.os2 
			stem.OS2.2 = os2.c 
			stem.OS2.3 = DLL/ 
			stem.OS2.DLL.0 = 2 
			stem.OS2.DLL.1 = def 
			stem.OS2.DLL.2 = unzipapi.c 

		And the following contain the contents of the 
		various programs: 
			stem.unzip.c 
			stem.unshrink.c 
			stem.extract.c 
			stem.OS2.makefile.os2 
			stem.OS2.os2.c 
			stem.OS2.DLL.dll.def 
			stem.OS2.DLL.unzipapi.c  },

UZVer  
    rc = UZVer([option])  
        rc	String containing UnZip version info in the form 'x.xx'
        	If option is 'L' then info is in the form 'x.xx of <date>
    Returns the version number of UnZip  

UZAPIVER  
      rc = UZAPIVer([option])  
        rcString containing API version info in the form 'x.xx' 
                If option is 'L' then info is in the form 'x.xx of <date>
        Returns the version number of the API  


REXX functions:
  UZDropFuncs     -- Makes all functions in this package unknown to REXX 
  UZLoadFuncs     -- Makes all functions in this package known to REXX 
  UZFileTree      -- Searches for files matching a given filespec 
  UZUnZip	  -- UnZip command-line entry point 
  UZUnZipToVar    -- Unzip one file to a variable 
  UZUnZipToStem   -- Unzip files to a variable array 
  UZVer           -- Returns the UnZip version number 
  UZAPIVer        -- Returns the API version number 



