|
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: 2041 (0x7f9) Types: TextFile Names: »tai_init.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/dsap/dua/tai_init.c«
/* tai_init.c - */ #ifndef lint static char *rcsid = "$Header: /f/osi/dsap/dua/RCS/tai_init.c,v 6.0 89/03/18 23:28:08 mrose Rel $"; #endif /* * $Header: /f/osi/dsap/dua/RCS/tai_init.c,v 6.0 89/03/18 23:28:08 mrose Rel $ * * * $Log: tai_init.c,v $ * Revision 6.0 89/03/18 23:28:08 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 "tailor.h" extern LLog * log_dsap; extern char *tailfile; #define MAXTAIARGS 100 static char taibuf[BUFSIZ]; static char *taip = taibuf; extern LLog *log_dsap; char * dsap_tai_alloc(str) char *str; { char *ret = taip; while(*taip++ = *str++); if(taip >= &taibuf[BUFSIZ]) fatal(-1, "Out of tailoring space"); return(ret); } dsap_tai_init() { FILE *fp; char buf[BUFSIZ]; if(!isstr(tailfile)) /* it's compiled in */ return(OK); if( (fp = fopen(isodefile(tailfile), "r")) == (FILE *)NULL) { LLOG (log_dsap,LLOG_FATAL,("can't open tailor file '%s'", isodefile(tailfile))); fatal (-1, "Cannot open tailor file"); } dsap_siginit (); 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)); }