Annotation of 43BSDReno/contrib/isode-beta/dsap/common/tai_args.c, revision 1.1.1.1

1.1       root        1: /* tai_args.c - Argument processing routines */
                      2: 
                      3: #ifndef lint
                      4: static char *rcsid = "$Header: /f/osi/dsap/common/RCS/tai_args.c,v 7.0 89/11/23 21:47:50 mrose Rel $";
                      5: #endif
                      6: 
                      7: /*
                      8:  * $Header: /f/osi/dsap/common/RCS/tai_args.c,v 7.0 89/11/23 21:47:50 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       tai_args.c,v $
                     12:  * Revision 7.0  89/11/23  21:47:50  mrose
                     13:  * Release 6.0
                     14:  * 
                     15:  */
                     16: 
                     17: /*
                     18:  *                                NOTICE
                     19:  *
                     20:  *    Acquisition, use, and distribution of this module and related
                     21:  *    materials are subject to the restrictions of a license agreement.
                     22:  *    Consult the Preface in the User's Manual for the full terms of
                     23:  *    this agreement.
                     24:  *
                     25:  */
                     26: 
                     27: 
                     28: /* LINTLIBRARY */
                     29: 
                     30: #include "quipu/util.h"
                     31: #include "quipu/attr.h"
                     32: 
                     33: extern char *oidtable,
                     34:            *tailfile,
                     35:            *myname;
                     36: 
                     37: extern LLog *log_dsap;
                     38: 
                     39: char        *usage = "[flags]";
                     40: char        *options = "T:t:c:";
                     41: 
                     42: tai_args (acptr,avptr)
                     43: int *acptr;
                     44: char ***avptr;
                     45: {
                     46: register char ** av;
                     47: 
                     48: int cnt;
                     49: register char *cp;
                     50: 
                     51:        if (acptr == (int *)NULL)
                     52:                return;
                     53: 
                     54:        if (*acptr <= 1)
                     55:                return;
                     56: 
                     57:        av = *avptr;
                     58:        av++, cnt = 1;
                     59: 
                     60:        while ((cp = *av) && *cp == '-') {
                     61:                switch (*++cp) {
                     62:                        case 'T': oidtable = *++av;
                     63:                                  cnt++;
                     64:                                        break;
                     65:                        case 'c': myname = *++av;
                     66:                                  cnt++;
                     67:                                        break;
                     68:                        case 't': tailfile = *++av;
                     69:                                  cnt++;
                     70:                                        break;
                     71: 
                     72:                        default:
                     73:                                LLOG (log_dsap,LLOG_FATAL,("Usage: %s %s\n",*avptr[0],usage));
                     74:                                fatal(-1,"Usage...");
                     75:                }
                     76:                av++;
                     77:                cnt++;
                     78:        }
                     79: 
                     80:        *acptr -= cnt;
                     81:        *avptr = av;
                     82: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.