1: #ifndef lint
2: static char sccsid[] = "@(#)versys.c 5.1 (Berkeley) 7/2/83";
3: #endif
4:
5: #include "uucp.h"
6:
7: #define SNAMESIZE 7
8:
9: /*******
10: * versys(name) verify system names n1 and n2
11: * char *name;
12: *
13: * return codes: 0 | FAIL
14: */
15:
16: versys(name)
17: register char *name;
18: {
19: register FILE *fp;
20: char line[1000];
21: char s1[SNAMESIZE + 1];
22: char myname[SNAMESIZE + 1];
23:
24: sprintf(myname, "%.7s", Myname);
25: sprintf(s1, "%.7s", name);
26: if (strcmp(s1, myname) == 0)
27: return(0);
28:
29: fp = fopen(SYSFILE, "r");
30: ASSERT(fp != NULL, "CAN'T OPEN", SYSFILE, 0);
31: while (cfgets(line, sizeof(line), fp) != NULL) {
32: char *targs[100];
33:
34: getargs(line, targs);
35: targs[0][7] = '\0';
36: if (strcmp(s1, targs[0]) == SAME) {
37: fclose(fp);
38: return(0);
39: }
40: }
41: fclose(fp);
42: return(FAIL);
43: }
Defined functions
Defined variables
sccsid
defined in line
2;
never used
Defined macros