|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 2064 (0x810)
Types: TextFile
Names: »tai_init.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/quipu/tai_init.c«
/* tai_init.c - */
#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/tai_init.c,v 6.0 89/03/18 23:41:59 mrose Rel $";
#endif
/*
* $Header: /f/osi/quipu/RCS/tai_init.c,v 6.0 89/03/18 23:41:59 mrose Rel $
*
*
* $Log: tai_init.c,v $
* Revision 6.0 89/03/18 23:41:59 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.
*
*/
#include "quipu/util.h"
#include "tailor.h"
extern char *dsatailfile;
#define MAXTAIARGS 100
static char taibuf[BUFSIZ];
static char *taip = taibuf;
extern LLog *log_dsap;
char *
dsa_tai_alloc(str)
char *str;
{
char *ret = taip;
while(*taip++ = *str++);
if(taip >= &taibuf[BUFSIZ])
fatal(-99, "Out of tailoring space");
return(ret);
}
dsa_tai_init(name)
char *name;
{
FILE *fp;
char buf[BUFSIZ];
if(!isstr(dsatailfile)) /* it's compiled in */
return(OK);
if( (fp = fopen(isodefile(dsatailfile), "r")) == (FILE *)NULL){
LLOG (log_dsap,LLOG_FATAL, ("Cannot open tailor file '%s'", isodefile(dsatailfile)));
fatal (-46, "Cannot open quiputailor");
}
isodetailor (name,0);
dsap_siginit ();
while(fgets(buf, sizeof(buf), fp) != NULLCP)
if ( (*buf != '#') && (*buf != '\n') )
/* not a comment or blank */
if (dsa_tai_string (buf) == NOTOK)
LLOG (log_dsap,LLOG_EXCEPTIONS,("tai_string failed %s",buf));
(void) fclose(fp);
isodexport();
return OK;
}
dsa_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",str));
return (NOTOK);
}
return (dsa_sys_tai(ac, args));
}