|
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 s
Length: 3473 (0xd91) Types: TextFile Names: »sys_tai.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/dsap/dua/sys_tai.c«
/* sys_tai.c - System tailoring routines */ #ifndef lint static char *rcsid = "$Header: /f/osi/dsap/dua/RCS/sys_tai.c,v 6.0 89/03/18 23:28:06 mrose Rel $"; #endif /* * $Header: /f/osi/dsap/dua/RCS/sys_tai.c,v 6.0 89/03/18 23:28:06 mrose Rel $ * * * $Log: sys_tai.c,v $ * Revision 6.0 89/03/18 23:28:06 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 "cmd_srch.h" #include "tailor.h" extern char *oidtable, *dsa_address, *picture_process, *local_dit, dishinit, *myname; extern LLog *log_dsap; extern LLog *log_dua; extern int oidformat,sizelimit; #define SYSLOG 2 #define OIDTAB 4 #define OIDFMT 5 #define USERLOG 10 #define SIZELIMIT 12 #define DSAADDR 18 #define PHOTO 19 #define LOCAL_DIT 20 #define DISH_INIT 21 static CMD_TABLE cmdtab[] = { "DSAPLOG", SYSLOG, "USERLOG", USERLOG, "OIDTABLE", OIDTAB, "OIDFORMAT", OIDFMT, "SIZELIMIT", SIZELIMIT, "DSA_ADDRESS", DSAADDR, "PHOTO", PHOTO, "LOCAL_DIT", LOCAL_DIT, "QUIPURC", DISH_INIT, 0, -1, }; static CMD_TABLE oidtab[] = { "SHORT", 1, "LONG", 2, "NUMERIC", 3, 0, 1, /* default short */ }; /* * do system wide initialisations */ char *dsap_tai_alloc(); dsap_tai (argc, argv) char **argv; { char *arg; extern char * getenv (); if(argc < 2) return(NOTOK); arg = dsap_tai_alloc(argv[1]); switch(cmd_srch(argv[0], cmdtab)) { case SYSLOG: LLOG (log_dsap,LLOG_DEBUG,( "Tailor SYSLOG %s", arg)); log_tai(log_dsap, &argv[1], argc-1); break; case USERLOG: LLOG (log_dsap,LLOG_DEBUG,( "Tailor USERLOG %s", arg)); log_tai(log_dua, &argv[1], argc-1); break; case OIDTAB: LLOG (log_dsap,LLOG_DEBUG,( "Tailor OIDTable=%s", arg)); oidtable = strdup (arg); break; case LOCAL_DIT: LLOG (log_dsap,LLOG_DEBUG,( "Tailor local_DIT=%s", arg)); local_dit = strdup (arg); break; case OIDFMT: LLOG (log_dsap,LLOG_DEBUG,( "Tailor OIDFMT=%s", arg)); oidformat = cmd_srch (arg,oidtab); break; case SIZELIMIT: sizelimit = atoi (arg); break; case DISH_INIT: if (lexequ (arg,"on") == 0) dishinit = TRUE; break; case PHOTO: LLOG (log_dsap,LLOG_DEBUG,( "Tailor photo=%s", arg)); if (strcmp(getenv("TERM"),arg) == 0) { if (*argv[2] == '/') picture_process = strdup(argv[2]); else { char proc [LINESIZE]; (void) strcpy (proc,isodefile("g3fax/")); (void) strcat (proc,argv[2]); picture_process = strdup(proc); } } break; case DSAADDR: if (myname == NULLCP) { /* use first 'dsa_address' in tailor file */ DLOG (log_dsap,LLOG_DEBUG,( "Tailor DSA_ADDRESS=%s", argv[2])); dsa_address = strdup (argv[2]); myname = dsa_address; } else if (dsa_address == NULLCP) { /* User has given a '-c flag' */ /* look for entry in address list */ if (lexequ (arg,myname) == 0) { DLOG (log_dsap,LLOG_DEBUG,( "Tailor DSA_ADDRESS (USER) =%s", argv[2])); dsa_address = strdup (argv[2]); } } break; default: LLOG (log_dsap,LLOG_EXCEPTIONS, ("Unknown tailor option %s",arg)); return (NOTOK); } return (OK); }