home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume30 / parsearg / patch13 < prev    next >
Encoding:
Text File  |  1992-06-20  |  22.2 KB  |  591 lines

  1. Newsgroups: comp.sources.misc
  2. From: brad@hcx1.ssd.csd.harris.com (Brad Appleton)
  3. Subject: v30i073: parseargs - functions to parse command line arguments, Patch13
  4. Message-ID: <1992Jun20.173033.3494@sparky.imd.sterling.com>
  5. X-Md4-Signature: 631def542edb6c63a2858c5734dfccae
  6. Date: Sat, 20 Jun 1992 17:30:33 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: brad@hcx1.ssd.csd.harris.com (Brad Appleton)
  10. Posting-number: Volume 30, Issue 73
  11. Archive-name: parseargs/patch13
  12. Environment: UNIX, VMS, MS-DOS, OS/2, Amiga
  13. Patch-To: parseargs: Volume 29, Issue 115-125
  14.  
  15. This is patchlevel thirteen of parseargs. It finishes up the job of
  16. adding Tcl to the list of shells supported by parseargs(1).
  17.  
  18. To apply this patch:
  19.  
  20. 1) cd to your parseargs source directory
  21. 2) unshar this file to create the file PATCH13
  22. 3) type "patch -p0 < PATCH13
  23.  
  24. ______________________ "And miles to go before I sleep." ______________________
  25.  Brad Appleton                         Harris Corp., Computer Systems Division
  26.    Senior Software Engineer            2101 West Cypress Creek Road,  M/S 161 
  27.      brad@ssd.csd.harris.com           Fort Lauderdale, FL  33309-1892  USA
  28.        ...!uunet!travis!brad                 Phone: (305) 973-5190
  29. ~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~
  30.  
  31. #! /bin/sh
  32. # This is a shell archive.  Remove anything before this line, then unpack
  33. # it by saving it into a file and typing "sh file".  To overwrite existing
  34. # files, type "sh file -c".  You can also feed this as standard input via
  35. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  36. # will see the following message at the end:
  37. #        "End of shell archive."
  38. # Contents:  PATCH13
  39. # Wrapped by brad@hcx1 on Mon Jun 15 09:53:39 1992
  40. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  41. if test -f 'PATCH13' -a "${1}" != "-c" ; then 
  42.   echo shar: Will not clobber existing file \"'PATCH13'\"
  43. else
  44. echo shar: Extracting \"'PATCH13'\" \(20036 characters\)
  45. sed "s/^X//" >'PATCH13' <<'END_OF_FILE'
  46. X*** patchlevel.h.parseargs_patch12    Sat May 30 18:10:20 1992
  47. X--- patchlevel.h    Sat May 30 17:46:52 1992
  48. X***************
  49. X*** 3,8 ****
  50. X--- 3,13 ----
  51. X  **
  52. X  ** ^HISTORY:
  53. X  **
  54. X+ **    05/30/92    Brad Appleton    <brad@ssd.csd.harris.com>
  55. X+ **    Patch13
  56. X+ **    - Finishing touches to get parseargs working successfully with
  57. X+ **      the tcl shell (parseargs.tcl works now).
  58. X+ **
  59. X  **    05/18/92    Brad Appleton    <brad@ssd.csd.harris.com>
  60. X  **    Patch12
  61. X  **    - Fixes to the Makefile and for tcl.
  62. X***************
  63. X*** 161,167 ****
  64. X  
  65. X  #define  VERSION     2
  66. X  #define  REVISION    0
  67. X! #define  PATCHLEVEL  12
  68. X  
  69. X  #ifdef __STDC__
  70. X     static const char
  71. X--- 166,172 ----
  72. X  
  73. X  #define  VERSION     2
  74. X  #define  REVISION    0
  75. X! #define  PATCHLEVEL  13
  76. X  
  77. X  #ifdef __STDC__
  78. X     static const char
  79. X***************
  80. X*** 168,171 ****
  81. X  #else
  82. X     static char
  83. X  #endif
  84. X!    _Ident[] = "@(#)parseargs  2.0  patchlevel 12";
  85. X--- 173,176 ----
  86. X  #else
  87. X     static char
  88. X  #endif
  89. X!    _Ident[] = "@(#)parseargs  2.0  patchlevel 13";
  90. X*** Makefile.parseargs_patch12    Sat May 30 18:10:17 1992
  91. X--- Makefile    Sat May 30 17:46:42 1992
  92. X***************
  93. X*** 23,28 ****
  94. X--- 23,29 ----
  95. X  LIBDIR = ${LOCAL}/lib
  96. X  INCDIR = ${LOCAL}/include
  97. X  PERLLIB = ${LIBDIR}/perl
  98. X+ TCLLIB = ${LIBDIR}/tcl
  99. X  
  100. X  ###
  101. X  # compilation options
  102. X***************
  103. X*** 99,106 ****
  104. X          doc/sparseargs3.inc \
  105. X          doc/usage3.inc \
  106. X          doc/vparseargs3.inc
  107. X! SCRIPTS =    test.sh  test.csh  test.ksh  test.rc  test.awk  test.pl
  108. X  PERLSUB =    ${NAME}.pl
  109. X  XXFILES =    Intro  README  MANIFEST  Makefile  VMSbuild.com
  110. X  
  111. X  HDRS =    ${NAME}.h \
  112. X--- 100,108 ----
  113. X          doc/sparseargs3.inc \
  114. X          doc/usage3.inc \
  115. X          doc/vparseargs3.inc
  116. X! SCRIPTS =    test.sh  test.csh  test.ksh  test.rc  test.awk  test.pl test.tcl
  117. X  PERLSUB =    ${NAME}.pl
  118. X+ TCLSUB  =    ${NAME}.tcl
  119. X  XXFILES =    Intro  README  MANIFEST  Makefile  VMSbuild.com
  120. X  
  121. X  HDRS =    ${NAME}.h \
  122. X***************
  123. X*** 138,144 ****
  124. X  PROG_OBJS =  ${NAME}.o   unix_man.o
  125. X  TEST_OBJS =  stest.o
  126. X  
  127. X! FILES =    ${XXFILES} ${DOCS} ${HDRS} ${SRCS} ${PERLSUB} ${SCRIPTS}
  128. X  
  129. X  ###
  130. X  # target dependencies
  131. X--- 140,146 ----
  132. X  PROG_OBJS =  ${NAME}.o   unix_man.o
  133. X  TEST_OBJS =  stest.o
  134. X  
  135. X! FILES =    ${XXFILES} ${DOCS} ${HDRS} ${SRCS} ${PERLSUB} ${TCLSUB} ${SCRIPTS}
  136. X  
  137. X  ###
  138. X  # target dependencies
  139. X***************
  140. X*** 184,203 ****
  141. X           ${LIBDIR}/${LIBFILE} \
  142. X           ${LOCAL}/${PROGRAM}
  143. X  
  144. X!  ${INCDIR}/${NAME}.h: ${NAME}.h useful.h
  145. X      ( ${CHDIR} ${INCDIR}; ${DEL} ${NAME}.h useful.h )
  146. X      ${COPY} ${NAME}.h useful.h ${INCDIR}
  147. X  
  148. X!  ${LIBDIR}/${LIBFILE}: ${LIBARGS}
  149. X      ${DEL}   ${LIBDIR}/${LIBFILE}
  150. X      ${COPY} ${LIBARGS}   ${LIBDIR}/${LIBFILE}
  151. X      ${RANLIB}   ${LIBDIR}/${LIBFILE}
  152. X  
  153. X!  ${LOCAL}/${PROGRAM}: ${PROGRAM} ${PERLSUB}
  154. X!     ${DEL} ${LOCAL}/${PROGRAM} ${PERLIB}/${PERLSUB}
  155. X      ${COPY} ${PROGRAM} ${LOCAL}
  156. X      ${STRIP} ${LOCAL}/${PROGRAM}
  157. X!     ${COPY} ${PERLSUB} ${PERLLIB}
  158. X  
  159. X  ###
  160. X  # maintenance dependencies
  161. X--- 186,206 ----
  162. X           ${LIBDIR}/${LIBFILE} \
  163. X           ${LOCAL}/${PROGRAM}
  164. X  
  165. X! ${INCDIR}/${NAME}.h: ${NAME}.h useful.h
  166. X      ( ${CHDIR} ${INCDIR}; ${DEL} ${NAME}.h useful.h )
  167. X      ${COPY} ${NAME}.h useful.h ${INCDIR}
  168. X  
  169. X! ${LIBDIR}/${LIBFILE}: ${LIBARGS}
  170. X      ${DEL}   ${LIBDIR}/${LIBFILE}
  171. X      ${COPY} ${LIBARGS}   ${LIBDIR}/${LIBFILE}
  172. X      ${RANLIB}   ${LIBDIR}/${LIBFILE}
  173. X  
  174. X! ${LOCAL}/${PROGRAM}: ${PROGRAM} ${PERLSUB} ${TCLSUB}
  175. X!     -${DEL} ${LOCAL}/${PROGRAM} ${PERLIB}/${PERLSUB} ${TCLLIB}/${TCLSUB}
  176. X      ${COPY} ${PROGRAM} ${LOCAL}
  177. X      ${STRIP} ${LOCAL}/${PROGRAM}
  178. X!     -${COPY} ${PERLSUB} ${PERLLIB}
  179. X!     -${COPY} ${TCLSUB} ${TCLLIB}
  180. X  
  181. X  ###
  182. X  # maintenance dependencies
  183. X*** test.tcl.parseargs_patch12    Sat May 30 18:10:20 1992
  184. X--- test.tcl    Sat May 30 17:46:55 1992
  185. X***************
  186. X*** 1,7 ****
  187. X! #!/usr/bin/tcl -q
  188. X  
  189. X! source parseargs.tcl
  190. X  
  191. X  set arguments {
  192. X    { '?', ARGHIDDEN, argUsage, NULL,    "Help : print usage and exit" },
  193. X    { 'S', ARGVALOPT, argStr,   string,  "STRing : optional string arg" },
  194. X--- 1,9 ----
  195. X! #!/usr/local/bin/tcl
  196. X  
  197. X! load "parseargs.tcl"
  198. X  
  199. X+ set scriptName "test.tcl"
  200. X+ 
  201. X  set arguments {
  202. X    { '?', ARGHIDDEN, argUsage, NULL,    "Help : print usage and exit" },
  203. X    { 'S', ARGVALOPT, argStr,   string,  "STRing : optional string arg" },
  204. X***************
  205. X*** 20,32 ****
  206. X  set count 1
  207. X  set dirname "."
  208. X  set sepch ","
  209. X! set xflag ""
  210. X! set yflag "TRUE"
  211. X  set files {}
  212. X  set groups {}
  213. X- set name ""
  214. X  set string ""
  215. X- set string_flag ""
  216. X  
  217. X  eval [ parseargs -u -a $arguments $scriptName $argv ]
  218. X  
  219. X--- 22,32 ----
  220. X  set count 1
  221. X  set dirname "."
  222. X  set sepch ","
  223. X! set xflag 0
  224. X! set yflag 1
  225. X  set files {}
  226. X  set groups {}
  227. X  set string ""
  228. X  
  229. X  eval [ parseargs -u -a $arguments $scriptName $argv ]
  230. X  
  231. X***************
  232. X*** 41,47 ****
  233. X  echo "SepChar = $sepch"
  234. X  echo "Name = $name"
  235. X  echo "Files = $files"
  236. X! if {( "$string_flag" != "") } {
  237. X    if {( "$string" == "" )} {
  238. X      set string "!string arg ommitted on cmd-line!"
  239. X    }
  240. X--- 41,47 ----
  241. X  echo "SepChar = $sepch"
  242. X  echo "Name = $name"
  243. X  echo "Files = $files"
  244. X! if {( [info exists string_flag] )} {
  245. X    if {( "$string" == "" )} {
  246. X      set string "!string arg ommitted on cmd-line!"
  247. X    }
  248. X*** doc/parseargs.man1.parseargs_patch12    Sat May 30 18:10:18 1992
  249. X--- doc/parseargs.man1    Sat May 30 17:46:46 1992
  250. X***************
  251. X*** 348,359 ****
  252. X  specified to \fBparseargs\fP.
  253. X  .\"-----------------------------------------------------------
  254. X  .SH FILES
  255. X! .IP "\fI/usr/local/parseargs.pl\fP"
  256. X  This file defines a \fIperl\fP function named \fIparseargs\fP to parse
  257. X  arguments more conveniently for perl-scripts. The function is 
  258. X  both documented and implemented in this file. The user should
  259. X  ``require'' this file in his/her perl-script before invoking the
  260. X  function.
  261. X  .IP "\fI/usr/local/parseargs.awk\fP"
  262. X  This file defines an \fIawk\fP function named \fIparseargs\fP to parse
  263. X  arguments more conveniently for awk-scripts. The function is 
  264. X--- 348,365 ----
  265. X  specified to \fBparseargs\fP.
  266. X  .\"-----------------------------------------------------------
  267. X  .SH FILES
  268. X! .IP "\fI/usr/local/lib/perl/parseargs.pl\fP"
  269. X  This file defines a \fIperl\fP function named \fIparseargs\fP to parse
  270. X  arguments more conveniently for perl-scripts. The function is 
  271. X  both documented and implemented in this file. The user should
  272. X  ``require'' this file in his/her perl-script before invoking the
  273. X  function.
  274. X+ .IP "\fI/usr/local/lib/tcl/parseargs.tcl\fP"
  275. X+ This file defines a \fItcl\fP procedure named \fIparseargs\fP to parse
  276. X+ arguments more conveniently for tcl-scripts. The procedure is 
  277. X+ both documented and implemented in this file. The user should
  278. X+ ``load'' this file in his/her tcl-script before invoking the
  279. X+ procedure.
  280. X  .IP "\fI/usr/local/parseargs.awk\fP"
  281. X  This file defines an \fIawk\fP function named \fIparseargs\fP to parse
  282. X  arguments more conveniently for awk-scripts. The function is 
  283. X*** parseargs.tcl.parseargs_patch12    Sat May 30 18:10:19 1992
  284. X--- parseargs.tcl    Sat May 30 17:46:49 1992
  285. X***************
  286. X*** 13,21 ****
  287. X  # ^PROCEDURE: parseargs - parse command-line argument lists
  288. X  #
  289. X  # ^SYNOPSIS:
  290. X! #    parseargs <options> -- $scriptName arg [arg ...]
  291. X  #
  292. X  #        where <options> is any valid option combination for parseargs(1)
  293. X  #
  294. X  # ^DESCRIPTION:
  295. X  #    Parseargs will invoke parseargs(1) with the options and arguments
  296. X--- 13,22 ----
  297. X  # ^PROCEDURE: parseargs - parse command-line argument lists
  298. X  #
  299. X  # ^SYNOPSIS:
  300. X! #    parseargs <options> -- $scriptName $argv
  301. X  #
  302. X  #        where <options> is any valid option combination for parseargs(1)
  303. X+ #        and $argv is a list.
  304. X  #
  305. X  # ^DESCRIPTION:
  306. X  #    Parseargs will invoke parseargs(1) with the options and arguments
  307. X***************
  308. X*** 22,122 ****
  309. X  #    specified by the caller.
  310. X  #
  311. X  # ^RETURN-VALUE:
  312. X! #    A string of variable settings for the caller to evaluate
  313. X  #
  314. X  # ^EXAMPLE:
  315. X! #     #!/usr/bin/tcl -q
  316. X  #     
  317. X! #     source parseargs.tcl
  318. X  #     
  319. X  #     set arguments {
  320. X! #       { '?', ARGHIDDEN, argUsage, NULL,    "Help : print usage and exit" },
  321. X! #       { 'S', ARGVALOPT, argStr,   string,  "STRing : optional string arg" },
  322. X! #       { 'g', ARGLIST,   argStr,   groups,  "newsGROUPS : groups to test" },
  323. X! #       { 'r', ARGOPT,    argInt,   count,   "REPcount : group repeat count" },
  324. X! #       { 'd', ARGOPT,    argStr,   dirname, "DIRectory : working directory" },
  325. X! #       { 'x', ARGOPT,    argBool,  xflag,   "Xflag : turn on X-mode" },
  326. X! #       { 'y', ARGOPT,    argUBool, yflag,   "Yflag : turn off Y-mode" },
  327. X! #       { 's', ARGOPT,    argChar,  sepch,   "SEPchar : field separator" },
  328. X! #       { 'f', ARGLIST,   argStr,   files,   "files : files to process" },
  329. X! #       { 'n', ARGREQ|ARGPOS, argStr, name,  "name : name to use" },
  330. X! #       { ' ', ARGLIST,   argStr,   argv,    "argv : remaining arguments" },
  331. X! #       ENDOFARGS
  332. X  #     }
  333. X  #     
  334. X  #     set count 1 ;    set dirname "." ;   set sepch "," ;
  335. X! #     set xflag "" ;   set yflag "TRUE" ;
  336. X! #     set files {} ;   set groups {} ;  set name "" ;
  337. X! #     set string "" ;  set string_flag "" ;
  338. X  #     
  339. X! #     eval [ parseargs -u -a $arguments $scriptName $argv ]
  340. X  #
  341. X- #
  342. X- # ^ALGORITHM:
  343. X- #    We need to do an "eval exec parseargs $args" in order have exec
  344. X- #    treat $args as many arguments instead of just one argument. Before
  345. X- #    we can do that however, we must quote each argument in $args and
  346. X- #    escape any special characters that it contains.  Hence we have the
  347. X- #    following algorithm:
  348. X- #
  349. X- #       - quote and escape special character for each arg in $args
  350. X- #       - do an "eval exec $args" and save the results
  351. X- #       - if parseargs(1) exit-status is non-zero than exit (and make
  352. X- #            sure the parseargs message(s) is/are printed).
  353. X- #         else
  354. X- #            return the standard-output of parseargs(1)
  355. X- #         endif
  356. X- #
  357. X- #
  358. X- # ^BUGS:
  359. X- #    Actually - this procedure doesnt work. It has some problems,
  360. X- #    some of which I know about and can describe below:
  361. X- #
  362. X- # 1) TCL refuses to let ME do the error-checking after exec'ing parseargs(1).
  363. X- #    What I need to do is look at the exit-status and exit if it is non-zero.
  364. X- #    If parseargs happens to write anything to stderr (which it always does
  365. X- #    if it prints usage or a syntax error) then TCL automatically terminates
  366. X- #    my procedure (not the process) and doesnt let me check the exit-status.
  367. X- #
  368. X- # 2) Error messages printed by parseargs(1) are prefixed with "Error: "
  369. X- #    and suffixed by some other error-message info added by TCL. I dont
  370. X- #    want ANY of this, just let parseargs(1) print the error text and dont
  371. X- #    embellish it. As a fix, I tried to have parseargs(1) write error messages
  372. X- #    to stdout (for TCL only) and exit with a non-zero status. This didnt
  373. X- #    work at all (and Im not completely sure as to why).
  374. X- #
  375. X- # 3) I ought to be able to use far fewer "regsub" statements below but I
  376. X- #    couldnt seem to get "&" or "\0" to work as documented as substitution
  377. X- #    strings.
  378. X- #
  379. X- # If you happen to get this procedure (along with test.tcl) working, then
  380. X- # please, PLEASE let me know and tell me how you did it!!
  381. X- #
  382. X  ###^^####
  383. X  proc parseargs args {
  384. X!    set escaped_args {}
  385. X!    foreach arg $args {
  386. X!       regsub -all "\\\\" "$arg" "\\\\" arg
  387. X!       regsub -all "\\\$" "$arg" "\\\$" arg
  388. X!       regsub -all "\\\[" "$arg" "\\\[" arg
  389. X!       regsub -all "\]" "$arg" "\\\]" arg
  390. X!       regsub -all "\{" "$arg" "\\\{" arg
  391. X!       regsub -all "\]" "$arg" "\\\]" arg
  392. X!       regsub -all "\"" "$arg" "\\\"" arg
  393. X!       regsub -all "\t" "$arg" "\\t" arg
  394. X!       regsub -all "\n" "$arg" "\\n" arg
  395. X!       regsub -all "\r" "$arg" "\\r" arg
  396. X!       regsub -all "\v" "$arg" "\\v" arg
  397. X!       regsub -all "\f" "$arg" "\\f" arg
  398. X!       regsub -all "\b" "$arg" "\\b" arg
  399. X!       append escaped_args " \"$arg\""
  400. X     }
  401. X-    set  errorCode {}
  402. X-    set  opt_settings [ eval exec parseargs -s tcl $escaped_args ]
  403. X-    if {( $errorCode != {} )} { 
  404. X-       ## echo $opt_settings
  405. X-       exit [lindex $errorCode 2]
  406. X-    }
  407. X-    return  $opt_settings ;
  408. X  }
  409. X  
  410. X--- 23,97 ----
  411. X  #    specified by the caller.
  412. X  #
  413. X  # ^RETURN-VALUE:
  414. X! #    A string of variable settings for the caller to evaluate. 
  415. X! #    If parseargs(1) exits with a non-zero status, then execution
  416. X! #    is terminated.
  417. X  #
  418. X  # ^EXAMPLE:
  419. X! #     #!/usr/local/bin/tcl
  420. X  #     
  421. X! #     load parseargs.tcl
  422. X  #     
  423. X  #     set arguments {
  424. X! #        { '?', ARGHIDDEN, argUsage, NULL,    "Help : print usage and exit" },
  425. X! #        { 'S', ARGVALOPT, argStr,   string,  "STRing : optional string arg" },
  426. X! #        { 'g', ARGLIST,   argStr,   groups,  "newsGROUPS : groups to test" },
  427. X! #        { 'r', ARGOPT,    argInt,   count,   "REPcount : group repeat count" },
  428. X! #        { 'd', ARGOPT,    argStr,   dirname, "DIRectory : working directory" },
  429. X! #        { 'x', ARGOPT,    argBool,  xflag,   "Xflag : turn on X-mode" },
  430. X! #        { 'y', ARGOPT,    argUBool, yflag,   "Yflag : turn off Y-mode" },
  431. X! #        { 's', ARGOPT,    argChar,  sepch,   "SEPchar : field separator" },
  432. X! #        { 'f', ARGLIST,   argStr,   files,   "files : files to process" },
  433. X! #        { 'n', ARGREQ|ARGPOS, argStr, name,  "name : name to use" },
  434. X! #        { ' ', ARGLIST,   argStr,   argv,    "argv : any remaining args" },
  435. X! #        ENDOFARGS
  436. X  #     }
  437. X  #     
  438. X  #     set count 1 ;    set dirname "." ;   set sepch "," ;
  439. X! #     set xflag 0 ;    set yflag 1 ;
  440. X! #     set files {} ;   set groups {} ;
  441. X! #     set string "" ;
  442. X  #     
  443. X! #     eval [ parseargs -decls $arguments $scriptName $argv ]
  444. X  #
  445. X  ###^^####
  446. X  proc parseargs args {
  447. X!       ## set temp-file name
  448. X!    if {( ! [info exists env] )}  { set env(TMP) "/tmp" }
  449. X!    if {( $env(TMP) == "" )}  { set env(TMP) "/tmp" }
  450. X!    set tmpFileName "$env(TMP)/tmp[id process]"
  451. X! 
  452. X!        ## isolate the last argument (a list) from the rest
  453. X!    set last [expr {[llength $args] - 1}]
  454. X!    set cmdArgv [lindex $args $last]
  455. X!    set cmdOpts [lrange $args 0 [expr {$last - 1}]]
  456. X! 
  457. X!       ## fork and exec
  458. X!    if {( [set childPid [fork]] == 0 )} {
  459. X!          ## This is the child ...
  460. X!          ##    redirect stdout to temp-file and exec parseargs(1)
  461. X!          ##
  462. X!       set tmpFile [open $tmpFileName "w"]
  463. X!       close stdout
  464. X!       dup $tmpFile stdout
  465. X!       close $tmpFile
  466. X!       execl parseargs [concat -s tcl $cmdOpts $cmdArgv]
  467. X!    } else {
  468. X!          ## This is the parent ...
  469. X!          ##    wait for the child, check its status, then return its output
  470. X!          ##    dont forget to remove the temp-file.
  471. X!          ##
  472. X!       set childStatus [wait $childPid]
  473. X!       set how [lindex $childStatus 1]
  474. X!       set ret [lindex $childStatus 2]
  475. X!       if {( ($how == "EXIT")  &&  ($ret == 0) )} {
  476. X!          set variableSettings [exec cat $tmpFileName]
  477. X!          unlink -nocomplain $tmpFileName
  478. X!          return $variableSettings
  479. X!       } else {
  480. X!          unlink -nocomplain $tmpFileName
  481. X!          exit [expr {$how == "EXIT" ? $ret : 127}]
  482. X!       }
  483. X     }
  484. X  }
  485. X  
  486. X*** MANIFEST.parseargs_patch12    Sat May 30 18:10:16 1992
  487. X--- MANIFEST    Sat May 30 17:46:39 1992
  488. X***************
  489. X*** 5,11 ****
  490. X   Makefile                   2    makefile for parseargs library
  491. X   README                     1    release information
  492. X   VMSbuild.com               2    VMS makefile for the parseargs library
  493. X!  amiga_args.c               5    parse AmigaDOS command-lines
  494. X   arglist.c                  3    implement the listXxxx functions for arglists
  495. X   argtype.c                  5    implement the argXxxx argument type functions
  496. X   doc                        1    directory containing documentation
  497. X--- 5,11 ----
  498. X   Makefile                   2    makefile for parseargs library
  499. X   README                     1    release information
  500. X   VMSbuild.com               2    VMS makefile for the parseargs library
  501. X!  amiga_args.c               4    parse AmigaDOS command-lines
  502. X   arglist.c                  3    implement the listXxxx functions for arglists
  503. X   argtype.c                  5    implement the argXxxx argument type functions
  504. X   doc                        1    directory containing documentation
  505. X***************
  506. X*** 34,40 ****
  507. X   doc/parsecntl.man3         1    {n,t}roff source for parsecntl(3)
  508. X   doc/parsecntl3.inc         1    describe parsecntl(3)
  509. X   doc/parsecntls.inc         2    describe function-codes for parsecntl(3)
  510. X!  doc/parseflags.inc         3    describe parse flags
  511. X   doc/parsemodes.inc         1    describe modes for parsecntl(3)
  512. X   doc/returns.inc            2    describe function return values
  513. X   doc/sh_arrays.inc          3    describe handling of shell arrays
  514. X--- 34,40 ----
  515. X   doc/parsecntl.man3         1    {n,t}roff source for parsecntl(3)
  516. X   doc/parsecntl3.inc         1    describe parsecntl(3)
  517. X   doc/parsecntls.inc         2    describe function-codes for parsecntl(3)
  518. X!  doc/parseflags.inc         2    describe parse flags
  519. X   doc/parsemodes.inc         1    describe modes for parsecntl(3)
  520. X   doc/returns.inc            2    describe function return values
  521. X   doc/sh_arrays.inc          3    describe handling of shell arrays
  522. X***************
  523. X*** 43,52 ****
  524. X   doc/usage3.inc             1    describe usage(3)
  525. X   doc/vparseargs3.inc        1    describe vparseargs(3)
  526. X   exit_codes.h               1    #defines for arguments to exit(3C)
  527. X!  ibm_args.c                 6    parse MS-DOS and OS/2 command-lines
  528. X   parseargs.awk              3    parseargs for awk
  529. X!  parseargs.c               10    C source for parseargs(1)
  530. X!  parseargs.h                8    include file for parseargs library
  531. X   parseargs.pl               2    parseargs for perl
  532. X   parseargs.tcl              2    parseargs for tcl
  533. X   patchlevel.h               3    list of patches (most recent first)
  534. X--- 43,52 ----
  535. X   doc/usage3.inc             1    describe usage(3)
  536. X   doc/vparseargs3.inc        1    describe vparseargs(3)
  537. X   exit_codes.h               1    #defines for arguments to exit(3C)
  538. X!  ibm_args.c                 5    parse MS-DOS and OS/2 command-lines
  539. X   parseargs.awk              3    parseargs for awk
  540. X!  parseargs.c                9    C source for parseargs(1)
  541. X!  parseargs.h                7    include file for parseargs library
  542. X   parseargs.pl               2    parseargs for perl
  543. X   parseargs.tcl              2    parseargs for tcl
  544. X   patchlevel.h               3    list of patches (most recent first)
  545. X***************
  546. X*** 53,59 ****
  547. X   pgopen.c                   4    pipe output to a pager
  548. X   pgopen.h                   1    include file for pgopen.c
  549. X   stest.c                    4    test program for parseargs(3)
  550. X!  strfuncs.c                 7    string library
  551. X   strfuncs.h                 2    include file for strfuncs.c
  552. X   syserr.c                   3    diagnostic message printing routines
  553. X   test.awk                   3    awk test program for parseargs(1)
  554. X--- 53,59 ----
  555. X   pgopen.c                   4    pipe output to a pager
  556. X   pgopen.h                   1    include file for pgopen.c
  557. X   stest.c                    4    test program for parseargs(3)
  558. X!  strfuncs.c                 6    string library
  559. X   strfuncs.h                 2    include file for strfuncs.c
  560. X   syserr.c                   3    diagnostic message printing routines
  561. X   test.awk                   3    awk test program for parseargs(1)
  562. X***************
  563. X*** 66,73 ****
  564. X   test.zsh                   2    Z shell test program for parseargs(1)
  565. X   unix_args.c                5    parse Unix command-lines
  566. X   unix_man.c                 4    print Unix manual-page templates
  567. X!  useful.h                   4    common include file for the library
  568. X   vms_args.c                 6    parse VAX/VMS DCL command-lines
  569. X   vprintf.c                  3    portable vfprintf, vprintf, and vsprintf
  570. X   winsize.c                  3    determine # rows and # columns of window
  571. X!  xparse.c                   9    implement the parseargs library
  572. X--- 66,73 ----
  573. X   test.zsh                   2    Z shell test program for parseargs(1)
  574. X   unix_args.c                5    parse Unix command-lines
  575. X   unix_man.c                 4    print Unix manual-page templates
  576. X!  useful.h                   3    common include file for the library
  577. X   vms_args.c                 6    parse VAX/VMS DCL command-lines
  578. X   vprintf.c                  3    portable vfprintf, vprintf, and vsprintf
  579. X   winsize.c                  3    determine # rows and # columns of window
  580. X!  xparse.c                   8    implement the parseargs library
  581. END_OF_FILE
  582. if test 20036 -ne `wc -c <'PATCH13'`; then
  583.     echo shar: \"'PATCH13'\" unpacked with wrong size!
  584. fi
  585. # end of 'PATCH13'
  586. fi
  587. echo shar: End of shell archive.
  588. exit 0
  589.  
  590. exit 0 # Just in case...
  591.