home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip52.zip / os2 / rexxhelp.c < prev    next >
C/C++ Source or Header  |  1995-11-25  |  7KB  |  176 lines

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