1/*
2  Copyright (c) 1990-2001 Info-ZIP.  All rights reserved.
3
4  See the accompanying file LICENSE, version 2000-Apr-09 or later
5  (the contents of which are also included in unzip.h) for terms of use.
6  If, for some reason, all these files are missing, the Info-ZIP license
7  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
8*/
9/* rexxhelp.c */
10
11#if defined(API_DOC) && defined(OS2DLL)
12
13#define UNZIP_INTERNAL
14#include "../unzip.h"
15#include "../unzvers.h"
16
17APIDocStruct REXXDetails[] = {
18  { "UZDROPFUNCS"  , "UZDropFuncs"  ,
19               "call UZDropFuncs",
20               "Use this function to drop all the loaded UnZip functions.\n"
21"\t\tOnce this function is processed by a REXX program, the\n"
22"\t\tUnZip functions are not accessible in any OS/2 sessions.\n" },
23
24  { "UZLOADFUNCS"  , "UZLoadFuncs"  ,
25               "call UZLoadFuncs",
26               "Use this function to make all of the UnZip functions\n"
27"		in this package available to all OS/2 sessions.\n\n"
28"  Example:	call RxFuncAdd 'UZLoadFuncs', 'UNZIPAPI', 'UZLoadFuncs'\n"
29"		call UZLoadFuncs\n" },
30
31  { "UZFILETREE"   , "UZFileTree"   ,
32               "rc = UZFileTree(zipfile, stem, [include], [exclude], [options])\n\n"
33"	zipfile	- Name of ZIP file to search\n"
34"	stem	- Name of the stem variable for results\n"
35"		  Note: stem.0 contains the number of files found.\n"
36"	include - Optional stem variable specifying a list of files (including\n"
37"		  wildcards) to include.  stem.0 must indicate number of items.\n"
38"	exclude - Optional stem variable specifying a list of files (including\n"
39"		  wildcards) to exclude.  stem.0 must indicate number of items.\n"
40"	    NOTE: If lists are not needed, filespec strings may be passed.\n"
41"	options - One of the following:\n"
42"		  'O' - Give file names only.  This is the default.\n"
43"		  'F' - Give file statistics in the form:\n"
44"			Length Date Time Name\n"
45"		  'Z' - Also give ZIP statistics in the form:\n"
46"			Length Method Size Ratio Date Time CRC-32 Name",
47               "Finds all files in the specified ZIP with the specified\n"
48"		filespec and places their descriptions in a stem variable.\n\n"
49"	rc:	Return codes\n"
50"		0	Successful\n"
51"		2	Error.  Not enough memory.\n\n"
52"	Examples:\n"
53"		/* Return a list of all .NDX files in pcboard.qwk */\n"
54"		rc = UZFileTree('pcboard.qwk', 'stem.', '*.ndx')\n\n"
55"		/* Return a list of all files except *.NDX and *.DAT */\n"
56"		exc.0 = 2; exc.1 = '*.ndx'; exc.2 = '*.dat'\n"
57"		rc = UZFileTree('pcboard.qwk', 'stem.',,'exc.')\n" },
58
59  { "UZUNZIP"      , "UZUnZip"      ,
60               "rc = UZUnZip('parameters', [stem])\n\n"
61"	parameters	- The entire list of parameters you would use from\n"
62"			  the command-line\n"
63"	stem		- The name of an optional stem variable where any\n"
64"			  output should be redirected.\n"
65"			  NOTE: If a stem is not specified, all output will\n"
66"				go to the console.",
67               "Provide a direct entry point to the command line interface.\n\n"
68"	rc:	UnZip return code\n\n"
69"  Examples:	/* Test the archive 'unzip51s.zip' and return output in stem.*/\n"
70"		rc = UZUnZip('-t unzip51s.zip','stem.')\n"
71"		/* Extract the archive, display output on screen */\n"
72"		call UZUnZip 'doom.zip'\n"
73"		/* Extract all .NDX files from the archive */\n"
74"		call UZUnZip 'pcboard.qwk *.ndx','stem.'\n" },
75
76  { "UZUNZIPTOVAR" , "UZUnZipToVar" ,
77               "rc = UZUnZipToVar('zipfile', 'filename', [stem])\n\n"
78"	zipfile	 - Name of ZIP file to search\n"
79"	filename - Name of file to extract from zipfile\n"
80"	stem	 - Optional stem variable to extract the file to.\n"
81"		   If you specify a stem variable, the file will be extracted\n"
82"		   to the variable, one line per index, stem.0 containing a\n"
83"		   line count.  In this case, 0 will be returned in rc.\n"
84"		   If NO stem variable is specified, the entire file will be\n"
85"		   extracted to rc.",
86               "Unzip one file to a variable.\n\n"
87"	rc:	If no stem variable is specified, rc contains the contents of\n"
88"		the extracted file if successful or an error-code if not.\n"
89"		If a stem variable IS specified, rc contains 0 if successful.\n"},
90
91  /* GRR:  "include" and "exclude" used to be identified as stem variables
92   *       (Daniel H bug report)
93   */
94  { "UZUNZIPTOSTEM", "UZUnZipToStem",
95               "rc = UZUnZipToStem(zipfile, stem, [include], [exclude], [mode])\n"
96"	zipfile	- Name of ZIP file to search\n"
97"	stem	- Stem variable used to store the extracted files\n"
98"	include - Optional string variable specifying a list of files (including\n"
99"		  wildcards) to include.  stem.0 must indicate number of items.\n"
100"	exclude - Optional string variable specifying a list of files (including\n"
101"		  wildcards) to exclude.  stem.0 must indicate number of items.\n"
102"	    NOTE: If lists are not needed, filespec strings may be passed.\n"
103"	mode	- Optional mode parameter specifies either 'F'lat (the default)\n"
104"		  or 'T'ree mode.\n"
105"		-- In flat mode, each file is stored in stem.fullname i.e.\n"
106"		   stem.os2/dll/unzipapi.c.  A list of files is created in\n"
107"		   stem.<index>\n"
108"		-- In tree mode, slashes are converted to periods in the\n"
109"		   pathname thus the above file would have been stored in\n"
110"		   stem.OS2.DLL.unzipapi.c and an index stored for each\n"
111"		   directory, i.e. stem.OS2.DLL.<index> = \"unzipapi.c\",\n"
112"		   stem.OS2.<index> = \"DLL/\", stem.<index> = \"OS2/\"",
113               "Unzip files to a stem variable.\n\n"
114"	Example:	Assuming a file unzip.zip containing:\n"
115"			  unzip.c, unshrink.c, extract.c,\n"
116"			  os2/makefile.os2, os2/os2.c\n"
117"			  os2/dll/dll.def, os2/dll/unzipapi.c\n\n"
118"		rc = UZUnZipToStem('unzip.zip', 'stem.')\n"
119"		Returns:	stem.0 = 7\n"
120"				stem.1 = unzip.c\n"
121"				stem.2 = unshrink.c\n"
122"				stem.3 = extract.c\n"
123"				stem.4 = os2/makefile.os2\n"
124"				stem.5 = os2/os2.c\n"
125"				stem.6 = os2/dll/dll.def\n"
126"				stem.7 = os2/dll/unzipapi.c\n"
127"			And the following contain the contents of the\n"
128"			various files:\n"
129"				stem.unzip.c\n"
130"				stem.unshrink.c\n"
131"				stem.extract.c\n"
132"				stem.os2/makefile.os2\n"
133"				stem.os2/os2.c\n"
134"				stem.os2/dll/dll.def\n"
135"				stem.os2/dll/unzipapi.c\n\n"
136"		rc = UZUnZipToStem('unzip.zip', 'stem.',,,'TREE')\n"
137"		Returns:	stem.0 = 4\n"
138"				stem.1 = unzip.c\n"
139"				stem.2 = unshrink.c\n"
140"				stem.3 = extract.c\n"
141"				stem.4 = OS2/\n"
142"				stem.OS2.0 = 3\n"
143"				stem.OS2.1 = makefile.os2\n"
144"				stem.OS2.2 = os2.c\n"
145"				stem.OS2.3 = DLL/\n"
146"				stem.OS2.DLL.0 = 2\n"
147"				stem.OS2.DLL.1 = def\n"
148"				stem.OS2.DLL.2 = unzipapi.c\n"
149"\n"
150"			And the following contain the contents of the\n"
151"			various programs:\n"
152"				stem.unzip.c\n"
153"				stem.unshrink.c\n"
154"				stem.extract.c\n"
155"				stem.OS2.makefile.os2\n"
156"				stem.OS2.os2.c\n"
157"				stem.OS2.DLL.dll.def\n"
158"				stem.OS2.DLL.unzipapi.c\n" },
159
160  { "UZVER"        , "UZVer"        ,
161               "rc = UZVer([option])\n\n"
162"	rc	String containing UnZip version info in the form 'x.xx'\n"
163"		If option is 'L' then info is in the form 'x.xx of <date>",
164               "Returns the version number of UnZip\n" },
165
166  { "UZAPIVER"     , "UZAPIVer"     ,
167               "rc = UZAPIVer([option])\n\n"
168"	rc	String containing API version info in the form 'x.xx'\n"
169"		If option is 'L' then info is in the form 'x.xx of <date>",
170               "Returns the version number of the API\n" },
171  { 0 }
172};
173
174char *REXXBrief = "\
175REXX functions:\n\
176  UZDropFuncs     -- Makes all functions in this package unknown to REXX\n\
177  UZLoadFuncs     -- Makes all functions in this package known to REXX\n\
178  UZFileTree      -- Searches for files matching a given filespec\n\
179  UZUnZip	  -- UnZip command-line entry point\n\
180  UZUnZipToVar    -- Unzip one file to a variable\n\
181  UZUnZipToStem   -- Unzip files to a variable array\n\
182  UZVer           -- Returns the UnZip version number\n\
183  UZAPIVer        -- Returns the API version number\n";
184
185
186#endif /* API_DOC && OS2DLL */
187