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

⟦bab9b5b8e⟧ TextFile

    Length: 1788 (0x6fc)
    Types: TextFile
    Names: »tai_init.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/dsap/common/tai_init.c« 

TextFile

/* tai_init.c - */

#ifndef lint
static char *rcsid = "$Header: /f/osi/dsap/common/RCS/tai_init.c,v 7.0 89/11/23 21:47:52 mrose Rel $";
#endif

/*
 * $Header: /f/osi/dsap/common/RCS/tai_init.c,v 7.0 89/11/23 21:47:52 mrose Rel $
 *
 *
 * $Log:	tai_init.c,v $
 * Revision 7.0  89/11/23  21:47:52  mrose
 * Release 6.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 "tailor.h"

extern LLog * log_dsap;
extern  char    *tailfile;

#define MAXTAIARGS      100

extern  LLog    *log_dsap;


dsap_tai_init()
{
	FILE    *fp;
	char    *cp;
	char    buf[BUFSIZ];

	if(!isstr(tailfile))    /* it's compiled in */
		return(OK);

	if( (fp = fopen(cp = isodefile(tailfile, 0), "r")) == (FILE *)NULL) {
		LLOG (log_dsap,LLOG_FATAL,("can't open tailor file '%s'", cp));
		fatal (-1, "Cannot open tailor file");
	}

	while(fgets(buf, sizeof(buf), fp) != NULLCP)
		if ( (*buf != '#') && (*buf != '\n') )
			/* not a comment or blank */
			if (tai_string (buf) == NOTOK) 
				LLOG (log_dsap,LLOG_EXCEPTIONS,("tai_string failed %s",buf));

	
	(void) fclose(fp);
	return OK;
}


tai_string (str)
char * str;
{
	char    *args[MAXTAIARGS];
	char    *p, *index();
	int     ac;

	if( (p = index(str, '\n')) != NULLCP)
		*p = '\0';

	if((ac = sstr2arg(str, MAXTAIARGS, args, " \t,")) == NOTOK) {
		LLOG(log_dsap,LLOG_EXCEPTIONS,("too many tailor parameters"));
		return(NOTOK);
	}
	if(ac <= 1) {
		LLOG (log_dsap,LLOG_EXCEPTIONS,("no option set '%s'",str));
		return (NOTOK);
	}
	return (dsap_tai(ac, args));

}