#ifndef lint static char *rcs = "$Header: profile.c,v 1.1 88/01/15 13:05:09 simpson Rel $"; #endif /* $Log: profile.c,v $ * Revision 1.1 88/01/15 13:05:09 simpson * initial release * * Revision 0.1 87/12/11 18:31:15 simpson * beta test * */ /* Profile(3) related routines */ #include #include /* Returns the value of a binding in the configuration stanza with the key * equal to the formal parameter name. It returns NULL if unsuccessful. */ PROFILE_VALUE *getbindingvalue(key) char *key; { FILE *config; static PROFILE_STANZA *s; PROFILE_BINDING *b; if (!s) if (config = fopen("configuration", "r")) { if (!(s = profile_read_stanza(config))) { (void)fclose(config); return NULL; } (void)fclose(config); } else return NULL; if (b = profile_has_binding(s, key)) return b->value; return NULL; }