1: /* uucp.c - various parameters for rmail */
2:
3: /* LINTLIBRARY */
4:
5: #include "../h/strings.h"
6: #include <stdio.h>
7:
8:
9: #define NOTOK (-1)
10: #define OK 0
11:
12: #define SYSFILE "/usr/lib/uucp/L.sys"
13:
14: /* */
15:
16: int uucpsite (system)
17: register char *system;
18: {
19: register char *bp;
20: char buffer[BUFSIZ];
21: register FILE *fp;
22:
23: if ((fp = fopen (SYSFILE, "r")) == NULL)
24: return NOTOK;
25:
26: while (fgets (buffer, sizeof buffer, fp)) {
27: if (strncmp (buffer, "xxx", 3) == 0
28: || (bp = index (buffer, ' ')) == NULL)
29: continue;
30: *bp = NULL;
31: if (strcmp (buffer, system) == 0) {
32: (void) fclose (fp);
33: return OK;
34: }
35: }
36:
37: (void) fclose (fp);
38: return NOTOK;
39: }
Defined functions
Defined macros
NOTOK
defined in line
9; used 2 times
OK
defined in line
10; used 1 times