Annotation of 43BSDReno/contrib/isode-beta/quipu/tai_init.c, revision 1.1.1.1

1.1       root        1: /* tai_init.c - */
                      2: 
                      3: #ifndef lint
                      4: static char *rcsid = "$Header: /f/osi/quipu/RCS/tai_init.c,v 7.1 90/03/15 11:19:12 mrose Exp $";
                      5: #endif
                      6: 
                      7: /*
                      8:  * $Header: /f/osi/quipu/RCS/tai_init.c,v 7.1 90/03/15 11:19:12 mrose Exp $
                      9:  *
                     10:  *
                     11:  * $Log:       tai_init.c,v $
                     12:  * Revision 7.1  90/03/15  11:19:12  mrose
                     13:  * quipu-sync
                     14:  * 
                     15:  * Revision 7.0  89/11/23  22:18:10  mrose
                     16:  * Release 6.0
                     17:  * 
                     18:  */
                     19: 
                     20: /*
                     21:  *                                NOTICE
                     22:  *
                     23:  *    Acquisition, use, and distribution of this module and related
                     24:  *    materials are subject to the restrictions of a license agreement.
                     25:  *    Consult the Preface in the User's Manual for the full terms of
                     26:  *    this agreement.
                     27:  *
                     28:  */
                     29: 
                     30: 
                     31: #include "quipu/util.h"
                     32: #include "tailor.h"
                     33: 
                     34: extern  char    *dsatailfile;
                     35: 
                     36: #define MAXTAIARGS      100
                     37: 
                     38: extern  LLog    *log_dsap;
                     39: 
                     40: 
                     41: dsa_tai_init(name)
                     42: char    *name;
                     43: {
                     44:        FILE    *fp;
                     45:        char    buf[BUFSIZ];
                     46:        char   *cp;
                     47: 
                     48:        isodetailor (name,0);
                     49: 
                     50:        if( (fp = fopen(cp = isodefile(dsatailfile, 0), "r")) == (FILE *)NULL){
                     51:                LLOG (log_dsap,LLOG_FATAL, ("Cannot open tailor file '%s'", cp));
                     52:                fatal (-46, "Cannot open quiputailor");
                     53:        }
                     54: 
                     55:        while(fgets(buf, sizeof(buf), fp) != NULLCP)
                     56:                if ( (*buf != '#') && (*buf != '\n') )
                     57:                        /* not a comment or blank */
                     58:                        if (dsa_tai_string (buf) == NOTOK)
                     59:                                LLOG (log_dsap,LLOG_EXCEPTIONS,("tai_string failed %s",buf));
                     60: 
                     61:        (void) fclose(fp);
                     62:        isodexport(NULLCP);
                     63:        return OK;
                     64: }
                     65: 
                     66: 
                     67: dsa_tai_string (str)
                     68: char * str;
                     69: {
                     70:        char    *args[MAXTAIARGS];
                     71:        char    *p, *index();
                     72:        int     ac;
                     73: 
                     74:        if( (p = index(str, '\n')) != NULLCP)
                     75:                *p = '\0';
                     76: 
                     77:        if((ac = sstr2arg(str, MAXTAIARGS, args, " \t,")) == NOTOK) {
                     78:                LLOG (log_dsap,LLOG_EXCEPTIONS,("too many tailor parameters"));
                     79:                return(NOTOK);
                     80:        }
                     81:        if(ac <= 1) {
                     82:                LLOG (log_dsap,LLOG_EXCEPTIONS,("no option set",str));
                     83:                return (NOTOK);
                     84:        }
                     85:        return (dsa_sys_tai(ac, args));
                     86: 
                     87: }

unix.superglobalmegacorp.com

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