home *** CD-ROM | disk | FTP | other *** search
- *** Intro.OLD Mon Jul 15 10:28:10 1991
- --- Intro Wed Jun 5 10:38:05 1991
- ***************
- *** 73,79 ****
- Once the above array/string is declared it is a simple matter to invoke
- parseargs from C as in the following example:
-
- ! status = parseargs( argdesc_array, argv );
-
- or from a shell script as in the following example:
-
- --- 73,79 ----
- Once the above array/string is declared it is a simple matter to invoke
- parseargs from C as in the following example:
-
- ! status = parseargs( argv, argdesc_array );
-
- or from a shell script as in the following example:
-
- *** README.OLD Mon Jul 15 10:28:33 1991
- --- README Fri Jun 21 10:10:30 1991
- ***************
- *** 332,338 ****
- name for shell scripts. Furthermore, I changed the contents of USAGECNTL
- from a number to a sequence of mnemonic strings (for better readability).
- I also made USAGECNTL control whether or not a command-description is
- ! printed and whther or not the message is piped to a pager on Unix.
-
- Under VMS, the global symbol USAGECNTL is used in lieu of an environment
- variable. See the parseargs(3) and parseargs(1) manual pages for more
- --- 332,338 ----
- name for shell scripts. Furthermore, I changed the contents of USAGECNTL
- from a number to a sequence of mnemonic strings (for better readability).
- I also made USAGECNTL control whether or not a command-description is
- ! printed and whether or not the message is piped to a pager on Unix.
-
- Under VMS, the global symbol USAGECNTL is used in lieu of an environment
- variable. See the parseargs(3) and parseargs(1) manual pages for more
- ***************
- *** 360,367 ****
- Programs that use parseargs may be given default arguments under UNIX
- and PCs through the use of environment variables (symbols are used for
- VMS systems). If a C-program or a shell-script uses parseargs to imple-
- ! ment a command named "foo" then the environment variable (or global
- ! synbol) FOO_ARGS will be parsed for any "default" arguments before argv
- is parsed. Argv will over-ride any options that are specified in
- FOO_ARGS (except that ARGLISTs and ARGVECs set in FOO_ARGS will be
- appended from argv[]).
- --- 360,367 ----
- Programs that use parseargs may be given default arguments under UNIX
- and PCs through the use of environment variables (symbols are used for
- VMS systems). If a C-program or a shell-script uses parseargs to imple-
- ! -ment a command named "foo" then the environment variable (or global
- ! symbol) FOO_ARGS will be parsed for any "default" arguments before argv
- is parsed. Argv will over-ride any options that are specified in
- FOO_ARGS (except that ARGLISTs and ARGVECs set in FOO_ARGS will be
- appended from argv[]).
- ***************
- *** 765,770 ****
- --- 765,797 ----
- AT&T Unix Systems using both ANSI and non-ANSI C Compilers.
-
-
- + COMPILE-TIME CONSTANTS
- + ======================
- + If any of the following macros are #defined at compile time then they will
- + have the following effect:
- +
- + USE_PAGER -- for Unix systems only. Parseargs will include the code
- + which pipes usage messages to a paging program
- +
- + NOFLOAT -- Parseargs will NOT include the code for the predefined
- + floating point arg-types argFloat() and argDouble().
- +
- + SVR4 -- Parseargs(1) with the -M option will generate the new
- + Style Unix manual template.
- +
- + USE_CURSES
- + USE_TERMINFO
- + USE_TERMCAP -- Parseargs will use curses/terminfo/termcap when trying
- + to figure out the size of the screen.
- +
- + UNWRITABLE_STRING_LITERALS
- + -- This should be used only for compilers and/or machines
- + that do NOT allow the programmer to modify the contents
- + of string literals such as "hello, world". If this
- + constant is #defined, then all modified strings will be
- + duplicated (using strdup()) before they are changed.
- +
- +
- IBM-PC VERSION OF parseargs(3)
- ==============================
- I also added ibm_args.c for MS-DOS and OS/2.
- ***************
- *** 794,803 ****
- ===============================
- I also added vms_args.c for VAX/VMS.
-
- ! VMS_ARGS.C HAS NOT BEEN TESTED ON A VMS SYSTEM!!! I did not have one
- ! to test it on. It should accept command-line arguments as described in
- ! the "Grammar Rules" section of the VAX manual but I cant guarantee
- ! anything so you'll have to test it out for yourself.
-
- ARGLIST and ARGVEC are comma-separated lists in the VMS version of
- parseargs (not whitespace separated lists). In order to preserve a
- --- 821,831 ----
- ===============================
- I also added vms_args.c for VAX/VMS.
-
- ! vms_args.c has been tested by people (other than myself) on a VAX/VMS
- ! system and seems to work okay. It does not use the CLI$XXXXX routines
- ! for parsing. It should accept command-line arguments as described in
- ! the "Grammar Rules" section of the VAX manual with one slight exception
- ! which is noted below.
-
- ARGLIST and ARGVEC are comma-separated lists in the VMS version of
- parseargs (not whitespace separated lists). In order to preserve a
- ***************
- *** 890,901 ****
-
- Thanx also to Jim Barbour for helping me with some VMS specific things
- (like getting the original, unparsed command-line from DCL and
- ! retreiving the value of a symbol), and to Tom Christiansen and Raymond
- Chen for their help in getting parseargs(1) to work for perl scripts.
-
- ! Thanx also to Gillmer J. Derge, Marco Nijdam, & Chris Johnston for sending
- ! me their bug reports and fixes so that I could incorporate them into the
- ! latest patch of parseargs.
-
- Lastly, thanks to all those who use and will continue to improve
- parseargs, all I ask is that you keep me updated of your efforts (so I
- --- 918,929 ----
-
- Thanx also to Jim Barbour for helping me with some VMS specific things
- (like getting the original, unparsed command-line from DCL and
- ! retrieving the value of a symbol), and to Tom Christiansen and Raymond
- Chen for their help in getting parseargs(1) to work for perl scripts.
-
- ! Thanx also to Gillmer J. Derge, Marco Nijdam, Chris Johnston, & Earl Chew
- ! for sending me their bug reports and fixes so that I could incorporate them
- ! into the latest patch of parseargs.
-
- Lastly, thanks to all those who use and will continue to improve
- parseargs, all I ask is that you keep me updated of your efforts (so I
- *** doc/parseargs.man1.OLD Mon Jul 15 10:30:33 1991
- --- doc/parseargs.man1 Tue Jun 18 17:10:00 1991
- ***************
- *** 219,225 ****
- message printed and execution terminated). Specifying \fB\-1\fP will force
- all non-positional parameters to precede any positional parameters on the
- command-line (hence anything on the command-line after a positional parameter
- ! that resembles a keyword parameter will nevertheles be interpreted as a
- positional parameter).
- .\"----------------------------------------------------------------
- .so argvalopt.inc
- --- 219,225 ----
- message printed and execution terminated). Specifying \fB\-1\fP will force
- all non-positional parameters to precede any positional parameters on the
- command-line (hence anything on the command-line after a positional parameter
- ! that resembles a keyword parameter will nevertheless be interpreted as a
- positional parameter).
- .\"----------------------------------------------------------------
- .so argvalopt.inc
- *** patchlevel.h.OLD Mon Jul 15 10:32:11 1991
- --- patchlevel.h Mon Jul 15 10:18:26 1991
- ***************
- *** 2,7 ****
- --- 2,18 ----
- ** ^FILE: patchlevel.h - current patchlevel for parseargs
- **
- ** ^HISTORY:
- + ** 06/05/91 Brad Appleton <brad@ssd.csd.harris.com>
- + ** Patch07
- + ** - fixed the "Intro" file to correctly show how to invoke parseargs(3)
- + ** (the arguments where in the wrong order).
- + ** - added stuff in #ifdef UNWRITABLE_STRING_LITERALS to work for machines
- + ** and compilers that dont allow the programmer to modify string literals.
- + ** - documented in the README file, all the various compile-time constants
- + ** that may change the behavior of parseargs.
- + ** - sparseargs neglected to free the argument-vector when it was done
- + ** using it.
- + **
- ** 05/11/91 Brad Appleton <brad@ssd.csd.harris.com>
- ** Patch06
- ** - parsecntl(3) now correctly handles mispelled keywords for the
- ***************
- *** 80,86 ****
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 6
-
- #ifdef __STDC__
- static const char
- --- 91,97 ----
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 7
-
- #ifdef __STDC__
- static const char
- ***************
- *** 87,90 ****
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 6";
- --- 98,101 ----
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 7";
- *** xparse.c.OLD Mon Jul 15 10:33:49 1991
- --- xparse.c Wed Jun 19 09:38:14 1991
- ***************
- *** 542,547 ****
- --- 542,551 ----
- if (ARG_isBOOLEAN(ad) || ARG_isPSEUDOARG(ad))
- BSET( arg_flags(ad), ARGNOVAL );
-
- + #ifdef UNWRITABLE_STRING_LITERALS
- + ad->ad_prompt = strdup( ad->ad_prompt );
- + #endif
- +
- description = get_description( (char *)arg_sname(ad) );
- if ( description ) {
- BSET(arg_flags(ad), ARGDESCRIBED);
- ***************
- *** 576,581 ****
- --- 580,589 ----
- }
- #endif
-
- + #ifdef UNWRITABLE_STRING_LITERALS
- + cmd_name(argd) = strdup( cmd_name(argd) );
- + #endif
- +
- /* if new-style, get the purpose from the command name */
- if ( !old_style && cmd_name(argd) ) {
- purpose = get_description( (char *)cmd_name(argd) );
- ***************
- *** 1881,1886 ****
- --- 1889,1895 ----
- }
-
- rc = parse_argv_style( argv, parse_init( &argd ) );
- + free( argv );
-
- /* scan for missing required arguments */
- if ( SYNTAX_ERROR(rc, argd) ) {
-