DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T t

⟦180802613⟧ TextFile

    Length: 2059 (0x80b)
    Types: TextFile
    Names: »tai_args.c«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/dsap/dua/tai_args.c« 

TextFile

/* tai_args.c - Argument processing routines */

#ifndef lint
static char *rcsid = "$Header: /f/osi/dsap/dua/RCS/tai_args.c,v 6.0 89/03/18 23:28:07 mrose Rel $";
#endif

/*
 * $Header: /f/osi/dsap/dua/RCS/tai_args.c,v 6.0 89/03/18 23:28:07 mrose Rel $
 *
 *
 * $Log:	tai_args.c,v $
 * Revision 6.0  89/03/18  23:28:07  mrose
 * Release 5.0
 * 
 */

/*
 *                                NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


/* LINTLIBRARY */

#include "quipu/util.h"
#include "quipu/attr.h"

extern char *oidtable,
	    *tailfile,
	    *myname;

extern LLog *log_dsap;

char        *usage = "[flags]";
char        *options = "T:t:c:";

tai_args (acptr,avptr)
int *acptr;
char ***avptr;
{
char ** av;

#ifdef PYR
int cnt = 1;

	if (acptr == (int *)NULL)
		return;

	/* getopt is better than this simple processing, but it is not
	   supported on the pyramid.
	 */

	av = *avptr;
	av++;

	while (**av == '-') {
		switch (*++*av) {
			case 'T': oidtable = *++av;
				  cnt++;
					break;
			case 'c': myname = *++av;
				  cnt++;
					break;
			case 't': tailfile = *++av;
				  cnt++;
					break;
*/

			default:
				LLOG (log_dsap,LLOG_FATAL,("Usage: %s %s\n",*avptr[0],usage));
				fatal(-1,"Usage...");
		}
		av++;
		cnt++;
	}

	*acptr -= cnt;
	*avptr = av;

#else
	extern int optind, opterr;
	extern char     *optarg;
	int     opt;

	if (acptr == (int *)NULL)
		return;

	av = *avptr;
	opterr = 1;
	optind = 1;

	while((opt = getopt(*acptr, av, options)) != EOF) {
		DLOG (log_dsap,LLOG_DEBUG,("Option %c",opt));
		switch(opt)
		{
			case 'T': oidtable = strdup(optarg);
					break;
			case 'c': myname = strdup(optarg);
					break;
			case 't': tailfile = strdup(optarg);
					break;
			default:
				LLOG (log_dsap,LLOG_FATAL,("Usage: %s %s\n",av[0],usage));
				fatal(-1,"Usage...");
		}
	}

	*acptr -= optind;
	*avptr = &av[optind];
#endif
}