home *** CD-ROM | disk | FTP | other *** search
- No differences encountered
- *** parseargs1.txt.OLD Mon Mar 18 09:24:28 1991
- --- parseargs1.txt Mon Mar 18 09:25:29 1991
- ***************
- *** 607,615 ****
- If the environment variable ``PARSECNTL'' is empty or
- undefined, then parsing behavior set by the programmer is
- used. If the programmer has not explicitly used
- ! parsecntl(3) to modify the parsing behavior will be
- ! ``!Prompt + !Ignore'' for Unix MS-DOS, OS/2, and AmigaDOS
- ! systems, and ``Prompt'' for VMS systems.
-
- USAGE MESSAGES
- Through the use of an environment variable (or a VMS
- --- 607,616 ----
- If the environment variable ``PARSECNTL'' is empty or
- undefined, then parsing behavior set by the programmer is
- used. If the programmer has not explicitly used
- ! parsecntl(3) to modify the parsing behavior, then the
- ! default behavior will be ``Flags1st'' for Unix systems,
- ! ``!Prompt + !Ignore'' for AmigaDOS systems, ``CaseIgnore''
- ! for MS-DOS and OS/2 systems, and ``Prompt'' for VMS systems.
-
- USAGE MESSAGES
- Through the use of an environment variable (or a VMS
- ***************
- *** 650,656 ****
- Description
- The command description is printed.
-
- - Terse
-
-
-
- --- 651,656 ----
- ***************
- *** 665,670 ****
- --- 665,671 ----
-
-
-
- + Terse
- Terse mode, just print command-line synopsis.
-
- Verbose
- ***************
- *** 716,722 ****
- FALSE (an empty string).
-
- -X A Boolean ``X Rated'' flag. This is not
- - printed in the usage message.
-
-
-
- --- 717,722 ----
- ***************
- *** 731,736 ****
- --- 731,738 ----
-
-
-
- + printed in the usage message.
- +
- The two positional arguments are both strings, as is the
- final list. If we were to invoke the above script with the
- following command line:
- ***************
- *** 781,788 ****
-
- ## parse command-line and save assignments in a temporary file ##
- parseargs -s sh -e ARGUMENTS -u -- "$NAME" "$@" >/tmp/tmp$$
- - if [ $? -ne 0 ]
- - then rm -f /tmp/tmp$$; exit 2 ## non-zero status (usage given)
-
-
-
- --- 783,788 ----
- ***************
- *** 797,802 ****
- --- 797,804 ----
-
-
-
- + if [ $? -ne 0 ]
- + then rm -f /tmp/tmp$$; exit 2 ## non-zero status (usage given)
- fi
-
- ## evaluate results from parseargs and remove temporary file
- ***************
- *** 846,857 ****
- 4 A syntax error was encountered in the argument
- specification string that was specified to parseargs.
-
- - FILES
- - /usr/local/parseargs.pl
- - This file defines a perl function named parseargs to
-
-
-
- Page 13
-
-
- --- 848,857 ----
- 4 A syntax error was encountered in the argument
- specification string that was specified to parseargs.
-
-
-
-
- +
- Page 13
-
-
- ***************
- *** 863,868 ****
- --- 863,871 ----
-
-
-
- + FILES
- + /usr/local/parseargs.pl
- + This file defines a perl function named parseargs to
- parse arguments more conveniently for perl-scripts. The
- function is both documented and implemented in this
- file. The user should ``require'' this file in his/her
- ***************
- *** 913,923 ****
- Hence multiple ``leading dash'' arguments may specified as
- follows:
-
- - -f-dash_arg1 -f-dash_arg2 ...
-
-
- -
- -
- Page 14
-
-
- --- 916,923 ----
- ***************
- *** 929,934 ****
- --- 929,936 ----
-
-
-
- + -f-dash_arg1 -f-dash_arg2 ...
- +
- BUGS
- It does not make sense to use any arguments of type argTBool
- since parseargs currently has no way of knowing what the
- ***************
- *** 971,978 ****
- AUTHOR
- Brad Appleton (brad@ssd.csd.harris.com)
- Harris Computer Systems, Fort Lauderdale, FL USA
- -
- -
-
-
-
- --- 973,978 ----
- *** parseargs3.txt.OLD Mon Mar 18 09:24:29 1991
- --- parseargs3.txt Mon Mar 18 09:25:47 1991
- ***************
- *** 643,656 ****
- If the environment variable ``PARSECNTL'' is empty or unde-
- fined, then parsing behavior set by the programmer is used.
- If the programmer has not explicitly used parsecntl(3) to
- ! modify the parsing behavior will be ``!Prompt + !Ignore''
- ! for Unix MS-DOS, OS/2, and AmigaDOS systems, and ``Prompt''
- ! for VMS systems.
-
- USAGE MESSAGES
- Through the use of an environment variable (or a VMS sym-
- bol), the user may control the syntax and the verbosity of
- - the command-usage messages that are printed by parseargs.
-
-
-
- --- 643,656 ----
- If the environment variable ``PARSECNTL'' is empty or unde-
- fined, then parsing behavior set by the programmer is used.
- If the programmer has not explicitly used parsecntl(3) to
- ! modify the parsing behavior, then the default behavior will
- ! be ``Flags1st'' for Unix systems, ``!Prompt + !Ignore'' for
- ! AmigaDOS systems, ``CaseIgnore'' for MS-DOS and OS/2 sys-
- ! tems, and ``Prompt'' for VMS systems.
-
- USAGE MESSAGES
- Through the use of an environment variable (or a VMS sym-
- bol), the user may control the syntax and the verbosity of
-
-
-
- ***************
- *** 665,670 ****
- --- 665,671 ----
-
-
-
- + the command-usage messages that are printed by parseargs.
- The desired level of verbosity may be set by defining the
- environment variable ``USAGECNTL" to be a combination of
- strings (case insensitive). The value of each string con-
- ***************
- *** 715,725 ****
- Same as LongOpts.
-
-
- - If the environment variable ``USAGECNTL'' is empty or unde-
- - fined, then the default usage level (which is presently
-
-
-
- Page 11
-
-
- --- 716,725 ----
- Same as LongOpts.
-
-
-
-
-
- +
- Page 11
-
-
- ***************
- *** 731,736 ****
- --- 731,738 ----
-
-
-
- + If the environment variable ``USAGECNTL'' is empty or unde-
- + fined, then the default usage level (which is presently
- ``Verbose + Options'') will be used.
-
- MULTI-VALUED ARGUMENTS
- ***************
- *** 781,791 ****
- ( StrVec.array[ StrVec.count ] == (char *)NULL )
-
- is always true, and character-vectors will always have an
- - extra NUL-character at the end such that:
-
-
-
- -
- Page 12
-
-
- --- 783,791 ----
- ***************
- *** 797,802 ****
- --- 797,804 ----
-
-
-
- + extra NUL-character at the end such that:
- +
- ( CharVec.array[ CharVec.count ] == '\0' )
-
- is always true. Integer and floating point vectors contain
- ***************
- *** 847,854 ****
- i, StrVec.array[i], StrVec.flags[i] );
-
- for ( i = 0 ; i < NumVec.count ; i++ )
- - printf( "Number[%d]=%s, flags=%x\n",
- - i, NumVec.array[i], NumVec.flags[i] );
-
-
-
- --- 849,854 ----
- ***************
- *** 863,868 ****
- --- 863,871 ----
-
-
-
- + printf( "Number[%d]=%s, flags=%x\n",
- + i, NumVec.array[i], NumVec.flags[i] );
- +
- listFree( StrList );
- StrList = ARGLISTNULL;
-
- ***************
- *** 912,920 ****
- typedef ARGVEC_T(FILE *) FILEvec_t;
-
- BOOL argReadFile( ARGDESC *ad, char *vp, BOOL copyf )
- - {
- - register FILE *fp;
- - fp = fopen(vp, "r");
-
-
-
- --- 915,920 ----
- ***************
- *** 929,934 ****
- --- 929,938 ----
-
-
-
- + {
- + register FILE *fp;
- + fp = fopen(vp, "r");
- +
- if ( ! fp ) {
- usrerr("cannot open '%s' for reading", vp);
- return (FALSE);
- ***************
- *** 978,989 ****
- ment descriptor) is always used to match for possible argu-
- ments (or keywords, or qualifiers).
-
- - For all supported operating systems, a long option may be
- - matched in one of two ways: it may match all uppercase char-
- - acters in the prompt field, or it may match all characters
-
-
- -
- Page 15
-
-
- --- 982,989 ----
- ***************
- *** 995,1000 ****
- --- 995,1003 ----
-
-
-
- + For all supported operating systems, a long option may be
- + matched in one of two ways: it may match all uppercase char-
- + acters in the prompt field, or it may match all characters
- in the prompt field (as in ``+count=4'' and ``+rep-
- count=4'').
-
- ***************
- *** 1045,1055 ****
- the pc_ARGFLAGS functions code) was found in the given
- argdesc-array or in its default-list.
-
- - pe_BADMODE
- - Bad mode for given command in parsecntl. This occurs
-
-
- -
- Page 16
-
-
- --- 1048,1055 ----
- ***************
- *** 1061,1066 ****
- --- 1061,1068 ----
-
-
-
- + pe_BADMODE
- + Bad mode for given command in parsecntl. This occurs
- when pc_WRITE or pc_RDWR mode is passed to parsecntl in
- conjunction with the pc_ARGFLAGS functions code. Par-
- secntl will not modify existing arguments.
- ***************
- *** 1110,1121 ****
-
- -f-dash_arg1 -f-dash_arg2 ...
-
- - BUGS
- - When a non-multivalued argument appears more than once on
- - the command-line then only the last value supplied is used.
-
-
-
- Page 17
-
-
- --- 1112,1121 ----
-
- -f-dash_arg1 -f-dash_arg2 ...
-
-
-
-
- +
- Page 17
-
-
- ***************
- *** 1127,1132 ****
- --- 1127,1135 ----
-
-
-
- + BUGS
- + When a non-multivalued argument appears more than once on
- + the command-line then only the last value supplied is used.
- A problem occurs however in the following scenario: suppose
- `-s' is an option that takes an optional string argument (nd
- suppose `-x' is some boolean flag). Then if the following
- ***************
- *** 1156,1164 ****
- argument flags ARGPOS, ARGVALOPT, ARGVALREQ, ARGVALGIVEN,
- ARGNOVAL, and ARGVEC; and VAX/VMS version and IBM-PC version
- by Brad Appleton
- -
- -
- -
-
-
-
- --- 1159,1164 ----
- No differences encountered
-