home *** CD-ROM | disk | FTP | other *** search
- *** MANIFEST.OLD Thu Dec 5 09:54:30 1991
- --- MANIFEST Tue Nov 26 16:39:21 1991
- ***************
- *** 47,53 ****
- parseargs.c 8 C source for parseargs(1)
- parseargs.h 7 include file for parseargs library
- parseargs.pl 2 parseargs for perl
- ! patchlevel.h 2 list of patches (most recent first)
- pgopen.c 4 pipe output to a pager
- pgopen.h 1 include file for pgopen.c
- stest.c 4 test program for parseargs(3)
- --- 47,53 ----
- parseargs.c 8 C source for parseargs(1)
- parseargs.h 7 include file for parseargs library
- parseargs.pl 2 parseargs for perl
- ! patchlevel.h 3 list of patches (most recent first)
- pgopen.c 4 pipe output to a pager
- pgopen.h 1 include file for pgopen.c
- stest.c 4 test program for parseargs(3)
- ***************
- *** 62,68 ****
- test.sh 1 Bourne shell test program for parseargs(1)
- test.zsh 2 Z shell test program for parseargs(1)
- unix_args.c 5 parse Unix command-lines
- ! unix_man.c 3 print Unix manual-page templates
- useful.h 3 common include file for the library
- vms_args.c 6 parse VAX/VMS DCL command-lines
- vprintf.c 3 portable vfprintf, vprintf, and vsprintf
- --- 62,68 ----
- test.sh 1 Bourne shell test program for parseargs(1)
- test.zsh 2 Z shell test program for parseargs(1)
- unix_args.c 5 parse Unix command-lines
- ! unix_man.c 4 print Unix manual-page templates
- useful.h 3 common include file for the library
- vms_args.c 6 parse VAX/VMS DCL command-lines
- vprintf.c 3 portable vfprintf, vprintf, and vsprintf
- *** README.OLD Thu Dec 5 09:54:39 1991
- --- README Thu Dec 5 09:54:03 1991
- ***************
- *** 628,633 ****
- --- 628,636 ----
- I also provided extensive updating to the manual pages so that they
- now reflect the current capabilities of parseargs!
-
- + Since the FSF has decided to change the use of '+' as a long-option prefix
- + to '--' (in order to be POSIX conformant), I added some #ifdef POSIX_SOURCE
- + code to unix_args.c to use '--' instead of '+' as the long option prefix.
-
- MODIFICATIONS TO parseargs.h
- ============================
- ***************
- *** 770,776 ****
- If any of the following macros are #defined at compile time then they will
- have the following effect:
-
- ! USE_PAGER -- for Unix systems only. Parseargs will include the code
- which pipes usage messages to a paging program
-
- NOFLOAT -- Parseargs will NOT include the code for the predefined
- --- 773,779 ----
- If any of the following macros are #defined at compile time then they will
- have the following effect:
-
- ! USE_PAGER -- For Unix systems only. Parseargs will include the code
- which pipes usage messages to a paging program
-
- NOFLOAT -- Parseargs will NOT include the code for the predefined
- ***************
- *** 783,788 ****
- --- 786,794 ----
- USE_TERMINFO
- USE_TERMCAP -- Parseargs will use curses/terminfo/termcap when trying
- to figure out the size of the screen.
- +
- + POSIX_SOURCE -- For unix_style only. Parseargs will use '--' instead of
- + '+' as the long-option prefix.
-
- IBM-PC VERSION OF parseargs(3)
- ==============================
- *** amiga_args.c.OLD Thu Dec 5 09:54:49 1991
- --- amiga_args.c Tue Nov 26 16:31:18 1991
- ***************
- *** 518,524 ****
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description);
- fputc( '\n', fp );
- }
- }/*if*/
- --- 518,524 ----
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description, 0);
- fputc( '\n', fp );
- }
- }/*if*/
- *** doc/parseargs.man3.OLD Thu Dec 5 09:55:16 1991
- --- doc/parseargs.man3 Thu Dec 5 09:41:33 1991
- ***************
- *** 197,203 ****
- Under \s-1UNIX\s+1, \s-1MS-DOS\s+1, and \s-1OS\s+1/2,
- \fIparseargs\fP also allows for long
- options in addition to single character options.
- ! Under \s-1UNIX\s+1, long options are denoted by a `\fB+\fP' character.
- Under \s-1MS-DOS\s+1, and \s-1OS\s+1/2, long options are denoted by the second
- character in the \s-1SWITCHAR\s+1 environment variable. If there is no second
- character, then if the first character is `\-', then a `\fB+\fP' is used,
- --- 197,205 ----
- Under \s-1UNIX\s+1, \s-1MS-DOS\s+1, and \s-1OS\s+1/2,
- \fIparseargs\fP also allows for long
- options in addition to single character options.
- ! Under \s-1UNIX\s+1, long options are denoted by a `\fB+\fP' character
- ! (unless \fIparseargs\fP was compiled for conformance with POSIX, inc which
- ! case the long option prefix is `\fB\-\|\-\fP').
- Under \s-1MS-DOS\s+1, and \s-1OS\s+1/2, long options are denoted by the second
- character in the \s-1SWITCHAR\s+1 environment variable. If there is no second
- character, then if the first character is `\-', then a `\fB+\fP' is used,
- *** ibm_args.c.OLD Thu Dec 5 09:55:31 1991
- --- ibm_args.c Tue Nov 26 16:31:27 1991
- ***************
- *** 764,770 ****
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description);
- fputc( '\n', fp );
- }
- }/*if*/
- --- 764,770 ----
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description, 0);
- fputc( '\n', fp );
- }
- }/*if*/
- *** patchlevel.h.OLD Thu Dec 5 09:55:41 1991
- --- patchlevel.h Thu Dec 5 09:10:23 1991
- ***************
- *** 2,7 ****
- --- 2,17 ----
- ** ^FILE: patchlevel.h - current patchlevel for parseargs
- **
- ** ^HISTORY:
- + ** 12/05/91 Brad Appleton <brad@ssd.csd.harris.com>
- + ** Patch10
- + ** - Fix bug that was introduced in last patch. Pgopen() was not
- + ** using $USAGE_PAGER, it was only using $PAGER.
- + ** - When Earl added the extra argument to indent_para(), he forgot to
- + ** include the argument when printing the command description. I added
- + ** this into *_args.c
- + ** - Added #ifdef POSIX_SOURCE stuff to unix_args.c to allow the use
- + ** of '--' instead of '+' as the long option prefix.
- + **
- ** 08/27/91 Brad Appleton <brad@ssd.csd.harris.com>
- ** 08/27/91 Earl Chew <cechew@bruce.cs.monash.edu.au>
- ** Patch09
- ***************
- *** 19,25 ****
- ** at odds with the documentation and requires (int *) on reads.
- ** Also, should check for NULL cmd-name before passing it to strdup().
- ** - vms_args.c/is_cmdline():
- ! ** Mike Level pointed out to me that if lib$get_foreing returns a
- ** zero-length string then the proper actions are not taken. This
- ** has been fixed.
- ** - vms_args.c, parseargs.h, xparse.c
- --- 29,35 ----
- ** at odds with the documentation and requires (int *) on reads.
- ** Also, should check for NULL cmd-name before passing it to strdup().
- ** - vms_args.c/is_cmdline():
- ! ** Mike Levin pointed out to me that if lib$get_foreign returns a
- ** zero-length string then the proper actions are not taken. This
- ** has been fixed.
- ** - vms_args.c, parseargs.h, xparse.c
- ***************
- *** 132,138 ****
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 9
-
- #ifdef __STDC__
- static const char
- --- 142,148 ----
-
- #define VERSION 2
- #define REVISION 0
- ! #define PATCHLEVEL 10
-
- #ifdef __STDC__
- static const char
- ***************
- *** 139,142 ****
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 9";
- --- 149,152 ----
- #else
- static char
- #endif
- ! _Ident[] = "@(#)parseargs 2.0 patchlevel 10";
- *** pgopen.c.OLD Thu Dec 5 09:55:48 1991
- --- pgopen.c Wed Nov 27 11:07:35 1991
- ***************
- *** 32,38 ****
- #include <useful.h>
-
- /* get #defines for access() call */
- ! #include <sys/file.h>
- #ifndef X_OK
- # define X_OK 0x01
- #endif
- --- 32,40 ----
- #include <useful.h>
-
- /* get #defines for access() call */
- ! #ifndef SYSV
- ! # include <sys/file.h>
- ! #endif
- #ifndef X_OK
- # define X_OK 0x01
- #endif
- ***************
- *** 418,424 ****
- if ( Pager_Type != PG_NONE ) pg_type = Pager_Type;
-
- /* see if the given pager is okay */
- ! if ( !pg_name || !*pg_name || !access(pg_name, X_OK) ) {
- pg_name = getenv("PAGER");
- }
- else {
- --- 420,426 ----
- if ( Pager_Type != PG_NONE ) pg_type = Pager_Type;
-
- /* see if the given pager is okay */
- ! if ( !pg_name || !*pg_name || access(pg_name, X_OK) ) {
- pg_name = getenv("PAGER");
- }
- else {
- *** strfuncs.c.OLD Thu Dec 5 09:56:00 1991
- --- strfuncs.c Wed Nov 27 11:08:42 1991
- ***************
- *** 32,43 ****
- ** indent_para() -- print an indented hanging paragraph
- **
- ** ^HISTORY:
- ** 08/27/91 Earl Chew <cechew@bruce.cs.monash.edu.au>
- ** - add extra length argument to indent_para().
- ** - add FORCE_KWDCASE() macro
- ** - add non-writable strings support to get_argname() and
- ** get_kwdname()
- - ** 08/27/91 Earl Chew <cechew@bruce.cs.monash.edu.au>
- ** - add get_argpfx() and get_argdesc() for non-writable strings
- ** support
- ** - allow zero length string for strsplit()
- --- 32,47 ----
- ** indent_para() -- print an indented hanging paragraph
- **
- ** ^HISTORY:
- + **
- + ** 11/26/91 Brad Appleton <brad@ssd.csd.harris.com>
- + ** - added the following to indent_para(). If last arg is 0,
- + ** then the whole length is used.
- + **
- ** 08/27/91 Earl Chew <cechew@bruce.cs.monash.edu.au>
- ** - add extra length argument to indent_para().
- ** - add FORCE_KWDCASE() macro
- ** - add non-writable strings support to get_argname() and
- ** get_kwdname()
- ** - add get_argpfx() and get_argdesc() for non-writable strings
- ** support
- ** - allow zero length string for strsplit()
- ***************
- *** 650,660 ****
- do {
- *pwrite++ = c;
- } while ( (c = *pread++) && !strchr(separators, c) );
- - *pwrite++ = '\0';
- - ++count;
- - do {
- - *pwrite++ = c;
- - } while ( (c = *pread++) && !strchr(separators, c) );
- *pwrite++ = '\0';
- ++count;
- }/*if*/
- --- 654,659 ----
- ***************
- *** 1370,1375 ****
- --- 1369,1376 ----
- register int idx = 0;
- BOOL first_line = TRUE;
- char ch;
- +
- + if ( ! textlen ) textlen = strlen( text );
-
- /* print the title */
- fprintf( fp, "%*s%-*s", margin, "", indent, title );
- *** unix_args.c.OLD Thu Dec 5 09:56:18 1991
- --- unix_args.c Thu Dec 5 09:21:48 1991
- ***************
- *** 6,12 ****
- ** vectors and to print Unix usage messages.
- **
- ** ^HISTORY:
- ! ** 27/08/91 Earl Chew <cechew@bruce.cs.monash.edu.au>
- ** - Use ProgNameLen when accessing ProgName
- ** - Use get_argdesc() to access description
- **
- --- 6,16 ----
- ** vectors and to print Unix usage messages.
- **
- ** ^HISTORY:
- ! ** 12/05/91 Brad Appleton <brad@ssd.csd.harris.com>
- ! ** - added #ifdef POSIX_SOURCE to use "--" instead of "+" as
- ! ** GNU conformant prefix for long options.
- ! **
- ! ** 08/27/91 Earl Chew <cechew@bruce.cs.monash.edu.au>
- ** - Use ProgNameLen when accessing ProgName
- ** - Use get_argdesc() to access description
- **
- ***************
- *** 54,67 ****
- #define isOPT(s) \
- ( !BTEST(cmd_flags(cmd), pa_KWDSONLY) && \
- !BTEST(cmd_state(cmd), ps_NOFLAGS) && \
- ! *s == c_OPT_PFX && *(s+1) \
- )
-
- #define isKWD(s) \
- ( !BTEST(cmd_flags(cmd), pa_OPTSONLY) && \
- !BTEST(cmd_state(cmd), ps_NOFLAGS) && \
- ! *s == c_KWD_PFX && *(s+1) \
- )
-
-
- /***************************************************************************
- --- 58,79 ----
- #define isOPT(s) \
- ( !BTEST(cmd_flags(cmd), pa_KWDSONLY) && \
- !BTEST(cmd_state(cmd), ps_NOFLAGS) && \
- ! (*s == c_OPT_PFX) && *(s+1) \
- )
-
- + #ifndef POSIX_SOURCE
- #define isKWD(s) \
- ( !BTEST(cmd_flags(cmd), pa_OPTSONLY) && \
- !BTEST(cmd_state(cmd), ps_NOFLAGS) && \
- ! (*s == c_KWD_PFX) && *(s+1) \
- )
- + #else
- + #define isKWD(s) \
- + ( !BTEST(cmd_flags(cmd), pa_OPTSONLY) && \
- + !BTEST(cmd_state(cmd), ps_NOFLAGS) && \
- + (*s == c_OPT_PFX) && (*(s+1) == c_OPT_PFX) && *(s+2) \
- + )
- + #endif
-
-
- /***************************************************************************
- ***************
- *** 135,140 ****
- --- 147,153 ----
- if ( isKWD(p) ) { /* we have a keyword here */
- char *s, c = '\0';
-
- + #ifndef POSIX_SOURCE
- /* check for `++' to end flags */
- if ( *(p+1) == c_KWD_PFX && !*(p+2) ) {
- BSET( cmd_state(cmd), ps_NOFLAGS );
- ***************
- *** 141,148 ****
- --- 154,165 ----
- cmd_list(cmd) = ARGDESCNULL;
- continue;
- }
- + #endif
-
- /* get past prefix and look for possible argument */
- + #ifdef POSIX_SOURCE
- + ++p;
- + #endif
- s = strpbrk(++p, s_ARG_SEP);
- if(s) {
- c = *s;
- ***************
- *** 164,170 ****
- --- 181,191 ----
- if ( c ) *(s-1) = c; /* restore the equal sign */
-
- if ( !is_match ) {
- + #ifndef POSIX_SOURCE
- usrerr("option %c%s unknown", c_KWD_PFX, p);
- + #else
- + usrerr("option %c%c%s unknown", c_OPT_PFX, c_OPT_PFX, p);
- + #endif
- parse_error = pe_SYNTAX;
- cmd_list(cmd) = ARGDESCNULL;
- continue;
- ***************
- *** 525,535 ****
- --- 546,565 ----
- sprintf( buf, "%c%c", c_OPT_PFX, arg_cname(ad) );
- }
- else if ( !(usgflags & usg_OPTS) ) {
- + #ifndef POSIX_SOURCE
- sprintf( buf, "%c%s", c_KWD_PFX, keyword );
- + #else
- + sprintf( buf, "%c%c%s", c_OPT_PFX, c_OPT_PFX, keyword );
- + #endif
- }
- else { /* use both */
- + #ifndef POSIX_SOURCE
- sprintf( buf, "%c%c|%c%s", c_OPT_PFX, arg_cname(ad),
- c_KWD_PFX, keyword );
- + #else
- + sprintf( buf, "%c%c|%c%c%s", c_OPT_PFX, arg_cname(ad),
- + c_OPT_PFX, c_OPT_PFX, keyword );
- + #endif
- }
-
- pos = buf + strlen(buf);
- ***************
- *** 680,686 ****
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description);
- fputc( '\n', fp );
- }
- }/*if*/
- --- 710,716 ----
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description, 0);
- fputc( '\n', fp );
- }
- }/*if*/
- *** vms_args.c.OLD Thu Dec 5 09:56:28 1991
- --- vms_args.c Tue Nov 26 16:35:15 1991
- ***************
- *** 1027,1033 ****
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description);
- fputc( '\n', fp );
- }
- }/*if*/
- --- 1027,1033 ----
-
- if ( description && *description ) {
- fprintf( fp, "Description:\n" );
- ! indent_para(fp, max_cols, 8, "", 0, description, 0);
- fputc( '\n', fp );
- }
- }/*if*/
-