home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume17 / parseargs / patch01 / TXTPATCH < prev   
Encoding:
Text File  |  1991-03-18  |  9.4 KB  |  415 lines

  1. No differences encountered
  2. *** parseargs1.txt.OLD    Mon Mar 18 09:24:28 1991
  3. --- parseargs1.txt    Mon Mar 18 09:25:29 1991
  4. ***************
  5. *** 607,615 ****
  6.        If    the environment    variable ``PARSECNTL'' is empty    or
  7.        undefined,    then parsing behavior set by the programmer is
  8.        used.  If the programmer has not explicitly used
  9. !      parsecntl(3) to modify the    parsing    behavior will be
  10. !      ``!Prompt + !Ignore'' for Unix MS-DOS, OS/2, and AmigaDOS
  11. !      systems, and ``Prompt'' for VMS systems.
  12.   
  13.   USAGE MESSAGES
  14.        Through the use of    an environment variable    (or a VMS
  15. --- 607,616 ----
  16.        If    the environment    variable ``PARSECNTL'' is empty    or
  17.        undefined,    then parsing behavior set by the programmer is
  18.        used.  If the programmer has not explicitly used
  19. !      parsecntl(3) to modify the    parsing    behavior, then the
  20. !      default behavior will be ``Flags1st'' for Unix systems,
  21. !      ``!Prompt + !Ignore'' for AmigaDOS    systems, ``CaseIgnore''
  22. !      for MS-DOS    and OS/2 systems, and ``Prompt'' for VMS systems.
  23.   
  24.   USAGE MESSAGES
  25.        Through the use of    an environment variable    (or a VMS
  26. ***************
  27. *** 650,656 ****
  28.        Description
  29.         The command description is printed.
  30.   
  31. -      Terse
  32.   
  33.   
  34.   
  35. --- 651,656 ----
  36. ***************
  37. *** 665,670 ****
  38. --- 665,671 ----
  39.   
  40.   
  41.   
  42. +      Terse
  43.         Terse    mode, just print command-line synopsis.
  44.   
  45.        Verbose
  46. ***************
  47. *** 716,722 ****
  48.               FALSE (an empty string).
  49.   
  50.         -X        A Boolean ``X Rated'' flag.     This is not
  51. -             printed in the usage message.
  52.   
  53.   
  54.   
  55. --- 717,722 ----
  56. ***************
  57. *** 731,736 ****
  58. --- 731,738 ----
  59.   
  60.   
  61.   
  62. +             printed in the usage message.
  63.        The two positional    arguments are both strings, as is the
  64.        final list.  If we    were to    invoke the above script    with the
  65.        following command line:
  66. ***************
  67. *** 781,788 ****
  68.   
  69.        ##    parse command-line and save assignments    in a temporary file ##
  70.        parseargs -s sh -e    ARGUMENTS -u --    "$NAME"    "$@" >/tmp/tmp$$
  71. -      if    [ $? -ne 0 ]
  72. -        then rm -f /tmp/tmp$$; exit 2  ## non-zero status (usage    given)
  73.   
  74.   
  75.   
  76. --- 783,788 ----
  77. ***************
  78. *** 797,802 ****
  79. --- 797,804 ----
  80.   
  81.   
  82.   
  83. +      if    [ $? -ne 0 ]
  84. +        then rm -f /tmp/tmp$$; exit 2  ## non-zero status (usage    given)
  85.        fi
  86.   
  87.        ##    evaluate results from parseargs    and remove temporary file
  88. ***************
  89. *** 846,857 ****
  90.        4      A syntax error was encountered in the    argument
  91.         specification    string that was    specified to parseargs.
  92.   
  93. - FILES
  94. -      /usr/local/parseargs.pl
  95. -       This file defines a perl function named parseargs to
  96.   
  97.   
  98.   
  99.   Page 13
  100.   
  101.   
  102. --- 848,857 ----
  103.        4      A syntax error was encountered in the    argument
  104.         specification    string that was    specified to parseargs.
  105.   
  106.   
  107.   
  108.   
  109.   Page 13
  110.   
  111.   
  112. ***************
  113. *** 863,868 ****
  114. --- 863,871 ----
  115.   
  116.   
  117.   
  118. + FILES
  119. +      /usr/local/parseargs.pl
  120. +       This file defines a perl function named parseargs to
  121.         parse    arguments more conveniently for    perl-scripts. The
  122.         function is both documented and implemented in this
  123.         file.    The user should    ``require'' this file in his/her
  124. ***************
  125. *** 913,923 ****
  126.        Hence multiple ``leading dash'' arguments may specified as
  127.        follows:
  128.   
  129. -       -f-dash_arg1 -f-dash_arg2  ...
  130.   
  131.   
  132.   Page 14
  133.   
  134.   
  135. --- 916,923 ----
  136. ***************
  137. *** 929,934 ****
  138. --- 929,936 ----
  139.   
  140.   
  141.   
  142. +       -f-dash_arg1 -f-dash_arg2  ...
  143.   BUGS
  144.        It    does not make sense to use any arguments of type argTBool
  145.        since parseargs currently has no way of knowing what the
  146. ***************
  147. *** 971,978 ****
  148.   AUTHOR
  149.        Brad Appleton  (brad@ssd.csd.harris.com)
  150.        Harris Computer Systems, Fort Lauderdale, FL USA
  151.   
  152.   
  153.   
  154. --- 973,978 ----
  155. *** parseargs3.txt.OLD    Mon Mar 18 09:24:29 1991
  156. --- parseargs3.txt    Mon Mar 18 09:25:47 1991
  157. ***************
  158. *** 643,656 ****
  159.        If    the environment    variable ``PARSECNTL'' is empty    or unde-
  160.        fined, then parsing behavior set by the programmer    is used.
  161.        If    the programmer has not explicitly used parsecntl(3) to
  162. !      modify the    parsing    behavior will be ``!Prompt + !Ignore''
  163. !      for Unix MS-DOS, OS/2, and    AmigaDOS systems, and ``Prompt''
  164. !      for VMS systems.
  165.   
  166.   USAGE MESSAGES
  167.        Through the use of    an environment variable    (or a VMS sym-
  168.        bol), the user may    control    the syntax and the verbosity of
  169. -      the command-usage messages    that are printed by parseargs.
  170.   
  171.   
  172.   
  173. --- 643,656 ----
  174.        If    the environment    variable ``PARSECNTL'' is empty    or unde-
  175.        fined, then parsing behavior set by the programmer    is used.
  176.        If    the programmer has not explicitly used parsecntl(3) to
  177. !      modify the    parsing    behavior, then the default behavior will
  178. !      be    ``Flags1st'' for Unix systems, ``!Prompt + !Ignore'' for
  179. !      AmigaDOS systems, ``CaseIgnore'' for MS-DOS and OS/2 sys-
  180. !      tems, and ``Prompt'' for VMS systems.
  181.   
  182.   USAGE MESSAGES
  183.        Through the use of    an environment variable    (or a VMS sym-
  184.        bol), the user may    control    the syntax and the verbosity of
  185.   
  186.   
  187.   
  188. ***************
  189. *** 665,670 ****
  190. --- 665,671 ----
  191.   
  192.   
  193.   
  194. +      the command-usage messages    that are printed by parseargs.
  195.        The desired level of verbosity may    be set by defining the
  196.        environment variable ``USAGECNTL" to be a combination of
  197.        strings (case insensitive). The value of each string con-
  198. ***************
  199. *** 715,725 ****
  200.         Same as LongOpts.
  201.   
  202.   
  203. -      If    the environment    variable ``USAGECNTL'' is empty    or unde-
  204. -      fined, then the default usage level (which    is presently
  205.   
  206.   
  207.   
  208.   Page 11
  209.   
  210.   
  211. --- 716,725 ----
  212.         Same as LongOpts.
  213.   
  214.   
  215.   
  216.   
  217.   
  218.   Page 11
  219.   
  220.   
  221. ***************
  222. *** 731,736 ****
  223. --- 731,738 ----
  224.   
  225.   
  226.   
  227. +      If    the environment    variable ``USAGECNTL'' is empty    or unde-
  228. +      fined, then the default usage level (which    is presently
  229.        ``Verbose + Options'') will be used.
  230.   
  231.   MULTI-VALUED ARGUMENTS
  232. ***************
  233. *** 781,791 ****
  234.         ( StrVec.array[ StrVec.count ] == (char *)NULL )
  235.   
  236.        is    always true, and character-vectors will    always have an
  237. -      extra NUL-character at the    end such that:
  238.   
  239.   
  240.   
  241.   Page 12
  242.   
  243.   
  244. --- 783,791 ----
  245. ***************
  246. *** 797,802 ****
  247. --- 797,804 ----
  248.   
  249.   
  250.   
  251. +      extra NUL-character at the    end such that:
  252.         ( CharVec.array[ CharVec.count ] == '\0' )
  253.   
  254.        is    always true. Integer and floating point    vectors    contain
  255. ***************
  256. *** 847,854 ****
  257.               i, StrVec.array[i], StrVec.flags[i] );
  258.   
  259.            for ( i = 0 ; i < NumVec.count ; i++ )
  260. -         printf(    "Number[%d]=%s,    flags=%x\n",
  261. -             i, NumVec.array[i], NumVec.flags[i] );
  262.   
  263.   
  264.   
  265. --- 849,854 ----
  266. ***************
  267. *** 863,868 ****
  268. --- 863,871 ----
  269.   
  270.   
  271.   
  272. +         printf(    "Number[%d]=%s,    flags=%x\n",
  273. +             i, NumVec.array[i], NumVec.flags[i] );
  274.            listFree( StrList );
  275.            StrList = ARGLISTNULL;
  276.   
  277. ***************
  278. *** 912,920 ****
  279.         typedef ARGVEC_T(FILE    *)  FILEvec_t;
  280.   
  281.         BOOL    argReadFile(  ARGDESC *ad,  char *vp,  BOOL copyf  )
  282. -       {
  283. -            register    FILE *fp;
  284. -            fp = fopen(vp, "r");
  285.   
  286.   
  287.   
  288. --- 915,920 ----
  289. ***************
  290. *** 929,934 ****
  291. --- 929,938 ----
  292.   
  293.   
  294.   
  295. +       {
  296. +            register    FILE *fp;
  297. +            fp = fopen(vp, "r");
  298.              if ( ! fp ) {
  299.               usrerr("cannot open    '%s' for reading", vp);
  300.               return (FALSE);
  301. ***************
  302. *** 978,989 ****
  303.        ment descriptor) is always    used to    match for possible argu-
  304.        ments (or keywords, or qualifiers).
  305.   
  306. -      For all supported operating systems, a long option    may be
  307. -      matched in    one of two ways: it may    match all uppercase char-
  308. -      acters in the prompt field, or it may match all characters
  309.   
  310.   
  311.   Page 15
  312.   
  313.   
  314. --- 982,989 ----
  315. ***************
  316. *** 995,1000 ****
  317. --- 995,1003 ----
  318.   
  319.   
  320.   
  321. +      For all supported operating systems, a long option    may be
  322. +      matched in    one of two ways: it may    match all uppercase char-
  323. +      acters in the prompt field, or it may match all characters
  324.        in    the prompt field (as in    ``+count=4'' and ``+rep-
  325.        count=4'').
  326.   
  327. ***************
  328. *** 1045,1055 ****
  329.         the pc_ARGFLAGS functions code) was found in the given
  330.         argdesc-array    or in its default-list.
  331.   
  332. -      pe_BADMODE
  333. -       Bad mode for given command in    parsecntl. This    occurs
  334.   
  335.   
  336.   Page 16
  337.   
  338.   
  339. --- 1048,1055 ----
  340. ***************
  341. *** 1061,1066 ****
  342. --- 1061,1068 ----
  343.   
  344.   
  345.   
  346. +      pe_BADMODE
  347. +       Bad mode for given command in    parsecntl. This    occurs
  348.         when pc_WRITE    or pc_RDWR mode    is passed to parsecntl in
  349.         conjunction with the pc_ARGFLAGS functions code.  Par-
  350.         secntl will not modify existing arguments.
  351. ***************
  352. *** 1110,1121 ****
  353.   
  354.         -f-dash_arg1 -f-dash_arg2  ...
  355.   
  356. - BUGS
  357. -      When a non-multivalued argument appears more than once on
  358. -      the command-line then only    the last value supplied    is used.
  359.   
  360.   
  361.   
  362.   Page 17
  363.   
  364.   
  365. --- 1112,1121 ----
  366.   
  367.         -f-dash_arg1 -f-dash_arg2  ...
  368.   
  369.   
  370.   
  371.   
  372.   Page 17
  373.   
  374.   
  375. ***************
  376. *** 1127,1132 ****
  377. --- 1127,1135 ----
  378.   
  379.   
  380.   
  381. + BUGS
  382. +      When a non-multivalued argument appears more than once on
  383. +      the command-line then only    the last value supplied    is used.
  384.        A problem occurs however in the following scenario: suppose
  385.        `-s' is an    option that takes an optional string argument (nd
  386.        suppose `-x' is some boolean flag). Then if the following
  387. ***************
  388. *** 1156,1164 ****
  389.        argument flags ARGPOS, ARGVALOPT, ARGVALREQ, ARGVALGIVEN,
  390.        ARGNOVAL, and ARGVEC; and VAX/VMS version and IBM-PC version
  391.        by    Brad Appleton
  392.   
  393.   
  394.   
  395. --- 1159,1164 ----
  396. No differences encountered
  397.