|
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 l
Length: 2459 (0x99b) Types: TextFile Names: »log_tai.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/compat/log_tai.c«
/* log_tai.c - system tailoring routines */ #ifndef lint static char *rcsid = "$Header: /f/osi/compat/RCS/log_tai.c,v 6.0 89/03/18 23:25:22 mrose Rel $"; #endif /* * $Header: /f/osi/compat/RCS/log_tai.c,v 6.0 89/03/18 23:25:22 mrose Rel $ * * * $Log: log_tai.c,v $ * Revision 6.0 89/03/18 23:25:22 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 <stdio.h> #include "cmd_srch.h" #include "general.h" #include "manifest.h" #include "logger.h" /* \f */ #define LG_FILE 1 #define LG_SFLAGS 2 #define LG_DFLAGS 3 #define LG_LEVEL 4 #define LG_SIZE 5 #define LG_DLEVEL 6 static CMD_TABLE log_tbl[] = { "FILE", LG_FILE, "SFLAGS", LG_SFLAGS, "DFLAGS", LG_DFLAGS, "LEVEL", LG_LEVEL, "SLEVEL", LG_LEVEL, "DLEVEL", LG_DLEVEL, "SIZE", LG_SIZE, 0, -1, }; static CMD_TABLE log_lvltbl[] = { "NONE", LLOG_NONE, "FATAL", LLOG_FATAL, "EXCEPTIONS", LLOG_EXCEPTIONS, "NOTICE", LLOG_NOTICE, "TRACE", LLOG_TRACE, "DEBUG", LLOG_DEBUG, "PDUS", LLOG_PDUS, "ALL", LLOG_ALL, 0, -1 }; static CMD_TABLE log_flgtbl[] = { "CLOSE", LLOGCLS, "CREATE", LLOGCRT, "ZERO", LLOGZER, "TTY", LLOGTTY, 0, -1 }; /* \f */ log_tai(lgptr, av, ac) /* for now only alter the level - files etc later */ LLog *lgptr; char **av; int ac; { register int i; register char *p; int val; for(i = 0; i < ac; i++) { if((p = index(av[i], '=')) == NULLCP) continue; *p++ = NULL; switch(cmd_srch(av[i], log_tbl)) { case LG_LEVEL: val = cmd_srch(p,log_lvltbl); if (val != -1) lgptr->ll_events |= val; break; case LG_DLEVEL: val = cmd_srch(p,log_lvltbl); if (val != -1) lgptr->ll_events &= ~ val; break; case LG_FILE: lgptr->ll_file = strdup (p); break; case LG_SFLAGS: val = cmd_srch(p,log_flgtbl); if (val != -1) lgptr->ll_stat |= val; break; case LG_DFLAGS: val = cmd_srch(p,log_flgtbl); if (val != -1) lgptr->ll_stat &= ~ val; break; case LG_SIZE: lgptr->ll_msize = atoi(p); break; } } }