|
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 e
Length: 1531 (0x5fb) Types: TextFile Names: »exists.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─⟦this⟧ »EUUGD11/euug-87hel/sec8/mcp/src/exists.c«
#include <sys/file.h> #include <sys/types.h> #include <strings.h> #include <lastlog.h> #include "sysdep.h" #include "mem.h" #include "lists.h" #include "sort.h" #include "account.h" #include "groupmap.h" #include "class.h" #include "sig.h" #ifdef SENDMAIL extern struct list Aliases; #endif extern struct list AccountList, GroupMapList, Groups, Users; extern struct list Classes, Sigs, Ranges, Vigs; int userexists(s) char *s; { int found; (void) search_list(&Users, s, strcmp, &found); return found; } int groupexists(s) char *s; { int found; (void) search_list(&Groups, s, strcmp, &found); return found; } int classexists(s) char *s; { int found; (void) search_list(&Classes, s, strcmp, &found); return found; } int rangeexists(s) char *s; { int found; (void) search_list(&Ranges, s, strcmp, &found); return found; } int vigexists(s) char *s; { int found; (void) search_list(&Vigs, s, strcmp, &found); return found; } int uidexists(n) int n; { int found; (void) search_list(&AccountList, (char *)&n, iacctcmp, &found); return found; } int gidexists(n) int n; { int found; (void) search_list(&GroupMapList, (char *)&n, igmapcmp, &found); return found; } sigexists(s) char *s; { int found; (void) search_list(&Sigs, s, strcmp, &found); return found; } #ifdef SENDMAIL aliasexists(name) char *name; { int found; (void) search_list(&Aliases, name, strcmp, &found); return found; } #endif SENDMAIL int fileexists(file) char *file; { return access(file, F_OK) == -1 ? 0 : 1; }