home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-16 | 53.2 KB | 1,923 lines |
- *** Intro.OLD Thu Aug 15 11:46:15 1991
- --- Intro Thu Aug 15 11:05:23 1991
- ***************
- *** 98,104 ****
-
- The VMS command-line syntax would be the following:
-
- ! cmdname [/AREA[=<areacode>]] [/GROUPS=<newsgroups>[,<newsgroups>...]
- [/REP=<repcount>] [/SEP=<sepchar>] [/X] <name>
- [<args>[,<args>...]]
-
- --- 98,104 ----
-
- The VMS command-line syntax would be the following:
-
- ! cmdname [/AREA[=<areacode>]] [/GROUPS=<newsgroups>[,<newsgroups>...]]
- [/REP=<repcount>] [/SEP=<sepchar>] [/X] <name>
- [<args>[,<args>...]]
-
- *** README.OLD Thu Aug 15 11:46:40 1991
- --- README Thu Aug 15 11:06:56 1991
- ***************
- *** 222,229 ****
-
-
- Update to parseargs (and major re-write) by Brad Appleton
- ! (brad@travis.ssd.csd.harris.com)
- ! Last Update: 04/12/91
-
-
- THIS RELEASE
- --- 222,229 ----
-
-
- Update to parseargs (and major re-write) by Brad Appleton
- ! (brad@ssd.csd.harris.com)
- ! Last Update: 08/15/91
-
-
- THIS RELEASE
- *** amiga_args.c.OLD Thu Aug 15 11:46:47 1991
- --- amiga_args.c Thu Aug 1 15:45:49 1991
- ***************
- *** 69,75 ****
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- --- 69,75 ----
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- ***************
- *** 347,353 ****
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- --- 347,353 ----
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 415,421 ****
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- --- 415,421 ----
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- *** arglist.c.OLD Thu Aug 15 11:46:54 1991
- --- arglist.c Thu Aug 1 15:45:54 1991
- ***************
- *** 61,67 ****
- ** string-list argument. The ad_valp field of ad MUST be either NULL or
- ** point to a valid arglist-head structure.
- **
- ! ** ^SIDE-EFECTS:
- ** If successful, arglist pointed to by arg_valp(ad) is appended with
- ** the given string, <vp> is unchanged.
- **
- --- 61,67 ----
- ** string-list argument. The ad_valp field of ad MUST be either NULL or
- ** point to a valid arglist-head structure.
- **
- ! ** ^SIDE-EFFECTS:
- ** If successful, arglist pointed to by arg_valp(ad) is appended with
- ** the given string, <vp> is unchanged.
- **
- ***************
- *** 174,180 ****
- ** ^REQUIREMENTS:
- ** argls must point to a valid arglist-head structure.
- **
- ! ** ^SIDE-EFECTS:
- ** each item in argls is removed, argls itself should be set to NULL
- ** after this routine is invoked.
- **
- --- 174,180 ----
- ** ^REQUIREMENTS:
- ** argls must point to a valid arglist-head structure.
- **
- ! ** ^SIDE-EFFECTS:
- ** each item in argls is removed, argls itself should be set to NULL
- ** after this routine is invoked.
- **
- *** ibm_args.c.OLD Thu Aug 15 11:50:11 1991
- --- ibm_args.c Thu Aug 1 15:46:01 1991
- ***************
- *** 97,103 ****
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFECTS:
- ** Sets the global variables "OptPrefix" and "KwdPrefix'.
- **
- ** ^RETURN-VALUE:
- --- 97,103 ----
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFFECTS:
- ** Sets the global variables "OptPrefix" and "KwdPrefix'.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 162,168 ****
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- --- 162,168 ----
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- ***************
- *** 564,570 ****
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- --- 564,570 ----
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 658,664 ****
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- --- 658,664 ----
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- *** parseargs.c.OLD Thu Aug 15 11:50:26 1991
- --- parseargs.c Thu Aug 15 10:56:52 1991
- ***************
- *** 244,256 ****
- /* array of shell info records for supported shells */
- static CONST shell_info Shell[] = {
- {
- SH, "sh",
- ! "shift $#;\n",
- "%s=", "'", "';\n",
- "%s=", "'", "'%s'", "';\n",
- ! "'\\%c'", "'"
- },
- {
- BASH, "bash",
- "shift $#;\n",
- "%s=", "'", "';\n",
- --- 244,270 ----
- /* array of shell info records for supported shells */
- static CONST shell_info Shell[] = {
- {
- + /* Bourne Shell */
- SH, "sh",
- !
- ! /* "shift $#" unsets the positional parameters */
- ! "shift $#;\n",
- !
- ! /* "name='value'" assigns "value" to the variable "name" */
- "%s=", "'", "';\n",
- +
- + /* "ary='elt1 elt2 ...'" assigns an array named "ary" */
- "%s=", "'", "'%s'", "';\n",
- !
- ! /* the only character we need to escape is a "'", We do this by ending
- ! ** the current quote, escaping the quote, and starting a new one
- ! */
- ! "'\\%c'", "'"
- },
- {
- + /* Bourne-Again shell -- we treat it the same as the Bourne shell.
- + ** (this should change when BASH supports arrays)
- + */
- BASH, "bash",
- "shift $#;\n",
- "%s=", "'", "';\n",
- ***************
- *** 258,298 ****
- --- 272,380 ----
- "'\\%c'", "'"
- },
- {
- + /* Korn Shell */
- KSH, "ksh",
- +
- + /* "set -- ;" unsets the positional parameters */
- "set --;\n",
- +
- + /* "name='value'" assigns "value" to the variable "name" */
- "%s=", "'", "';\n",
- +
- + /* "set [-+]A ary 'elt1' 'elt2' ..." assigns an array named "ary" */
- "set %cA %s ", "'", "'%s'", "';\n",
- +
- + /* the only character we need to escape is a "'", We do this by ending
- + ** the current quote, escaping the quote, and starting a new one
- + */
- "'\\%c'", "'"
- },
- {
- + /* C-Shell */
- CSH, "csh",
- +
- + /* "set argv=()" unsets the positional parameters */
- "set argv=();\n",
- +
- + /* "set name='value'" assigns "value" to the variable "name" */
- "set %s=", "'", "';\n",
- +
- + /* "set ary=( 'elt1' 'elt2' ... )" assigns an array named "ary" */
- "set %s=", "( '", "'%s'", "' );\n",
- +
- + /* the only character we need to escape is a "'", We do this by ending
- + ** the current quote, escaping the quote, and starting a new one
- + */
- "'\\%c'", "'"
- },
- {
- + /* Z-Shell -- this is a lot like the C-Shell except we dont need
- + ** the 'set' keyword when assigning variables and arrays
- + */
- ZSH, "zsh",
- +
- + /* "argv=()" unsets the positional parameters */
- "argv=();\n",
- +
- + /* "name='value'" assigns "value" to the variable "name" */
- "%s=", "'", "';\n",
- +
- + /* "ary=( 'elt1' 'elt2' ... )" assigns an array named "ary" */
- "%s=", "( '", "'%s'", "' );\n",
- +
- + /* the only character we need to escape is a "'", We do this by ending
- + ** the current quote, escaping the quote, and starting a new one
- + */
- "'\\%c'", "'"
- },
- {
- + /* rc -- the Plan 9 shell designed by Tom Duff */
- RC, "rc",
- +
- + /* "*=()" unsets the positional parameters */
- "*=();\n",
- +
- + /* "name='value'" assigns "value" to the variable "name" */
- "%s=", "'", "';\n",
- +
- + /* "ary=( 'elt1' 'elt2' ... )" assigns an array named "ary" */
- "%s=", "( '", "'%s'", "' );\n",
- +
- + /* the only character to escape is a "'", We do this by using
- + ** two "'" characters in a row.
- + */
- "''", "'"
- },
- {
- + /* perl - Larry Wall's Practical Extraction and Reoprt Language */
- PERL, "perl",
- +
- + /* "@ARGV = ()" unsets the positional parameters */
- "@ARGV = ();\n",
- +
- + /* "$name = 'value' ;" assigns "value" to the variable "name" */
- "$%s = ", "'", "';\n",
- +
- + /* "@ary = ( 'elt1', 'elt2', ... );" assigns an array named "ary" */
- "@%s = ", "( '", "', '", "' );\n",
- +
- + /* the only character to escape is a "'", We do this by preceding it
- + ** with a backslash.
- + */
- "\\%c", "'"
- },
- {
- + /* awk -- Aho, Weinberger, & Kernighan's pattern-action language
- + **
- + ** we treat awk differently then the other shells. This is because
- + ** we cant use actual awk syntax (since awk doesnt have the equivalent
- + ** of an 'eval' command). Instead, we write out an input stream for
- + ** consisting or variable assignments. Records are multi-line, and
- + ** separated by a blank line. Fields are separated by a newline.
- + ** The first field is the name of the variable and the remaining
- + ** fields (if more than one remains we have an array) of the values
- + ** associated with the variable.
- + */
- AWK, "awk",
- "ARGV\n\n",
- "%s\n", "", "\n\n",
- ***************
- *** 352,357 ****
- --- 434,445 ----
-
- /*************************************************************************/
-
- + /*
- + ** argVers() -- This is the function used to print the version of parseargs
- + ** on standard output and then exit (regardless of where its
- + ** corresponding '-#' appears on the command line and regardless
- + ** of what may have preceded it).
- + */
- /*ARGSUSED*/
- #ifdef __ANSI_C__
- static BOOL argVers( register ARGDESC *ad, register char *vp, BOOL copyf )
- ***************
- *** 504,510 ****
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFECTS:
- ** Storage associated with all dynamically allocated arg-vectors
- ** is released and set to NULL.
- **
- --- 592,598 ----
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFFECTS:
- ** Storage associated with all dynamically allocated arg-vectors
- ** is released and set to NULL.
- **
- ***************
- *** 559,565 ****
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFECTS:
- ** Storage associated with all dynamically allocated global-variables
- ** is released and set to NULL.
- **
- --- 647,653 ----
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFFECTS:
- ** Storage associated with all dynamically allocated global-variables
- ** is released and set to NULL.
- **
- ***************
- *** 614,620 ****
- ** ^REQUIREMENTS:
- ** size should be > 0
- **
- ! ** ^SIDE-EFECTS:
- ** Memory is allocated that should later be deallocated using free().
- **
- ** ^RETURN-VALUE:
- --- 702,708 ----
- ** ^REQUIREMENTS:
- ** size should be > 0
- **
- ! ** ^SIDE-EFFECTS:
- ** Memory is allocated that should later be deallocated using free().
- **
- ** ^RETURN-VALUE:
- ***************
- *** 667,673 ****
- ** ^REQUIREMENTS:
- ** size should be > 0
- **
- ! ** ^SIDE-EFECTS:
- ** Memory is allocated that should later be deallocated using free().
- **
- ** ^RETURN-VALUE:
- --- 755,761 ----
- ** ^REQUIREMENTS:
- ** size should be > 0
- **
- ! ** ^SIDE-EFFECTS:
- ** Memory is allocated that should later be deallocated using free().
- **
- ** ^RETURN-VALUE:
- ***************
- *** 721,727 ****
- ** Both <ch> and <esc> should be non-zero.
- ** <str> should be non-null and non-empty.
- **
- ! ** ^SIDE-EFECTS:
- ** Each occurrence in <str> of <ch> within single or double quotes is
- ** replaced with <esc>.
- **
- --- 809,815 ----
- ** Both <ch> and <esc> should be non-zero.
- ** <str> should be non-null and non-empty.
- **
- ! ** ^SIDE-EFFECTS:
- ** Each occurrence in <str> of <ch> within single or double quotes is
- ** replaced with <esc>.
- **
- ***************
- *** 781,787 ****
- ** It should be noted that escape_char() only replaces characters in quotes
- ** whereas this routine replaces all occurrences.
- **
- ! ** ^SIDE-EFECTS:
- ** Each occurrence of <esc> in <str> is replaced with <ch>.
- **
- ** ^RETURN-VALUE:
- --- 869,875 ----
- ** It should be noted that escape_char() only replaces characters in quotes
- ** whereas this routine replaces all occurrences.
- **
- ! ** ^SIDE-EFFECTS:
- ** Each occurrence of <esc> in <str> is replaced with <ch>.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 823,829 ****
- ** ^REQUIREMENTS:
- ** type_str should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 911,917 ----
- ** ^REQUIREMENTS:
- ** type_str should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 901,907 ****
- ** ^REQUIREMENTS:
- ** flag_str should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 989,995 ----
- ** ^REQUIREMENTS:
- ** flag_str should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 960,966 ****
- ** ^REQUIREMENTS:
- ** Standard input should be open for reading and be non-interactive.
- **
- ! ** ^SIDE-EFECTS:
- ** Memory is allocated that should later be deallocated using free.
- **
- ** ^RETURN-VALUE:
- --- 1048,1054 ----
- ** ^REQUIREMENTS:
- ** Standard input should be open for reading and be non-interactive.
- **
- ! ** ^SIDE-EFFECTS:
- ** Memory is allocated that should later be deallocated using free.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1078,1084 ****
- ** ^REQUIREMENTS:
- ** sh_str should be non-NULL and non-empty.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 1166,1172 ----
- ** ^REQUIREMENTS:
- ** sh_str should be non-NULL and non-empty.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1141,1147 ****
- ** ^REQUIREMENTS:
- ** argd_str should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** The global variables UsrVals and UsrArgd are allocated and initialized
- **
- ** ^RETURN-VALUE:
- --- 1229,1235 ----
- ** ^REQUIREMENTS:
- ** argd_str should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** The global variables UsrVals and UsrArgd are allocated and initialized
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1357,1363 ****
- ** <fp> should be non-NULL and open for writing.
- ** <ch> should be a printable character.
- **
- ! ** ^SIDE-EFECTS:
- ** output is written to <fp>.
- **
- ** ^RETURN-VALUE:
- --- 1445,1451 ----
- ** <fp> should be non-NULL and open for writing.
- ** <ch> should be a printable character.
- **
- ! ** ^SIDE-EFFECTS:
- ** output is written to <fp>.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1416,1422 ****
- ** <fp> should be non-NULL and open for writing.
- ** <str> should be non-NULL and non-empty.
- **
- ! ** ^SIDE-EFECTS:
- ** Output is written to <fp>
- **
- ** ^RETURN-VALUE:
- --- 1504,1510 ----
- ** <fp> should be non-NULL and open for writing.
- ** <str> should be non-NULL and non-empty.
- **
- ! ** ^SIDE-EFFECTS:
- ** Output is written to <fp>
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1470,1476 ****
- ** ^REQUIREMENTS:
- ** <val> should be the value corresponing to the argument-descriptor <ad>
- **
- ! ** ^SIDE-EFECTS:
- ** Output is written to <fp>.
- **
- ** ^RETURN-VALUE:
- --- 1558,1564 ----
- ** ^REQUIREMENTS:
- ** <val> should be the value corresponing to the argument-descriptor <ad>
- **
- ! ** ^SIDE-EFFECTS:
- ** Output is written to <fp>.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1732,1738 ****
- ** ^REQUIREMENTS:
- ** <val> should correspond to the vlue of the argument indicated by <ad>
- **
- ! ** ^SIDE-EFECTS:
- ** prints the array assignment statement on standard output
- **
- ** ^RETURN-VALUE:
- --- 1820,1826 ----
- ** ^REQUIREMENTS:
- ** <val> should correspond to the vlue of the argument indicated by <ad>
- **
- ! ** ^SIDE-EFFECTS:
- ** prints the array assignment statement on standard output
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1825,1831 ****
- ** The argument values have already been set due to the fact that parseargs
- ** should already have been invoked to parse the command-line
- **
- ! ** ^SIDE-EFECTS:
- ** Variable assignment statements are printed on standard output.
- **
- ** ^RETURN-VALUE:
- --- 1913,1919 ----
- ** The argument values have already been set due to the fact that parseargs
- ** should already have been invoked to parse the command-line
- **
- ! ** ^SIDE-EFFECTS:
- ** Variable assignment statements are printed on standard output.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1926,1932 ****
- ** ^REQUIREMENTS:
- ** The currenty shell-type has already been determined.
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on stdout.
- **
- ** ^RETURN-VALUE:
- --- 2014,2020 ----
- ** ^REQUIREMENTS:
- ** The currenty shell-type has already been determined.
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on stdout.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1962,1968 ****
- ** ^REQUIREMENTS:
- ** The command-line should already have been parsed by parseargs(3)
- **
- ! ** ^SIDE-EFECTS:
- ** - Exits the program if an error is encountered.
- ** - Assigns any needed defaults for StrTrue and StrFalse.
- ** - Gets the argd-string from an environment variable if needed
- --- 2050,2056 ----
- ** ^REQUIREMENTS:
- ** The command-line should already have been parsed by parseargs(3)
- **
- ! ** ^SIDE-EFFECTS:
- ** - Exits the program if an error is encountered.
- ** - Assigns any needed defaults for StrTrue and StrFalse.
- ** - Gets the argd-string from an environment variable if needed
- *** parseargs.h.OLD Thu Aug 15 11:50:41 1991
- --- parseargs.h Thu Aug 1 15:47:32 1991
- ***************
- *** 1011,1017 ****
- EXTERN int parsecntl ARGS(( ARGDESC *, parsecntl_t, parsemode_t, ...));
- EXTERN VOID usage ARGS(( const ARGDESC * ));
- EXTERN VOID init_args ARGS(( ARGDESC * ));
- ! extern CONST char *ProgName;
- #endif /* PARSEARGS_NEXTERNS */
-
- #endif /* PARSEARGS_H */
- --- 1011,1017 ----
- EXTERN int parsecntl ARGS(( ARGDESC *, parsecntl_t, parsemode_t, ...));
- EXTERN VOID usage ARGS(( const ARGDESC * ));
- EXTERN VOID init_args ARGS(( ARGDESC * ));
- ! EXTERN CONST char *ProgName;
- #endif /* PARSEARGS_NEXTERNS */
-
- #endif /* PARSEARGS_H */
- *** patchlevel.h.OLD Thu Aug 15 11:50:53 1991
- --- patchlevel.h Thu Aug 15 10:57:37 1991
- ***************
- *** 2,7 ****
- --- 2,17 ----
- ** ^FILE: patchlevel.h - current patchlevel for parseargs
- **
- ** ^HISTORY:
- + ** 08/15/91 Brad Appleton <brad@ssd.csd.harris.com>
- + ** Patch08
- + ** - fixed some typos in the comments (SIDE-EFFECTS was misspelled
- + ** everywhere in the comments for the functions).
- + ** - fixed up external definition of ProgName to work for C++
- + ** (added extern "C").
- + ** - fixed up lparseargs() and vparseargs to free the argument vector
- + ** when it was finished with it.
- + ** - added some more comments to xparse.c and parseargs.c.
- + **
- ** 06/05/91 Brad Appleton <brad@ssd.csd.harris.com>
- ** Patch07
- ** - fixed the "Intro" file to correctly show how to invoke parseargs(3)
- ***************
- *** 91,97 ****
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 7
-
- #ifdef __STDC__
- static const char
- --- 101,107 ----
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 8
-
- #ifdef __STDC__
- static const char
- ***************
- *** 98,101 ****
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 7";
- --- 108,111 ----
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 8";
- *** pgopen.c.OLD Thu Aug 15 11:50:58 1991
- --- pgopen.c Thu Aug 1 15:46:13 1991
- ***************
- *** 104,110 ****
- ** pgopen() must first be called in order to obtain a valid
- ** pager-file-pointer.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 104,110 ----
- ** pgopen() must first be called in order to obtain a valid
- ** pager-file-pointer.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 143,149 ****
- ** pgopen() must first be called in order to obtain a valid
- ** pager-file-pointer.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 143,149 ----
- ** pgopen() must first be called in order to obtain a valid
- ** pager-file-pointer.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 213,219 ****
- ** program which reads from standard input and writes (one screenful
- ** at a time) to the terminal.
- **
- ! ** ^SIDE-EFECTS:
- ** If popen() succeeds, the SIGPIPE signal is trapped.
- **
- ** ^RETURN-VALUE:
- --- 213,219 ----
- ** program which reads from standard input and writes (one screenful
- ** at a time) to the terminal.
- **
- ! ** ^SIDE-EFFECTS:
- ** If popen() succeeds, the SIGPIPE signal is trapped.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 346,352 ****
- ** Pgopen must place the address of the desired recovery point in
- ** pg_recover.
- **
- ! ** ^SIDE-EFECTS:
- ** Resets SIGPIPE signal-handler and performs a non-local goto.
- **
- ** ^RETURN-VALUE:
- --- 346,352 ----
- ** Pgopen must place the address of the desired recovery point in
- ** pg_recover.
- **
- ! ** ^SIDE-EFFECTS:
- ** Resets SIGPIPE signal-handler and performs a non-local goto.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 387,393 ****
- ** pager_cmd must be non-null and be large enough to hold any of the
- ** possible pager program-names to be opened.
- **
- ! ** ^SIDE-EFECTS:
- ** pager_cmd is over-written with the name of the pager-command to
- ** try to open for output
- **
- --- 387,393 ----
- ** pager_cmd must be non-null and be large enough to hold any of the
- ** possible pager program-names to be opened.
- **
- ! ** ^SIDE-EFFECTS:
- ** pager_cmd is over-written with the name of the pager-command to
- ** try to open for output
- **
- *** stest.c.OLD Thu Aug 15 11:51:11 1991
- --- stest.c Thu Aug 1 15:46:18 1991
- ***************
- *** 181,187 ****
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFECTS:
- ** All the static-global argument variables are rewritten.
- **
- ** ^RETURN-VALUE:
- --- 181,187 ----
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFFECTS:
- ** All the static-global argument variables are rewritten.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 233,239 ****
- ** The command-line should have already been parsed by one of the
- ** Xparseargs functions.
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on stdout.
- **
- ** ^RETURN-VALUE:
- --- 233,239 ----
- ** The command-line should have already been parsed by one of the
- ** Xparseargs functions.
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on stdout.
- **
- ** ^RETURN-VALUE:
- *** strfuncs.c.OLD Thu Aug 15 11:51:18 1991
- --- strfuncs.c Thu Aug 1 15:46:24 1991
- ***************
- *** 80,86 ****
- ** ^REQUIREMENTS:
- ** Dest must be non-null, and large enough to hold the copied result.
- **
- ! ** ^SIDE-EFECTS:
- ** Dest is (re)written
- **
- ** ^RETURN-VALUE:
- --- 80,86 ----
- ** ^REQUIREMENTS:
- ** Dest must be non-null, and large enough to hold the copied result.
- **
- ! ** ^SIDE-EFFECTS:
- ** Dest is (re)written
- **
- ** ^RETURN-VALUE:
- ***************
- *** 147,153 ****
- ** ^REQUIREMENTS:
- ** str should be non-null and non-empty.
- **
- ! ** ^SIDE-EFECTS:
- ** str is overwritten with the uppercase (lowercase) result.
- **
- ** ^RETURN-VALUE:
- --- 147,153 ----
- ** ^REQUIREMENTS:
- ** str should be non-null and non-empty.
- **
- ! ** ^SIDE-EFFECTS:
- ** str is overwritten with the uppercase (lowercase) result.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 212,218 ****
- ** ^REQUIREMENTS:
- ** Both s1 and s2 should be non-null and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 212,218 ----
- ** ^REQUIREMENTS:
- ** Both s1 and s2 should be non-null and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 344,350 ****
- ** ^REQUIREMENTS:
- ** Both str1 and str2 should be non-null and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 344,350 ----
- ** ^REQUIREMENTS:
- ** Both str1 and str2 should be non-null and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 394,400 ****
- ** ^REQUIREMENTS:
- ** Both str1 and str2 should be non-null and non-empty.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 394,400 ----
- ** ^REQUIREMENTS:
- ** Both str1 and str2 should be non-null and non-empty.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 477,483 ****
- ** ^REQUIREMENTS:
- ** str should be non-null and non-empty.
- **
- ! ** ^SIDE-EFECTS:
- ** characters may be removed from the beginning and/or end of str.
- **
- ** ^RETURN-VALUE:
- --- 477,483 ----
- ** ^REQUIREMENTS:
- ** str should be non-null and non-empty.
- **
- ! ** ^SIDE-EFFECTS:
- ** characters may be removed from the beginning and/or end of str.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 584,590 ****
- ** vec must be non-NULL (it must be a valid address).
- ** token_str should be non-null and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** All leading and trailing characters from <separators> are removed
- ** from token_str. Furthermore, all remaining sequences in token_str
- ** of characters from <separators> are replaced with a single NUL-byte.
- --- 584,590 ----
- ** vec must be non-NULL (it must be a valid address).
- ** token_str should be non-null and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** All leading and trailing characters from <separators> are removed
- ** from token_str. Furthermore, all remaining sequences in token_str
- ** of characters from <separators> are replaced with a single NUL-byte.
- ***************
- *** 693,699 ****
- ** argv must be non-NULL (it must be a valid address), and must be
- ** terminated by a pointer to NULL (argv[last+1] == NULL).
- **
- ! ** ^SIDE-EFECTS:
- ** Storage is allocated.
- **
- ** ^RETURN-VALUE:
- --- 693,699 ----
- ** argv must be non-NULL (it must be a valid address), and must be
- ** terminated by a pointer to NULL (argv[last+1] == NULL).
- **
- ! ** ^SIDE-EFFECTS:
- ** Storage is allocated.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 773,779 ****
- ** Both s and buf must be non-null and non-empty.
- ** buf must be large enough to hold the result.
- **
- ! ** ^SIDE-EFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- --- 773,779 ----
- ** Both s and buf must be non-null and non-empty.
- ** buf must be large enough to hold the result.
- **
- ! ** ^SIDE-EFFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 834,840 ****
- ** Both s and buf must be non-null and non-empty.
- ** buf must be large enough to hold the result.
- **
- ! ** ^SIDE-EFECTS:
- ** buf is overwritten.
- *
- ** ^RETURN-VALUE:
- --- 834,840 ----
- ** Both s and buf must be non-null and non-empty.
- ** buf must be large enough to hold the result.
- **
- ! ** ^SIDE-EFFECTS:
- ** buf is overwritten.
- *
- ** ^RETURN-VALUE:
- ***************
- *** 915,921 ****
- ** Both candidate and target should be non-null and non-empty.
- ** target should be the ad_prompt field of an ARGDESC structure.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 915,921 ----
- ** Both candidate and target should be non-null and non-empty.
- ** target should be the ad_prompt field of an ARGDESC structure.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1035,1041 ****
- ** path should be non-null, non-empty, and should correspond to a valid
- ** pathname (absolute or relative).
- **
- ! ** ^SIDE-EFECTS:
- ** None under Unix and AmigaDOS.
- **
- ** Under VMS, the file version is removed and any .COM or .EXE extension
- --- 1035,1041 ----
- ** path should be non-null, non-empty, and should correspond to a valid
- ** pathname (absolute or relative).
- **
- ! ** ^SIDE-EFFECTS:
- ** None under Unix and AmigaDOS.
- **
- ** Under VMS, the file version is removed and any .COM or .EXE extension
- ***************
- *** 1180,1186 ****
- ** ^REQUIREMENTS:
- ** maxcols and indent must be positive numbers with maxcols > indent
- **
- ! ** ^SIDE-EFECTS:
- ** Output is printed to fp.
- **
- ** ^RETURN-VALUE:
- --- 1180,1186 ----
- ** ^REQUIREMENTS:
- ** maxcols and indent must be positive numbers with maxcols > indent
- **
- ! ** ^SIDE-EFFECTS:
- ** Output is printed to fp.
- **
- ** ^RETURN-VALUE:
- *** syserr.c.OLD Thu Aug 15 11:51:32 1991
- --- syserr.c Thu Aug 1 15:46:29 1991
- ***************
- *** 57,63 ****
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFECTS:
- ** Writes to stderr.
- **
- ** ^RETURN-VALUE:
- --- 57,63 ----
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFFECTS:
- ** Writes to stderr.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 115,121 ****
- ** ^REQUIREMENTS:
- ** No special requirements.
- **
- ! ** ^SIDE-EFECTS:
- ** All output is written to stderr. Program execution is terminated.
- **
- ** ^RETURN-VALUE:
- --- 115,121 ----
- ** ^REQUIREMENTS:
- ** No special requirements.
- **
- ! ** ^SIDE-EFFECTS:
- ** All output is written to stderr. Program execution is terminated.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 173,179 ****
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFECTS:
- ** Writes to stderr.
- **
- ** ^RETURN-VALUE:
- --- 173,179 ----
- ** ^REQUIREMENTS:
- ** None.
- **
- ! ** ^SIDE-EFFECTS:
- ** Writes to stderr.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 224,230 ****
- ** ^REQUIREMENTS:
- ** No special requirements.
- **
- ! ** ^SIDE-EFECTS:
- ** All output is written to stderr. Errno is cleared.
- **
- ** ^RETURN-VALUE:
- --- 224,230 ----
- ** ^REQUIREMENTS:
- ** No special requirements.
- **
- ! ** ^SIDE-EFFECTS:
- ** All output is written to stderr. Errno is cleared.
- **
- ** ^RETURN-VALUE:
- *** test.rc.OLD Thu Aug 15 11:51:57 1991
- --- test.rc Thu Aug 15 11:01:23 1991
- ***************
- *** 1,6 ****
- --- 1,10 ----
- #!/bin/rc
- # test.rc - rc shell script to test out the parseargs command!
- #
- + # NOTE: This script tests Byron Rakitzis' version of rc. NOT the
- + # Plan 9 version (there are a few differences such as the use
- + # of "else" instead of "if not" and the use of "$^variable").
- + #
- NAME=`{basename $0}
-
- ARGUMENTS='
- *** unix_args.c.OLD Thu Aug 15 11:52:16 1991
- --- unix_args.c Thu Aug 1 15:46:35 1991
- ***************
- *** 86,92 ****
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- --- 86,92 ----
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- ***************
- *** 484,490 ****
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- --- 484,490 ----
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 574,580 ****
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- --- 574,580 ----
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- *** unix_man.c.OLD Thu Aug 15 11:52:23 1991
- --- unix_man.c Thu Aug 1 15:46:44 1991
- ***************
- *** 56,62 ****
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- --- 56,62 ----
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 144,150 ****
- ** ^REQUIREMENTS:
- ** Argd should be a valid command-line descriptor array.
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on standard-output.
- **
- ** ^RETURN-VALUE:
- --- 144,150 ----
- ** ^REQUIREMENTS:
- ** Argd should be a valid command-line descriptor array.
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on standard-output.
- **
- ** ^RETURN-VALUE:
- *** vms_args.c.OLD Thu Aug 15 11:52:36 1991
- --- vms_args.c Thu Aug 1 15:47:00 1991
- ***************
- *** 101,107 ****
- ** ^REQUIREMENTS:
- ** argv must be non-null
- **
- ! ** ^SIDE-EFECTS:
- ** *result is assigned to either the concatenated argv string or the
- ** original command-line. The result shoub be freed using free().
- **
- --- 101,107 ----
- ** ^REQUIREMENTS:
- ** argv must be non-null
- **
- ! ** ^SIDE-EFFECTS:
- ** *result is assigned to either the concatenated argv string or the
- ** original command-line. The result shoub be freed using free().
- **
- ***************
- *** 193,199 ****
- ** ^REQUIREMENTS:
- ** <str> should be non-null and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** <str> is "trimmed" to canonical form and special characters are mapped
- ** to a unique code.
- **
- --- 193,199 ----
- ** ^REQUIREMENTS:
- ** <str> should be non-null and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** <str> is "trimmed" to canonical form and special characters are mapped
- ** to a unique code.
- **
- ***************
- *** 473,479 ****
- ** <vp> must already be preprocessed by dcl_strxlat to escape any quoted
- ** characters and to map special characters to their corresponding values.
- **
- ! ** ^SIDE-EFECTS:
- ** Ad has some of its flags modified as well as any modifications that
- ** are made by the ad_type function.
- **
- --- 473,479 ----
- ** <vp> must already be preprocessed by dcl_strxlat to escape any quoted
- ** characters and to map special characters to their corresponding values.
- **
- ! ** ^SIDE-EFFECTS:
- ** Ad has some of its flags modified as well as any modifications that
- ** are made by the ad_type function.
- **
- ***************
- *** 551,557 ****
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- --- 551,557 ----
- ** ^REQUIREMENTS:
- ** The final element in argv must be a NULL pointer.
- **
- ! ** ^SIDE-EFFECTS:
- ** argd is modified according to the command-line description and parameters
- **
- ** ^RETURN-VALUE:
- ***************
- *** 830,836 ****
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- --- 830,836 ----
- ** buf must be large enough to hold the formatted result (100 characters
- ** should do the trick).
- **
- ! ** ^SIDE-EFFECTS:
- ** buf is overwritten.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 900,906 ****
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- --- 900,906 ----
- ** ^REQUIREMENTS:
- ** argd should be a non-null command-line argument-descriptor array
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- *** xparse.c.OLD Thu Aug 15 11:52:58 1991
- --- xparse.c Thu Aug 15 11:20:40 1991
- ***************
- *** 224,236 ****
-
- #ifdef vms_style
- # ifdef vms
- ! { '<', ARGHIDDEN, argInput, __ &stdin, "INPUT (redirect SYS$INPUT)" },
- ! { '>', ARGHIDDEN, argOutput, __ &stdout, "OUTPUT (redirect SYS$OUTPUT)" },
- ! { '%', ARGHIDDEN, argOutput, __ &stderr, "ERROR (redirect SYS$ERROR)" },
- # else
- ! { '<', ARGHIDDEN, argInput, __ stdin, "INPUT (redirect SYS$INPUT)" },
- ! { '>', ARGHIDDEN, argOutput, __ stdout, "OUTPUT (redirect SYS$OUTPUT)" },
- ! { '%', ARGHIDDEN, argOutput, __ stderr, "ERROR (redirect SYS$ERROR)" },
- # endif
- #endif
-
- --- 224,236 ----
-
- #ifdef vms_style
- # ifdef vms
- ! { '<', ARGHIDDEN, argInput, __ &stdin, "sysINPUT (redirect SYS$INPUT)" },
- ! { '>', ARGHIDDEN, argOutput, __ &stdout, "sysOUTPUT (redirect SYS$OUTPUT)" },
- ! { '%', ARGHIDDEN, argOutput, __ &stderr, "sysERROR (redirect SYS$ERROR)" },
- # else
- ! { '<', ARGHIDDEN, argInput, __ stdin, "sysINPUT (redirect SYS$INPUT)" },
- ! { '>', ARGHIDDEN, argOutput, __ stdout, "sysOUTPUT (redirect SYS$OUTPUT)" },
- ! { '%', ARGHIDDEN, argOutput, __ stderr, "sysERROR (redirect SYS$ERROR)" },
- # endif
- #endif
-
- ***************
- *** 283,289 ****
- ** ^REQUIREMENTS:
- ** sym_name should correspond to the name of a pre-defined symbol.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 283,289 ----
- ** ^REQUIREMENTS:
- ** sym_name should correspond to the name of a pre-defined symbol.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 344,350 ****
- ** ^REQUIREMENTS:
- ** Fd must correspond to a valid, open, file-descriptor.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 344,350 ----
- ** ^REQUIREMENTS:
- ** Fd must correspond to a valid, open, file-descriptor.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 413,419 ****
- ** ^REQUIREMENTS:
- ** str should be non-null and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** The characters which separated the two portions of <str> are
- ** replaced with a single '\0'.
- **
- --- 413,419 ----
- ** ^REQUIREMENTS:
- ** str should be non-null and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** The characters which separated the two portions of <str> are
- ** replaced with a single '\0'.
- **
- ***************
- *** 497,503 ****
- ** <argd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFECTS:
- ** The argd is initialized for use.
- **
- ** ^RETURN-VALUE:
- --- 497,503 ----
- ** <argd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFFECTS:
- ** The argd is initialized for use.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 642,648 ****
- ** <argd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFECTS:
- ** resets the ARG flags of each argument and the command-state of argd.
- **
- ** ^RETURN-VALUE:
- --- 642,648 ----
- ** <argd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFFECTS:
- ** resets the ARG flags of each argument and the command-state of argd.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 723,729 ****
- ** ^REQUIREMENTS:
- ** Only the first 255 characters of user input is used.
- **
- ! ** ^SIDE-EFECTS:
- ** Modifies <ad> accordingly.
- **
- ** ^RETURN-VALUE:
- --- 723,729 ----
- ** ^REQUIREMENTS:
- ** Only the first 255 characters of user input is used.
- **
- ! ** ^SIDE-EFFECTS:
- ** Modifies <ad> accordingly.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 828,834 ****
- ** parse_status should be a pointer to the result of a previous call to
- ** {f,l,s,v,}parseargs.
- **
- ! ** ^SIDE-EFECTS:
- ** The arg-descs for missing arguments may be modified by prompt_user.
- ** parse_status will be modified to indicate whether or not a syntax
- ** error really has occurred (it will be pe_SUCCESS if all is hunky-dory).
- --- 828,834 ----
- ** parse_status should be a pointer to the result of a previous call to
- ** {f,l,s,v,}parseargs.
- **
- ! ** ^SIDE-EFFECTS:
- ** The arg-descs for missing arguments may be modified by prompt_user.
- ** parse_status will be modified to indicate whether or not a syntax
- ** error really has occurred (it will be pe_SUCCESS if all is hunky-dory).
- ***************
- *** 943,949 ****
- ** by preceding it with one of '!', '^', or '~'. Tokens must be separated by
- ** one or more non-alphanumerics (other than '!', '~', and '^').
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 943,949 ----
- ** by preceding it with one of '!', '^', or '~'. Tokens must be separated by
- ** one or more non-alphanumerics (other than '!', '~', and '^').
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1088,1094 ****
- ** <cmd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- --- 1088,1094 ----
- ** <cmd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFFECTS:
- ** None.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1228,1234 ****
- ** <cmd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFECTS:
- ** Modifies the parse-flags of <cmd> is $PARSECNTL is non-null & non-empty.
- **
- ** ^RETURN-VALUE:
- --- 1228,1234 ----
- ** <cmd> must point to an array that has been declared using the CMD_XXXX
- ** macros, or using the ENDOFARGS (and optionally STARTOFARGS) macro.
- **
- ! ** ^SIDE-EFFECTS:
- ** Modifies the parse-flags of <cmd> is $PARSECNTL is non-null & non-empty.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1339,1345 ****
- ** <cmd> should be an array of ARGDESCs declared using the CMD_XXXX macros
- ** or with the ENDOFARGS (and possible STARTOFARGS) macros.
- **
- ! ** ^SIDE-EFECTS:
- ** Any matched arguments have their ARGDESCs modified accordingly.
- ** Also, the command-state is changed to reflect the fact that the
- ** environment variable has been parsed. Also, after parsing the
- --- 1339,1345 ----
- ** <cmd> should be an array of ARGDESCs declared using the CMD_XXXX macros
- ** or with the ENDOFARGS (and possible STARTOFARGS) macros.
- **
- ! ** ^SIDE-EFFECTS:
- ** Any matched arguments have their ARGDESCs modified accordingly.
- ** Also, the command-state is changed to reflect the fact that the
- ** environment variable has been parsed. Also, after parsing the
- ***************
- *** 1375,1385 ****
- --- 1375,1390 ----
-
- if ( !CMD_isINIT(cmd) ) init_args( cmd );
-
- + /* if ignoring the <CMD>_ARGS variable then just return */
- if ( BTEST(cmd_state(cmd), ps_NOCMDENV) ) return;
-
- + /* build the name of the environment variable */
- strucpy( env_name, ProgName );
- strcat( env_name, ENV_SUFFIX );
-
- + /* get the value of the environment variable,
- + ** split it up into tokens, and parse it.
- + */
- env_args = getenv(env_name);
- if ( env_args ) {
- char **argv = (char **)NULL;
- ***************
- *** 1402,1407 ****
- --- 1407,1413 ----
- cmd_prev(cmd) = ARGDESCNULL;
- #endif
-
- + /* check for errors */
- if ( rc && !BTEST(cmd_flags(cmd), pa_IGNORE) ) {
- eprintf( "%s: syntax-error in %s \"%s\".\n",
- ProgName, USER_VARIABLE, env_name );
- ***************
- *** 1444,1450 ****
- ** <argdp> should point to an array of ARGDESCs declared using the CMD_XXXX
- ** macros or with the ENDOFARGS (and possible STARTOFARGS) macros.
- **
- ! ** ^SIDE-EFECTS:
- ** Initialize argd and parses any default arguments.
- **
- ** ^RETURN-VALUE:
- --- 1450,1456 ----
- ** <argdp> should point to an array of ARGDESCs declared using the CMD_XXXX
- ** macros or with the ENDOFARGS (and possible STARTOFARGS) macros.
- **
- ! ** ^SIDE-EFFECTS:
- ** Initialize argd and parses any default arguments.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1526,1532 ****
- ** <argd> should be an array of ARGDESCs declared using the CMD_XXXX macros
- ** or with the ENDOFARGS (and possible STARTOFARGS) macros.
- **
- ! ** ^SIDE-EFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- --- 1532,1538 ----
- ** <argd> should be an array of ARGDESCs declared using the CMD_XXXX macros
- ** or with the ENDOFARGS (and possible STARTOFARGS) macros.
- **
- ! ** ^SIDE-EFFECTS:
- ** Prints on stderr.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1615,1621 ****
- ** If mode is READ or READ+WRITE then the last argument should be the
- ** address of the desired object, otherwise it should be the object itself.
- **
- ! ** ^SIDE-EFECTS:
- ** None if the mode is READ, otherwise, the desired attibutes are (re)set
- **
- ** ^RETURN-VALUE:
- --- 1621,1627 ----
- ** If mode is READ or READ+WRITE then the last argument should be the
- ** address of the desired object, otherwise it should be the object itself.
- **
- ! ** ^SIDE-EFFECTS:
- ** None if the mode is READ, otherwise, the desired attibutes are (re)set
- **
- ** ^RETURN-VALUE:
- ***************
- *** 1690,1696 ****
-
- /* now figure out what to do and go do it! */
- switch( cntl ) {
- ! case pc_ARGFLAGS :
- {
- register ARGDESC *ad, *args;
- char *name = VA_ARG( ap, char * );
- --- 1696,1702 ----
-
- /* now figure out what to do and go do it! */
- switch( cntl ) {
- ! case pc_ARGFLAGS : /* get/set arg-flags */
- {
- register ARGDESC *ad, *args;
- char *name = VA_ARG( ap, char * );
- ***************
- *** 1697,1702 ****
- --- 1703,1709 ----
- int *argflags;
- BOOL is_match = FALSE;
-
- + /* first we have to find the argument whose flags we need */
- for (args = argd ; args && !is_match ; args = cmd_defargs(args)) {
- for (ad = ARG_FIRST(args) ; !ARG_isEND(ad) ; ARG_ADVANCE(ad)) {
- if ( arg_type(ad) == argDummy ) continue;
- ***************
- *** 1713,1718 ****
- --- 1720,1726 ----
- return pe_NOMATCH;
- }
-
- + /* now that we found it - retrieve the argument flags */
- if ( isREADING(mode) ) {
- argflags = VA_ARG( ap, int * );
- *argflags = (int) arg_flags(ad);
- ***************
- *** 1723,1732 ****
- }/*block*/
- break;
-
- ! case pc_PARSEFLAGS :
- {
- int *pflags, flags;
-
- if ( isREADING(mode) ) {
- pflags = VA_ARG( ap, int * );
- flags = (int) cmd_flags(cmd);
- --- 1731,1741 ----
- }/*block*/
- break;
-
- ! case pc_PARSEFLAGS : /* get/set the parse-flags */
- {
- int *pflags, flags;
-
- + /* get value from call-stack (dependent on the mode) */
- if ( isREADING(mode) ) {
- pflags = VA_ARG( ap, int * );
- flags = (int) cmd_flags(cmd);
- ***************
- *** 1736,1750 ****
- pflags = &flags;
- }
-
- if ( isWRITING(mode) ) cmd_flags(cmd) = (argMask_t) *pflags;
- if ( isREADING(mode) ) *pflags = flags;
- }/*block*/
- break;
-
- ! case pc_DEFARGS :
- {
- ARGDESC **pdefargd, *defargd;
-
- if ( isREADING(mode) ) {
- pdefargd = VA_ARG( ap, ARGDESC ** );
- defargd = cmd_defargs(cmd);
- --- 1745,1761 ----
- pflags = &flags;
- }
-
- + /* perform the desired action(s) */
- if ( isWRITING(mode) ) cmd_flags(cmd) = (argMask_t) *pflags;
- if ( isREADING(mode) ) *pflags = flags;
- }/*block*/
- break;
-
- ! case pc_DEFARGS : /* get/set the default arguments */
- {
- ARGDESC **pdefargd, *defargd;
-
- + /* get value from call-stack (dependent on the mode) */
- if ( isREADING(mode) ) {
- pdefargd = VA_ARG( ap, ARGDESC ** );
- defargd = cmd_defargs(cmd);
- ***************
- *** 1773,1784 ****
- }
- break;
-
- ! case pc_NAME :
- ! case pc_PURPOSE :
- ! case pc_DESCRIPTION :
- {
- CONST char *str, **pstr;
-
- if ( isREADING(mode) ) {
- pstr = VA_ARG( ap, CONST char ** );
- if ( cntl == pc_NAME ) str = cmd_name(cmd);
- --- 1784,1796 ----
- }
- break;
-
- ! case pc_NAME : /* get/set name */
- ! case pc_PURPOSE : /* get/set purpose */
- ! case pc_DESCRIPTION : /* get/set description */
- {
- CONST char *str, **pstr;
-
- + /* get value from call-stack (dependent on the mode) */
- if ( isREADING(mode) ) {
- pstr = VA_ARG( ap, CONST char ** );
- if ( cntl == pc_NAME ) str = cmd_name(cmd);
- ***************
- *** 1790,1795 ****
- --- 1802,1808 ----
- pstr = &str;
- }
-
- + /* perform the desired action(s) */
- if ( isWRITING(mode) ) {
- if ( cntl == pc_NAME ) cmd_name(cmd) = *pstr;
- else if ( cntl == pc_PURPOSE ) cmd_purpose(cmd) = *pstr;
- ***************
- *** 1843,1849 ****
- ** ^REQUIREMENTS:
- ** <str> should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFECTS:
- ** <str> is modified by strsplit().
- ** <argd> is modified accordingly as arguments are matched.
- **
- --- 1856,1862 ----
- ** ^REQUIREMENTS:
- ** <str> should be non-NULL and non-empty
- **
- ! ** ^SIDE-EFFECTS:
- ** <str> is modified by strsplit().
- ** <argd> is modified accordingly as arguments are matched.
- **
- ***************
- *** 1937,1943 ****
- ** ^REQUIREMENTS:
- ** <fp> should be non-NULL, already opened-for-reading, file-pointer
- **
- ! ** ^SIDE-EFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
- --- 1950,1956 ----
- ** ^REQUIREMENTS:
- ** <fp> should be non-NULL, already opened-for-reading, file-pointer
- **
- ! ** ^SIDE-EFFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 2069,2075 ****
- ** ^REQUIREMENTS:
- ** <argls> should be an ArgList of strings
- **
- ! ** ^SIDE-EFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
- --- 2082,2088 ----
- ** ^REQUIREMENTS:
- ** <argls> should be an ArgList of strings
- **
- ! ** ^SIDE-EFFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 2118,2126 ****
- --- 2131,2141 ----
- argv[i] = L_STRING(ls);
- }
-
- + /* parse the list */
- saveflags = cmd_flags(argd);
- BSET(cmd_flags(argd), pa_ARGV0);
- rc = parse_argv_style( argv, parse_init( &argd ) );
- + free( argv );
-
- /* scan for missing required arguments */
- if ( SYNTAX_ERROR(rc, argd) ) {
- ***************
- *** 2174,2180 ****
- ** the last argument would appear, then the NULL pointer will end the
- ** the list of arguments and argc is ignored.
- **
- ! ** ^SIDE-EFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
- --- 2189,2195 ----
- ** the last argument would appear, then the NULL pointer will end the
- ** the list of arguments and argc is ignored.
- **
- ! ** ^SIDE-EFFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
- ***************
- *** 2217,2222 ****
- --- 2232,2238 ----
- if ( !argv ) return pe_SYSTEM;
- argv[ argc ] = CHARNULL;
-
- + /* assign the string into the array */
- VA_START(ap, argc);
- for ( i = 0; i < argc && (arg = VA_ARG(ap, char *)) ; i++ ) {
- argv[i] = arg;
- ***************
- *** 2223,2229 ****
- --- 2239,2247 ----
- }
- VA_END(ap);
-
- + /* parse the arguments */
- rc = parse_argv_style( argv, parse_init( &argd ) );
- + free( argv );
-
- /* scan for missing required arguments */
- if ( SYNTAX_ERROR(rc, argd) ) {
- ***************
- *** 2267,2273 ****
- ** ^REQUIREMENTS:
- ** <argv> must be non-NULL and have a NULL pointer as its last item.
- **
- ! ** ^SIDE-EFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
- --- 2285,2291 ----
- ** ^REQUIREMENTS:
- ** <argv> must be non-NULL and have a NULL pointer as its last item.
- **
- ! ** ^SIDE-EFFECTS:
- ** <argd> is modified accordingly as arguments are matched.
- **
- ** ^RETURN-VALUE:
-