home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-08 | 49.2 KB | 1,533 lines |
- *** Intro.OLD Mon Jun 3 11:13:52 1991
- --- Intro Wed May 22 14:47:07 1991
- ***************
- *** 83,89 ****
-
- And before you know it, your command-line had been parsed, all variables
- have been assigned their corresponding values from the command-line, syntax
- ! has been verified, and a usage message (if required) has been printed.
-
- Under UNIX, the command-line syntax (using single character options) for the
- above command would be:
- --- 83,89 ----
-
- And before you know it, your command-line had been parsed, all variables
- have been assigned their corresponding values from the command-line, syntax
- ! have been verified, and a usage message (if required) has been printed.
-
- Under UNIX, the command-line syntax (using single character options) for the
- above command would be:
- ***************
- *** 108,114 ****
- cmdname [/a[=<areacode>]] [/g=<newsgroups>...] [/r=<repcount>]
- [/s=<sepchar>] [/x] <name> [<args>...]
-
- ! The AmigaDOS command-line syntax would be the following:
-
- cmdname [AREA [<areacode>]] [GROUPS <newsgroups>...] [REP <repcount>]
- [SEP <sepchar>] [X] <name> [<args>...]
- --- 108,114 ----
- cmdname [/a[=<areacode>]] [/g=<newsgroups>...] [/r=<repcount>]
- [/s=<sepchar>] [/x] <name> [<args>...]
-
- ! The AmigaDOS command-line syntax would be the following:
-
- cmdname [AREA [<areacode>]] [GROUPS <newsgroups>...] [REP <repcount>]
- [SEP <sepchar>] [X] <name> [<args>...]
- *** README.OLD Mon Jun 3 11:14:12 1991
- --- README Wed May 22 14:56:09 1991
- ***************
- *** 290,295 ****
- --- 290,296 ----
- I also added the capability to handle ARGVEC arguments into the
- remaining argument type functions.
-
- +
- NEW ARGUMENT FLAGS:
- ===================
- I added the following argument flags to parseargs:
- ***************
- *** 306,311 ****
- --- 307,313 ----
-
- Consult the manual page for parseargs(1) & parseargs(3) for more information.
-
- +
- NEW INTERFACE
- =============
- I added a set of Macros to allow a more "self documenting" approach to
- ***************
- *** 336,341 ****
- --- 338,344 ----
- variable. See the parseargs(3) and parseargs(1) manual pages for more
- information regarding USAGECNTL.
-
- +
- SPECIFYING ALTERNATE PARSING BEHAVIOR
- =====================================
- Parseargs provides 3 methods for controlling "how" the command-line is
- ***************
- *** 351,356 ****
- --- 354,360 ----
- See the manual pages for parseargs(1), parseargs(3), and parsecntl(3)
- for more information.
-
- +
- GIVING DEFAULT ARGUMENTS
- ========================
- Programs that use parseargs may be given default arguments under UNIX
- ***************
- *** 379,389 ****
- relatively easy to add new shell-types. At this point in time, parseargs
- will generate output for the following command-interpreters:
-
- ! sh (Bourne Shell)
- ! csh/tcsh (C-Shell)
- ! bash (Bourne-Again Shell)
- ! ksh (Korn Shell)
- ! rc (Plan 9 Shell)
- perl
- awk
-
- --- 383,394 ----
- relatively easy to add new shell-types. At this point in time, parseargs
- will generate output for the following command-interpreters:
-
- ! sh (Bourne Shell)
- ! csh/tcsh/itcsh (C-Shell)
- ! bash (Bourne-Again Shell)
- ! ksh (Korn Shell)
- ! rc (Plan 9 Shell)
- ! zsh (Z shell)
- perl
- awk
-
- *** amiga_args.c.OLD Mon Jun 3 11:14:17 1991
- --- amiga_args.c Mon May 13 13:44:24 1991
- ***************
- *** 144,150 ****
- BSET( arg_flags(cmd_prev(cmd)), ARGGIVEN );
- }
- else { /* value was required */
- ! (VOID)get_keyword( arg_sname(cmd_prev(cmd)), keyword );
- usrerr( "value required for %s keyword", keyword );
- parse_error = pe_SYNTAX;
- }
- --- 144,150 ----
- BSET( arg_flags(cmd_prev(cmd)), ARGGIVEN );
- }
- else { /* value was required */
- ! (VOID)get_kwdname( arg_sname(cmd_prev(cmd)), keyword );
- usrerr( "value required for %s keyword", keyword );
- parse_error = pe_SYNTAX;
- }
- ***************
- *** 310,316 ****
- BSET( arg_flags(cmd_prev(cmd)), ARGGIVEN );
- }
- else { /* value was required */
- ! (VOID)get_keyword( arg_sname(cmd_prev(cmd)), keyword );
- usrerr( "value required for %s keyword", keyword );
- parse_error = pe_SYNTAX;
- }
- --- 310,316 ----
- BSET( arg_flags(cmd_prev(cmd)), ARGGIVEN );
- }
- else { /* value was required */
- ! (VOID)get_kwdname( arg_sname(cmd_prev(cmd)), keyword );
- usrerr( "value required for %s keyword", keyword );
- parse_error = pe_SYNTAX;
- }
- ***************
- *** 366,378 ****
- char * pos;
- argName_t keyword, name;
-
- ! (VOID) get_name(arg_sname(ad), name);
-
- if ( ARG_isPOSITIONAL(ad) ) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_keyword(arg_sname(ad), keyword);
- (VOID) strcpy( buf, keyword );
- pos = buf + strlen(buf);
-
- --- 366,378 ----
- char * pos;
- argName_t keyword, name;
-
- ! (VOID) get_argname(arg_sname(ad), name);
-
- if ( ARG_isPOSITIONAL(ad) ) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_kwdname(arg_sname(ad), keyword);
- (VOID) strcpy( buf, keyword );
- pos = buf + strlen(buf);
-
- *** arglist.c.OLD Mon Jun 3 11:14:22 1991
- --- arglist.c Mon May 13 13:44:24 1991
- ***************
- *** 94,100 ****
- ArgListHead *nl;
- ArgList *nd;
-
- ! (VOID) get_name( arg_sname(ad), argname );
- if (copyf) {
- register int i;
-
- --- 94,100 ----
- ArgListHead *nl;
- ArgList *nd;
-
- ! (VOID) get_argname( arg_sname(ad), argname );
- if (copyf) {
- register int i;
-
- *** argtype.c.OLD Mon Jun 3 11:14:26 1991
- --- argtype.c Mon May 13 13:44:25 1991
- ***************
- *** 202,208 ****
- char *cp;
- argName_t argname;
-
- ! (VOID) get_name( arg_sname(ad), argname );
- if (copyf) {
- register int i;
-
- --- 202,208 ----
- char *cp;
- argName_t argname;
-
- ! (VOID) get_argname( arg_sname(ad), argname );
- if (copyf) {
- register int i;
-
- ***************
- *** 270,276 ****
- int status = FALSE;
- char c;
-
- ! (VOID) get_name( arg_sname(ad), argname );
- if (!vp || !*vp) {
- status = FALSE;
- }
- --- 270,276 ----
- int status = FALSE;
- char c;
-
- ! (VOID) get_argname( arg_sname(ad), argname );
- if (!vp || !*vp) {
- status = FALSE;
- }
- ***************
- *** 340,346 ****
- argName_t argname; \
- num_t value; \
- \
- ! (VOID) get_name( arg_sname(ad), argname ); \
- value = (num_t) strtol(vp, &vpp, 0); \
- if (*vpp != '\0') { \
- usrerr("invalid integer argument '%s' for %s", vp, argname); \
- --- 340,346 ----
- argName_t argname; \
- num_t value; \
- \
- ! (VOID) get_argname( arg_sname(ad), argname ); \
- value = (num_t) strtol(vp, &vpp, 0); \
- if (*vpp != '\0') { \
- usrerr("invalid integer argument '%s' for %s", vp, argname); \
- ***************
- *** 401,407 ****
- argName_t argname; \
- dec_t value; \
- \
- ! (VOID) get_name( arg_sname(ad), argname ); \
- value = (dec_t) strtod(vp, &vpp); \
- if (*vpp != '\0') { \
- usrerr("invalid decimal argument '%s' for %s", vp, argname); \
- --- 401,407 ----
- argName_t argname; \
- dec_t value; \
- \
- ! (VOID) get_argname( arg_sname(ad), argname ); \
- value = (dec_t) strtod(vp, &vpp); \
- if (*vpp != '\0') { \
- usrerr("invalid decimal argument '%s' for %s", vp, argname); \
- ***************
- *** 504,510 ****
- argName_t argname;
- int len;
-
- ! (VOID) get_name( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- --- 504,510 ----
- argName_t argname;
- int len;
-
- ! (VOID) get_argname( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- ***************
- *** 574,580 ****
- argName_t argname;
- BOOL retval;
-
- ! (VOID) get_name( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- --- 574,580 ----
- argName_t argname;
- BOOL retval;
-
- ! (VOID) get_argname( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- ***************
- *** 596,602 ****
- argName_t argname;
- BOOL retval;
-
- ! (VOID) get_name( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- --- 596,602 ----
- argName_t argname;
- BOOL retval;
-
- ! (VOID) get_argname( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- ***************
- *** 618,624 ****
- argName_t argname;
- BOOL retval;
-
- ! (VOID) get_name( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- --- 618,624 ----
- argName_t argname;
- BOOL retval;
-
- ! (VOID) get_argname( arg_sname(ad), argname );
-
- /* ARGVECs are not supported for this Boolean arg-types */
- if ( ARG_isVEC(ad) )
- *** doc/Makefile.OLD Mon Jun 3 11:14:32 1991
- --- doc/Makefile Tue May 14 14:38:21 1991
- ***************
- *** 144,150 ****
- clobber: clean
- ${DEL} *.txt
-
- ! spell: ${INCS} ${SRCS}}
- ${SPELL} ${SPELLFLAGS} ${INCS} ${SRCS}
-
- print: ${MANFILES} ${INCS}
- --- 144,150 ----
- clobber: clean
- ${DEL} *.txt
-
- ! spell: ${INCS} ${SRCS}
- ${SPELL} ${SPELLFLAGS} ${INCS} ${SRCS}
-
- print: ${MANFILES} ${INCS}
- *** doc/argdesc.inc.OLD Mon Jun 3 11:14:40 1991
- --- doc/argdesc.inc Sat May 11 12:17:40 1991
- ***************
- *** 49,57 ****
- description (the description must be separated from the long-name by
- at least one whitespace character and may optionally be enclosed in
- a set of balanced delimiters (such as parentheses, curly-braces,
- ! square-brackets, or angle-brackets). If the long-name contains any
- uppercase characters, then the substring of long-name consisting of
- ! all uppercase characters is used as the argument keyword and the entire
- ! long-name is used as the name of the argument (if a value may be
- ! supplied). The long-name may be matched by supplying a unique prefix
- ! of either the argument keyword or the argument name.
- --- 49,63 ----
- description (the description must be separated from the long-name by
- at least one whitespace character and may optionally be enclosed in
- a set of balanced delimiters (such as parentheses, curly-braces,
- ! square-brackets, or angle-brackets). The longname may be specifed
- ! in two parts: a keyword name and an argument name. The argument
- ! name may be separated from the keyword name by a single equal sign
- ! (`='). No whitespace is allowed before or after the equal sign.
- !
- ! Alternatatively, the keyword name may be distinguished from the
- ! argument name by character case: if the long-name contains any
- uppercase characters, then the substring of long-name consisting of
- ! all uppercase characters is used as the argument keyword and the
- ! entire long-name is used as the name of the argument (if a value may
- ! be supplied). The long-name may be matched by supplying a unique
- ! prefix of either the argument keyword or the argument name.
- *** doc/parseargs.man1.OLD Mon Jun 3 11:15:49 1991
- --- doc/parseargs.man1 Sat May 11 12:20:43 1991
- ***************
- *** 158,163 ****
- --- 158,176 ----
- and printed in usage messages. This string may be followed by a
- textual description that is enclosed in parentheses, square brackets,
- curly braces, or angle brackets.
- +
- + The prompt-string may be specifed
- + in two parts: a keyword name and an argument name. The argument
- + name may be separated from the keyword name by a single equal sign
- + ('='). No whitespace is allowed before or after the equal sign.
- +
- + Alternatatively, the keyword name may be distinguished from the
- + argument name by character case: if the long-name contains any
- + uppercase characters, then the substring of long-name consisting of
- + all uppercase characters is used as the argument keyword and the
- + entire long-name is used as the name of the argument (if a value may
- + be supplied). The long-name may be matched by supplying a unique
- + prefix of either the argument keyword or the argument name.
- .PP
- The argument specification string must be terminated by the single string:
- ``ENDOFARGS''.
- *** doc/returns.inc.OLD Mon Jun 3 11:16:33 1991
- --- doc/returns.inc Mon May 20 17:36:20 1991
- ***************
- *** 28,35 ****
- .IP "\fIpe_\s-1NOMATCH\s+1\fP"
- Unable to match the named argument. This occurs
- when the argument keyword name passed to \fIparsecntl\fP (using the
- ! \fIpc_\s-1ARGFLAGS\s+1\fP functions code) was found in the given argdesc-array
- ! or in its default-list.
- .\"---------------------------------------------
- .IP "\fIpe_\s-1BADMODE\s+1\fP"
- Bad mode for given command in \fIparsecntl\fP. This occurs when
- --- 28,35 ----
- .IP "\fIpe_\s-1NOMATCH\s+1\fP"
- Unable to match the named argument. This occurs
- when the argument keyword name passed to \fIparsecntl\fP (using the
- ! \fIpc_\s-1ARGFLAGS\s+1\fP functions code) was NOT found in the given
- ! argdesc-array or in its default-list.
- .\"---------------------------------------------
- .IP "\fIpe_\s-1BADMODE\s+1\fP"
- Bad mode for given command in \fIparsecntl\fP. This occurs when
- *** ibm_args.c.OLD Mon Jun 3 11:17:03 1991
- --- ibm_args.c Mon May 13 13:44:26 1991
- ***************
- *** 301,307 ****
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_keyword( arg_sname(ad), name );
- usrerr("%c%s switch requires an argument", KwdPrefix, name);
- arg_flags(ad) = flags;
- parse_error = pe_SYNTAX;
- --- 301,307 ----
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_kwdname( arg_sname(ad), name );
- usrerr("%c%s switch requires an argument", KwdPrefix, name);
- arg_flags(ad) = flags;
- parse_error = pe_SYNTAX;
- ***************
- *** 429,435 ****
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_name(arg_sname(ad), name);
- usrerr( "%s required for %c%c flag",
- name, OptPrefix, arg_cname(ad) );
- arg_flags(ad) = flags;
- --- 429,435 ----
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_argname(arg_sname(ad), name);
- usrerr( "%s required for %c%c flag",
- name, OptPrefix, arg_cname(ad) );
- arg_flags(ad) = flags;
- ***************
- *** 585,597 ****
- char *pos;
- argName_t name, keyword;
-
- ! (VOID) get_name( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_keyword( arg_sname(ad), keyword );
-
- if ( isupper(arg_cname(ad)) && toupper(*keyword) == arg_cname(ad) ) {
- *keyword = toupper(*keyword);
- --- 585,597 ----
- char *pos;
- argName_t name, keyword;
-
- ! (VOID) get_argname( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_kwdname( arg_sname(ad), keyword );
-
- if ( isupper(arg_cname(ad)) && toupper(*keyword) == arg_cname(ad) ) {
- *keyword = toupper(*keyword);
- *** parseargs.awk.OLD Mon Jun 3 11:17:09 1991
- --- parseargs.awk Wed May 15 10:03:26 1991
- ***************
- *** 40,46 ****
- ## The following global variables may be assigned before calling parseargs:
- ##
- ## PROGNAME -- name of the current awk script (default= ARGV[0])
- ! ## PARSEOPTS -- any extra options to pass toi parseargs() (default="-ul")
- ## PARSEINPUT -- input file for parseargs(1) (default=unique-name)
- ## PARSEOUTPUT -- output file for parseargs(1) (default=unique-name)
- ##
- --- 40,46 ----
- ## The following global variables may be assigned before calling parseargs:
- ##
- ## PROGNAME -- name of the current awk script (default= ARGV[0])
- ! ## PARSEOPTS -- any extra options to pass to parseargs() (default="-ul")
- ## PARSEINPUT -- input file for parseargs(1) (default=unique-name)
- ## PARSEOUTPUT -- output file for parseargs(1) (default=unique-name)
- ##
- *** parseargs.c.OLD Mon Jun 3 11:17:16 1991
- --- parseargs.c Thu May 16 16:51:21 1991
- ***************
- *** 1092,1098 ****
- #endif
- {
- int i;
- ! register char *sh = sh_str;
-
- /* special case to recognize tcsh & itcsh */
- if ( strEQ( sh, "tcsh" ) ) ++sh;
- --- 1092,1098 ----
- #endif
- {
- int i;
- ! register CONST char *sh = sh_str;
-
- /* special case to recognize tcsh & itcsh */
- if ( strEQ( sh, "tcsh" ) ) ++sh;
- *** parseargs.h.OLD Mon Jun 3 11:17:24 1991
- --- parseargs.h Mon May 20 17:35:46 1991
- ***************
- *** 97,103 ****
- ** description (the description must be separated from the long-name by
- ** at least one whitespace character and may optionally be enclosed in
- ** a set of balanced delimiters (such as parentheses, curly-braces,
- ! ** square-brackets, or angle-brackets). If the long-name contains any
- ** uppercase characters, then the substring of long-name consisting of
- ** all uppercase characters is used as the argument keyword and the
- ** entire long-name is used as the name of the argument (if a value may
- --- 97,108 ----
- ** description (the description must be separated from the long-name by
- ** at least one whitespace character and may optionally be enclosed in
- ** a set of balanced delimiters (such as parentheses, curly-braces,
- ! ** square-brackets, or angle-brackets). The longname may be specifed
- ! ** in two parts: a keyword name and an argument name. The argument
- ! ** name may be separated from the keyword name by a single equal sign
- ! ** ('='). No whitespace is allowed before or after the equal sign.
- ! ** Alternatatively, the keyword name may be distinguished from the
- ! ** argument name by character case: if the long-name contains any
- ** uppercase characters, then the substring of long-name consisting of
- ** all uppercase characters is used as the argument keyword and the
- ** entire long-name is used as the name of the argument (if a value may
- ***************
- *** 140,146 ****
- #define pe_NOMATCH 3
- /* -- unable to match the named argument. This occurs
- ** when the argument keyword name passed to parsecntl() (using the
- ! ** pc_ARGFLAGS functions code) was found in the given argdesc-array
- ** or in its default-list.
- */
- #define pe_BADMODE 4
- --- 145,151 ----
- #define pe_NOMATCH 3
- /* -- unable to match the named argument. This occurs
- ** when the argument keyword name passed to parsecntl() (using the
- ! ** pc_ARGFLAGS function code) was NOT found in the given argdesc-array
- ** or in its default-list.
- */
- #define pe_BADMODE 4
- *** parseargs.pl.OLD Mon Jun 3 11:17:30 1991
- --- parseargs.pl Wed May 15 10:02:06 1991
- ***************
- *** 39,45 ****
- ;# The global variable PARSEARGS will contain the command-line used to
- ;# invoke parseargs(1).
- ;#
- ! ;# ARGV and ARGC may be reset, all other values are (re)set in <arr>.
- ;#
- ;# ^RETURN-VALUE:
- ;# The exit code returned by parseargs(1).
- --- 39,45 ----
- ;# The global variable PARSEARGS will contain the command-line used to
- ;# invoke parseargs(1).
- ;#
- ! ;# ARGV and (and any other variables named in <argd>) may be overwritten.
- ;#
- ;# ^RETURN-VALUE:
- ;# The exit code returned by parseargs(1).
- *** patchlevel.h.OLD Mon Jun 3 11:17:35 1991
- --- patchlevel.h Mon Jun 3 10:35:24 1991
- ***************
- *** 2,7 ****
- --- 2,21 ----
- ** ^FILE: patchlevel.h - current patchlevel for parseargs
- **
- ** ^HISTORY:
- + ** 05/11/91 Brad Appleton <brad@ssd.csd.harris.com>
- + ** Patch06
- + ** - parsecntl(3) now correctly handles mispelled keywords for the
- + ** pc_ARGFLAGS request (it was looping forever).
- + ** - fixed an error in the documentation (a "NOT" was omitted).
- + ** - added #ifdef SVR4 stuff to unix_man.c to print System V Release 4
- + ** style manual pages.
- + ** - allowed "sname=aname" syntax in the ad_prompt field of an ARGDESC
- + ** in addition to the existing syntax. This new syntax allows argument
- + ** names to be be completely different from keyword names.
- + ** - changed get_name() & get_keyword to get_argname() & get_kwdname()
- + ** (respectively) in strfuncs.[ch]. Also sped up the algorithm to get
- + ** the keyword (since it no longer needs malloc).
- + **
- ** 04/25/91 Brad Appleton <brad@ssd.csd.harris.com>
- ** Patch05
- ** - documented support for zsh in parseargs(1)
- ***************
- *** 66,72 ****
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 5
-
- #ifdef __STDC__
- static const char
- --- 80,86 ----
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 6
-
- #ifdef __STDC__
- static const char
- ***************
- *** 73,76 ****
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 5";
- --- 87,90 ----
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 6";
- *** stest.c.OLD Mon Jun 3 11:17:47 1991
- --- stest.c Mon Jun 3 10:34:00 1991
- ***************
- *** 115,121 ****
- 'n', ARGREQ|ARGPOS, argStr, __ &Name, "name (name to look for)",
- 's', ARGVALOPT, argStr, __ &Str, "STRing (optional string to use)",
- 'g', ARGVEC, argStr, __ &Groups, "newsGROUPS (newsgroups to test)",
- ! 'c', ARGOPT, argInt, __ &RepCount, "REPcount (repeat count per group)",
- 'd', ARGOPT, argStr, __ &DirName, "DIRname (work directory)",
- 'i', ARGVEC, argInt, __ &Integers, "INTegerS (vector of numbers)",
- '#', ARGHIDDEN, argBool, __ &XRated, "XratedMODE (naughty! naughty!)",
- --- 115,121 ----
- 'n', ARGREQ|ARGPOS, argStr, __ &Name, "name (name to look for)",
- 's', ARGVALOPT, argStr, __ &Str, "STRing (optional string to use)",
- 'g', ARGVEC, argStr, __ &Groups, "newsGROUPS (newsgroups to test)",
- ! 'c', ARGOPT, argInt, __ &RepCount, "REP=count (repeat count per group)",
- 'd', ARGOPT, argStr, __ &DirName, "DIRname (work directory)",
- 'i', ARGVEC, argInt, __ &Integers, "INTegerS (vector of numbers)",
- '#', ARGHIDDEN, argBool, __ &XRated, "XratedMODE (naughty! naughty!)",
- ***************
- *** 124,130 ****
- 'y', ARGOPT, argUBool, __ &YFlag, "Yflag (unset Y flag)",
- 'z', ARGOPT, argTBool, __ &ZFlag, "Zflag (toggle Z flag)",
-
- ! 't', ARGOPT, argChar, __ &TabChar, "TABchar (field delimiter)",
- 'r', ARGNOVAL, argMine, __ NULL, "raw (trigger raw-mode \
- before processing any more arguments on the command-line)",
-
- --- 124,130 ----
- 'y', ARGOPT, argUBool, __ &YFlag, "Yflag (unset Y flag)",
- 'z', ARGOPT, argTBool, __ &ZFlag, "Zflag (toggle Z flag)",
-
- ! 't', ARGOPT, argChar, __ &TabChar, "TAB=char (field delimiter)",
- 'r', ARGNOVAL, argMine, __ NULL, "raw (trigger raw-mode \
- before processing any more arguments on the command-line)",
-
- ***************
- *** 143,149 ****
- 'n', ARGREQ|ARGPOS, argStr, __ &Name, "name (name to look for)",
- 's', ARGVALOPT, argStr, __ &Str, "STRing (optional string to use)",
- 'g', ARGVEC, argStr, __ &Groups, "newsGROUPS (newsgroups to test)",
- ! 'c', ARGOPT, argInt, __ &RepCount, "REPcount (repeat count per group)",
- 'd', ARGOPT, argStr, __ &DirName, "DIRname (work directory)",
- 'i', ARGVEC, argInt, __ &Integers, "INTegerS (vector of numbers)",
- '#', ARGHIDDEN, argBool, __ &XRated, "XratedMODE (naughty! naughty!)",
- --- 143,149 ----
- 'n', ARGREQ|ARGPOS, argStr, __ &Name, "name (name to look for)",
- 's', ARGVALOPT, argStr, __ &Str, "STRing (optional string to use)",
- 'g', ARGVEC, argStr, __ &Groups, "newsGROUPS (newsgroups to test)",
- ! 'c', ARGOPT, argInt, __ &RepCount, "REP=count (repeat count per group)",
- 'd', ARGOPT, argStr, __ &DirName, "DIRname (work directory)",
- 'i', ARGVEC, argInt, __ &Integers, "INTegerS (vector of numbers)",
- '#', ARGHIDDEN, argBool, __ &XRated, "XratedMODE (naughty! naughty!)",
- ***************
- *** 152,158 ****
- 'y', ARGOPT, argUBool, __ &YFlag, "Yflag (unset Y flag)",
- 'z', ARGOPT, argTBool, __ &ZFlag, "Zflag (toggle Z flag)",
-
- ! 't', ARGOPT, argChar, __ &TabChar, "TABchar (field delimiter)",
- 'r', ARGNOVAL, argMine, __ NULL, "raw (trigger raw-mode \
- before processing any more arguments on the command-line)",
-
- --- 152,158 ----
- 'y', ARGOPT, argUBool, __ &YFlag, "Yflag (unset Y flag)",
- 'z', ARGOPT, argTBool, __ &ZFlag, "Zflag (toggle Z flag)",
-
- ! 't', ARGOPT, argChar, __ &TabChar, "TAB=char (field delimiter)",
- 'r', ARGNOVAL, argMine, __ NULL, "raw (trigger raw-mode \
- before processing any more arguments on the command-line)",
-
- ***************
- *** 258,264 ****
- printf( "XRated=%d, Raw-Mode = \"%s\"\n", XRated, Mode );
-
- /* to call parsecntl() to see if the optional value was supplied */
- ! (VOID) parsecntl( (ARGDESC *)argd, pc_ARGFLAGS, pc_READ, "string", &flags);
-
- if ( BTEST(flags, ARGGIVEN) && !BTEST(flags, ARGVALGIVEN) ) {
- printf("String=!No Value Given on CmdLine!\n" );
- --- 258,264 ----
- printf( "XRated=%d, Raw-Mode = \"%s\"\n", XRated, Mode );
-
- /* to call parsecntl() to see if the optional value was supplied */
- ! i = parsecntl( (ARGDESC *)argd, pc_ARGFLAGS, pc_READ, "string", &flags);
-
- if ( BTEST(flags, ARGGIVEN) && !BTEST(flags, ARGVALGIVEN) ) {
- printf("String=!No Value Given on CmdLine!\n" );
- *** strfuncs.c.OLD Mon Jun 3 11:17:52 1991
- --- strfuncs.c Wed May 15 14:33:16 1991
- ***************
- *** 23,30 ****
- ** strtrim() -- trim leading and trailing characters in a string
- ** strsplit() -- split a string up into a vector of tokens
- ** strjoin() -- join a vector of tokens into a single string
- ! ** get_name() -- return the aname (argument-name) of an argument
- ! ** get_keyword() -- return the sname (keyword-name) of an argument
- ** match() -- match two keywords (case insensitive) upto a unique prefix
- ** basename() -- remove the leading directories (and disks) from a path
- ** indent_para() -- print an indented hanging paragraph
- --- 23,30 ----
- ** strtrim() -- trim leading and trailing characters in a string
- ** strsplit() -- split a string up into a vector of tokens
- ** strjoin() -- join a vector of tokens into a single string
- ! ** get_argname() -- return the aname (argument-name) of an argument
- ! ** get_kwdname() -- return the sname (keyword-name) of an argument
- ** match() -- match two keywords (case insensitive) upto a unique prefix
- ** basename() -- remove the leading directories (and disks) from a path
- ** indent_para() -- print an indented hanging paragraph
- ***************
- *** 47,57 ****
-
- static CONST char WhiteSpace[] = " \t\n\r\v\f";
-
- !
- #if ( defined(unix_style) || defined(ibm_style) )
- # define TO_KWDCASE(c) TOLOWER(c)
- #else
- # define TO_KWDCASE(c) TOUPPER(c)
- #endif
-
-
- --- 47,59 ----
-
- static CONST char WhiteSpace[] = " \t\n\r\v\f";
-
- ! #define c_ARG_SEP '='
- #if ( defined(unix_style) || defined(ibm_style) )
- # define TO_KWDCASE(c) TOLOWER(c)
- + # define KWDCASECOPY(dest,src) strlcpy(dest,src)
- #else
- # define TO_KWDCASE(c) TOUPPER(c)
- + # define KWDCASECOPY(dest,src) strucpy(dest,src)
- #endif
-
-
- ***************
- *** 746,757 ****
-
-
- /***************************************************************************
- ! ** ^FUNCTION: get_name - return the aname (argument-name) of an argument
- **
- ** ^SYNOPSIS:
- */
- #ifndef __ANSI_C__
- ! char *get_name( s, buf )
- /*
- ** ^PARAMETERS:
- */
- --- 748,759 ----
-
-
- /***************************************************************************
- ! ** ^FUNCTION: get_argname - return the aname (argument-name) of an argument
- **
- ** ^SYNOPSIS:
- */
- #ifndef __ANSI_C__
- ! char *get_argname( s, buf )
- /*
- ** ^PARAMETERS:
- */
- ***************
- *** 764,770 ****
- #endif /* !__ANSI_C__ */
-
- /* ^DESCRIPTION:
- ! ** Get_name will get the full argument name of the given argument
- ** (not just the keyword name) and copy it to buf.
- **
- ** ^REQUIREMENTS:
- --- 766,772 ----
- #endif /* !__ANSI_C__ */
-
- /* ^DESCRIPTION:
- ! ** Get_argname will get the full argument name of the given argument
- ** (not just the keyword name) and copy it to buf.
- **
- ** ^REQUIREMENTS:
- ***************
- *** 782,803 ****
- ** and copy the result in the given buffer
- ***^^**********************************************************************/
- #ifdef __ANSI_C__
- ! char *get_name( const char *s, char *buf )
- #endif
- {
- ! /* <buf> must be large enough to hold the result! */
- ! strlcpy(buf, s);
- return buf;
- }
-
-
- /***************************************************************************
- ! ** ^FUNCTION: get_keyword - get the sname (keyword name) of an argument
- **
- ** ^SYNOPSIS:
- */
- #ifndef __ANSI_C__
- ! char *get_keyword( s, buf )
- /*
- ** ^PARAMETERS:
- */
- --- 784,815 ----
- ** and copy the result in the given buffer
- ***^^**********************************************************************/
- #ifdef __ANSI_C__
- ! char *get_argname( const char *s, char *buf )
- #endif
- {
- ! register CONST char *p1 = s, *p2;
- !
- ! /* see if sname and aname are separated by c_ARG_SEP
- ! ** <buf> must be large enough to hold the result!
- ! */
- ! p2 = strchr( p1, c_ARG_SEP );
- ! if ( p2 ) {
- ! strlcpy( buf, ++p2 );
- ! }
- ! else {
- ! strlcpy(buf, s);
- ! }
- return buf;
- }
-
-
- /***************************************************************************
- ! ** ^FUNCTION: get_kwdname - get the sname (keyword name) of an argument
- **
- ** ^SYNOPSIS:
- */
- #ifndef __ANSI_C__
- ! char *get_kwdname( s, buf )
- /*
- ** ^PARAMETERS:
- */
- ***************
- *** 810,816 ****
- #endif /* !__ANSI_C__ */
-
- /* ^DESCRIPTION:
- ! ** Get_name will get the keyword name of the given argument
- ** (not the entire argument name) and copy it to buf.
- **
- ** The sname (keyword-name) consists only of all uppercase characters
- --- 822,828 ----
- #endif /* !__ANSI_C__ */
-
- /* ^DESCRIPTION:
- ! ** Get_kwdname will get the keyword name of the given argument
- ** (not the entire argument name) and copy it to buf.
- **
- ** The sname (keyword-name) consists only of all uppercase characters
- ***************
- *** 833,877 ****
- ** and copy the result in the given buffer
- ***^^**********************************************************************/
- #ifdef __ANSI_C__
- ! char *get_keyword( const char *s, char *buf )
- #endif
- {
- ! register char *p1 = (char *)s, *p2;
- ! register int i, len = 0;
- ! char *caps = CHARNULL;
-
- if ( !p1 ) return CHARNULL;
-
- ! /* find size to copy (use all caps if possible) */
- ! for ( p1 = (char *)s ; *p1 ; p1++ ) {
- ! if ( !caps && isupper( *p1 ) ) caps = p1;
- ! if ( caps && isupper( *p1 ) ) ++len;
- }
- - if ( !caps ) len = (int) (p1 - (char *)s);
-
- /* copy string into buffer and convert it to desired case */
- /* <buf> must be large enough to hold the result! */
- ! p1 = buf;
- ! if ( len ) {
- ! if ( !caps ) {
- ! for ( p1 = buf, p2 = (char *)s, i = 0 ; i < len ; p1++, p2++, i++ ) {
- ! *p1 = TO_KWDCASE(*p2);
- ! }
- ! }/*if*/
-
- - else {
- - for ( p2 = caps, i = 0 ; i < len ; p2++ ) {
- - if ( isupper( *p2 ) ) {
- - *(p1++) = TO_KWDCASE(*p2);
- - ++i;
- - }
- - }/*for*/
- - }/*else*/
- - }/*if*/
- - *p1 = '\0';
- -
- return buf; /* return buffer address */
- }
- #ifndef amiga_style
-
- /***************************************************************************
- --- 845,887 ----
- ** and copy the result in the given buffer
- ***^^**********************************************************************/
- #ifdef __ANSI_C__
- ! char *get_kwdname( const char *s, char *buf )
- #endif
- {
- ! register char *p1 = (char *)s, *p2, ch;
- ! BOOL caps = FALSE;
-
- if ( !p1 ) return CHARNULL;
-
- ! /* see if sname and aname are separated by c_ARG_SEP */
- ! p2 = strchr( p1, c_ARG_SEP );
- ! if ( p2 ) {
- ! ch = *p2;
- ! *p2 = '\0';
- ! KWDCASECOPY( buf, p1 );
- ! *p2 = ch;
- ! return buf;
- }
-
- /* copy string into buffer and convert it to desired case */
- /* <buf> must be large enough to hold the result! */
- ! for ( p2 = buf; *p1 ; p1++ ) {
- ! if ( isupper(*p1) ) {
- ! if ( !caps ) {
- ! caps = TRUE;
- ! p2 = buf;
- ! }
- ! *p2++ = TO_KWDCASE(*p1);
- ! }
- ! else if ( !caps ) {
- ! *p2++ = TO_KWDCASE(*p1);
- ! }
- ! }
- ! *p2 = '\0';
-
- return buf; /* return buffer address */
- }
- +
- #ifndef amiga_style
-
- /***************************************************************************
- ***************
- *** 928,945 ****
- #endif
- {
- int i, clen, tlen, too_short=0;
- ! CONST char *full_targ;
- ! char *up_targ;
-
-
- ! full_targ = target;
-
- - /* make up_targ the uppercase portion of target */
- - up_targ = strdup( full_targ );
- - (VOID) get_keyword( full_targ, up_targ );
- -
- /* match at least MINLEN characters if possible */
- ! tlen = strlen( up_targ );
- clen = strlen( candidate );
- if ( (tlen >= MINLEN) && (clen < MINLEN) ) {
- ++too_short; /* not long enough -- no match */
- --- 938,951 ----
- #endif
- {
- int i, clen, tlen, too_short=0;
- ! char arg_targ[ 256 ], kwd_targ[ 256 ];
-
-
- ! /* make kwd_targ the keyword portion of target */
- ! (VOID) get_kwdname( target, kwd_targ );
-
- /* match at least MINLEN characters if possible */
- ! tlen = strlen( kwd_targ );
- clen = strlen( candidate );
- if ( (tlen >= MINLEN) && (clen < MINLEN) ) {
- ++too_short; /* not long enough -- no match */
- ***************
- *** 947,953 ****
-
- #ifdef vms_style
- /* if first two chars are NO then match at least MINLEN+2 chars */
- ! if ( !strnicmp(up_targ, "NO", 2) ) {
- if ( (tlen >= (MINLEN + 2)) && (clen < (MINLEN + 2)) ) {
- ++too_short; /* not long enough -- no match */
- }
- --- 953,959 ----
-
- #ifdef vms_style
- /* if first two chars are NO then match at least MINLEN+2 chars */
- ! if ( !strnicmp(kwd_targ, "NO", 2) ) {
- if ( (tlen >= (MINLEN + 2)) && (clen < (MINLEN + 2)) ) {
- ++too_short; /* not long enough -- no match */
- }
- ***************
- *** 954,971 ****
- }
- #endif
-
- ! /* first try to match prefix of the uppercase portion */
- ! i = (too_short) ? -1 : strnicmp(up_targ, candidate, clen);
-
- - free( up_targ );
- -
- /* did we match? */
- if ( !i ) return 0; /* yes! */
-
- ! /* no! : compare the whole target
- ** match at least MINLEN characters if possible
- */
- ! tlen = strlen(full_targ);
- if ( (tlen >= MINLEN) && (clen < MINLEN) ) {
- return -1; /* not long enough -- no match */
- }
- --- 960,978 ----
- }
- #endif
-
- ! /* first try to match prefix of the keyword portion */
- ! i = (too_short) ? -1 : strnicmp(kwd_targ, candidate, clen);
-
- /* did we match? */
- if ( !i ) return 0; /* yes! */
-
- ! /* no! : compare the argument portion
- ** match at least MINLEN characters if possible
- */
- ! /* make arg_targ the argument portion of target */
- ! (VOID) get_argname( target, arg_targ );
- !
- ! tlen = strlen(arg_targ);
- if ( (tlen >= MINLEN) && (clen < MINLEN) ) {
- return -1; /* not long enough -- no match */
- }
- ***************
- *** 972,978 ****
-
- #ifdef vms_style
- /* if first two chars are NO then match at least MINLEN+2 chars */
- ! if ( !strnicmp(full_targ, "no", 2) ) {
- if ( (tlen >= (MINLEN + 2)) && (clen < (MINLEN + 2)) ) {
- return -1; /* not long enough -- no match */
- }
- --- 979,985 ----
-
- #ifdef vms_style
- /* if first two chars are NO then match at least MINLEN+2 chars */
- ! if ( !strnicmp(arg_targ, "no", 2) ) {
- if ( (tlen >= (MINLEN + 2)) && (clen < (MINLEN + 2)) ) {
- return -1; /* not long enough -- no match */
- }
- ***************
- *** 979,985 ****
- }
- #endif
-
- ! return strnicmp(full_targ, candidate, clen);
- }
-
-
- --- 986,992 ----
- }
- #endif
-
- ! return strnicmp(arg_targ, candidate, clen);
- }
-
-
- ***************
- *** 992,1014 ****
- int match( candidate, target) char *candidate, *target;
- # endif
- {
- ! int i, j;
- ! char c;
-
- ! i = j = 0;
-
- ! while ( isgraph(target[i]) || isgraph(candidate[i]) ) {
- ! while ( islower(target[i]) ) i++;
- ! if ( !isgraph(target[i]) ) {
- ! if ( !isgraph(candidate[j]) ) return 0;
- ! return stricmp(target, candidate);
- ! }
- ! c = islower( candidate[j] ) ? toupper(candidate[j]) : candidate[j];
- ! if (target[i] != c) return stricmp(target, candidate);
- ! i++;
- ! j++;
- ! }
- ! return 0;
- }
-
- #endif
- --- 999,1016 ----
- int match( candidate, target) char *candidate, *target;
- # endif
- {
- ! char kwd_targ[ 256 ], arg_targ[ 256 ];
- ! int rc;
-
- ! (VOID) get_kwdname( target, kwd_targ );
- ! rc = stricmp( kwd_targ, candidate );
-
- ! if ( rc == 0 ) return 0;
- !
- ! (VOID) get_argname( target, arg_targ );
- ! rc = stricmp( arg_targ, candidate );
- !
- ! return rc;
- }
-
- #endif
- *** strfuncs.h.OLD Mon Jun 3 11:18:00 1991
- --- strfuncs.h Mon May 13 13:59:31 1991
- ***************
- *** 33,40 ****
- EXTERN int strsplit ARGS(( char ***, char *, const char * ));
- EXTERN char *strjoin ARGS(( const char **, const char * ));
-
- ! EXTERN char *get_name ARGS(( const char *, char * ));
- ! EXTERN char *get_keyword ARGS(( const char *, char * ));
- EXTERN int match ARGS(( const char *, const char * ));
- EXTERN char *basename ARGS(( char * ));
- EXTERN VOID indent_para ARGS(( FILE *, int, int,
- --- 33,40 ----
- EXTERN int strsplit ARGS(( char ***, char *, const char * ));
- EXTERN char *strjoin ARGS(( const char **, const char * ));
-
- ! EXTERN char *get_argname ARGS(( const char *, char * ));
- ! EXTERN char *get_kwdname ARGS(( const char *, char * ));
- EXTERN int match ARGS(( const char *, const char * ));
- EXTERN char *basename ARGS(( char * ));
- EXTERN VOID indent_para ARGS(( FILE *, int, int,
- *** unix_args.c.OLD Mon Jun 3 11:18:42 1991
- --- unix_args.c Mon May 13 13:44:30 1991
- ***************
- *** 215,221 ****
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_keyword( arg_sname(ad), name );
- usrerr("option %c%s requires an argument", c_KWD_PFX, name);
- arg_flags(ad) = flags;
- parse_error = pe_SYNTAX;
- --- 215,221 ----
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_kwdname( arg_sname(ad), name );
- usrerr("option %c%s requires an argument", c_KWD_PFX, name);
- arg_flags(ad) = flags;
- parse_error = pe_SYNTAX;
- ***************
- *** 339,345 ****
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_name(arg_sname(ad), name);
- usrerr( "%s required for %c%c flag",
- name, c_OPT_PFX, arg_cname(ad) );
- arg_flags(ad) = flags;
- --- 339,345 ----
- BSET( arg_flags(ad), ARGGIVEN );
- }
- else {
- ! (VOID) get_argname(arg_sname(ad), name);
- usrerr( "%s required for %c%c flag",
- name, c_OPT_PFX, arg_cname(ad) );
- arg_flags(ad) = flags;
- ***************
- *** 505,517 ****
- char *pos;
- argName_t name, keyword;
-
- ! (VOID) get_name( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_keyword( arg_sname(ad), keyword );
-
- if ( isupper(arg_cname(ad)) && toupper(*keyword) == arg_cname(ad) ) {
- *keyword = toupper(*keyword);
- --- 505,517 ----
- char *pos;
- argName_t name, keyword;
-
- ! (VOID) get_argname( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_kwdname( arg_sname(ad), keyword );
-
- if ( isupper(arg_cname(ad)) && toupper(*keyword) == arg_cname(ad) ) {
- *keyword = toupper(*keyword);
- *** unix_man.c.OLD Mon Jun 3 11:18:48 1991
- --- unix_man.c Mon May 13 13:44:31 1991
- ***************
- *** 75,81 ****
- char *pos;
- argName_t name;
-
- ! (VOID) get_name( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- if ( ARG_isMULTIVAL(ad) ) {
- --- 75,81 ----
- char *pos;
- argName_t name;
-
- ! (VOID) get_argname( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- if ( ARG_isMULTIVAL(ad) ) {
- ***************
- *** 87,93 ****
- --- 87,97 ----
- return strlen(name);
- }/*if parm*/
-
- + #ifdef SVR4
- + sprintf(buf, "\\f4\\-%c\\fP", arg_cname(ad));
- + #else
- sprintf(buf, "\\fB\\-%c\\fP", arg_cname(ad));
- + #endif
- pos = buf + strlen(buf);
-
- if ( ARG_isVALTAKEN(ad) && !ARG_isBOOLEAN(ad) && !ARG_isPSEUDOARG(ad) ) {
- ***************
- *** 185,191 ****
- --- 189,199 ----
- printf(".if n .ll 78\n");
-
- COMMENT;
- + #ifdef SVR4
- + TH( name, 1 );
- + #else
- TH( strupr(name), 1 );
- + #endif
-
- COMMENT;
- SH( "NAME" );
- ***************
- *** 195,201 ****
- --- 203,213 ----
- SH( "SYNOPSIS" );
-
- len = strlen( program ) + 1;
- + #ifdef SVR4
- + sprintf( name, "\\f4%s\\fP", program );
- + #else
- sprintf( name, "\\fB%s\\fP", program );
- + #endif
- TP( len, name );
-
- maxlen = 0;
- *** useful.h.OLD Mon Jun 3 11:18:52 1991
- --- useful.h Thu May 16 16:21:26 1991
- ***************
- *** 31,36 ****
- --- 31,42 ----
- # endif
- #endif /* _unix */
-
- + #if (defined(_UNIX) || defined(__UNIX) || defined(_UNIX_) || defined(__UNIX__))
- + # ifndef unix
- + # define unix
- + # endif
- + #endif /* _UNIX */
- +
- /* give a stab at the dual Unix universe dilemma (UCB vs AT&T) */
- #ifdef unix
- # if ( defined(_BSD) && !defined(BSD) )
- ***************
- *** 84,102 ****
- #endif /* unix */
-
- #ifndef MSDOS
- ! # if ( defined(_MSDOS_) || defined(__MSDOS__) || defined(_MSDOS) )
- # define MSDOS
- # endif
- #endif
-
- #ifndef OS2
- ! # if ( defined(_OS2_) || defined(__OS2__) || defined(_OS2) )
- # define OS2
- # endif
- #endif
-
- #ifndef AmigaDOS
- ! # if ( defined(MANX) || defined(AZTEC) )
- # define AmigaDOS
- # endif
- #endif /* AmigaDOS */
- --- 90,108 ----
- #endif /* unix */
-
- #ifndef MSDOS
- ! # if (defined(_MSDOS_)||defined(__MSDOS__)||defined(_MSDOS)||defined(__MSDOS))
- # define MSDOS
- # endif
- #endif
-
- #ifndef OS2
- ! # if ( defined(_OS2_) || defined(__OS2__) || defined(_OS2) || defined(__OS2) )
- # define OS2
- # endif
- #endif
-
- #ifndef AmigaDOS
- ! # if ( defined(AMIGA) || defined(MANX) || defined(AZTEC) )
- # define AmigaDOS
- # endif
- #endif /* AmigaDOS */
- ***************
- *** 303,312 ****
- # endif /* !_SIZE_T_DEFINED */
- #endif
-
- ! #ifndef __malloc_h
- ! EXTERN ARBPTR malloc ARGS(( size_t ));
- ! EXTERN ARBPTR realloc ARGS(( ARBPTR, size_t ));
- ! EXTERN VOID free ARGS(( ARBPTR ));
- #endif /*__malloc_h*/
-
- EXTERN ARBPTR ckalloc ARGS(( size_t ));
- --- 309,316 ----
- # endif /* !_SIZE_T_DEFINED */
- #endif
-
- ! #if ( !defined(__malloc_h) && !defined(__MALLOC_H) )
- ! # include <malloc.h>
- #endif /*__malloc_h*/
-
- EXTERN ARBPTR ckalloc ARGS(( size_t ));
- *** vms_args.c.OLD Mon Jun 3 11:18:57 1991
- --- vms_args.c Mon May 13 13:44:32 1991
- ***************
- *** 683,689 ****
- BSET( arg_flags(ad), ARGVALGIVEN );
- }
- else {
- ! (VOID) get_keyword( arg_sname(ad), keyword );
- usrerr("qualifier %s requires an argument", keyword);
- arg_flags(ad) = flags;
- parse_error = pe_SYNTAX;
- --- 683,689 ----
- BSET( arg_flags(ad), ARGVALGIVEN );
- }
- else {
- ! (VOID) get_kwdname( arg_sname(ad), keyword );
- usrerr("qualifier %s requires an argument", keyword);
- arg_flags(ad) = flags;
- parse_error = pe_SYNTAX;
- ***************
- *** 849,861 ****
- char * pos;
- argName_t keyword, name;
-
- ! (VOID) get_name( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_keyword( arg_sname(ad), keyword );
- sprintf( buf, "%c%s", *s_KWD_PFX, keyword );
- pos = buf + strlen(buf);
-
- --- 849,861 ----
- char * pos;
- argName_t keyword, name;
-
- ! (VOID) get_argname( arg_sname(ad), name );
-
- if (ARG_isPOSITIONAL(ad)) {
- sprintf( buf, "<%s>", name );
- }
- else {
- ! (VOID) get_kwdname( arg_sname(ad), keyword );
- sprintf( buf, "%c%s", *s_KWD_PFX, keyword );
- pos = buf + strlen(buf);
-
- ***************
- *** 965,971 ****
-
-
- if ( ARG_isMULTIVAL(ad) ) {
- ! (VOID) get_name( arg_sname(ad), name );
- strcat(buf, "[,<");
- strcat(buf, name);
- strcat(buf, ">...]");
- --- 965,971 ----
-
-
- if ( ARG_isMULTIVAL(ad) ) {
- ! (VOID) get_argname( arg_sname(ad), name );
- strcat(buf, "[,<");
- strcat(buf, name);
- strcat(buf, ">...]");
- *** xparse.c.OLD Mon Jun 3 11:19:13 1991
- --- xparse.c Mon Jun 3 10:29:49 1991
- ***************
- *** 857,872 ****
- if ( ARG_isREQUIRED(ad) && !ARG_isGIVEN(ad) ) {
- /* still didn't get a value... sigh */
- if ( ARG_isPOSITIONAL(ad) ) {
- ! (VOID) get_name( arg_sname(ad), s );
- usrerr("%s required", s);
- }
- else {
- #ifdef amiga_style
- ! (VOID) get_keyword( arg_sname(ad), s );
- usrerr("argument required for %s keyword", s);
- #endif
- #ifdef ibm_style
- ! (VOID) get_name( arg_sname(ad), s );
- {
- char c, *pfx = getenv( "SWITCHAR" );
- c = ( pfx && *pfx ) ? *pfx : '/';
- --- 857,872 ----
- if ( ARG_isREQUIRED(ad) && !ARG_isGIVEN(ad) ) {
- /* still didn't get a value... sigh */
- if ( ARG_isPOSITIONAL(ad) ) {
- ! (VOID) get_argname( arg_sname(ad), s );
- usrerr("%s required", s);
- }
- else {
- #ifdef amiga_style
- ! (VOID) get_kwdname( arg_sname(ad), s );
- usrerr("argument required for %s keyword", s);
- #endif
- #ifdef ibm_style
- ! (VOID) get_argname( arg_sname(ad), s );
- {
- char c, *pfx = getenv( "SWITCHAR" );
- c = ( pfx && *pfx ) ? *pfx : '/';
- ***************
- *** 874,884 ****
- }
- #endif
- #ifdef unix_style
- ! (VOID) get_name( arg_sname(ad), s );
- usrerr("%s required for %c%c flag", s, c_OPT_PFX, arg_cname(ad));
- #endif
- #ifdef vms_style
- ! (VOID) get_keyword( arg_sname(ad), s );
- usrerr("value required for %c%s qualifier", *s_KWD_PFX, s);
- #endif
- }
- --- 874,884 ----
- }
- #endif
- #ifdef unix_style
- ! (VOID) get_argname( arg_sname(ad), s );
- usrerr("%s required for %c%c flag", s, c_OPT_PFX, arg_cname(ad));
- #endif
- #ifdef vms_style
- ! (VOID) get_kwdname( arg_sname(ad), s );
- usrerr("value required for %c%s qualifier", *s_KWD_PFX, s);
- #endif
- }
- ***************
- *** 1689,1701 ****
- int *argflags;
- BOOL is_match = FALSE;
-
- ! for (args = argd; !is_match && args; args = cmd_defargs(argd) ) {
- ! for (ad = ARG_FIRST(args); !ARG_isEND(ad); ARG_ADVANCE(ad) ) {
- ! if (arg_type(ad) == argDummy) continue;
- if ( match(name, arg_sname(ad)) == 0 ) {
- is_match = TRUE;
- break;
- ! }
- }/*foreach arg*/
- }/*foreach argdesc*/
-
- --- 1689,1702 ----
- int *argflags;
- BOOL is_match = FALSE;
-
- ! 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;
- !
- if ( match(name, arg_sname(ad)) == 0 ) {
- is_match = TRUE;
- break;
- ! }/*if*/
- }/*foreach arg*/
- }/*foreach argdesc*/
-
-