|
|
1.1 root 1: /*
2: * open the next Systems file in sequence
3: * all occurrences of `fopen(SYSFILE)' should be turned into
4: * loops that come here
5: * currently these exist in conn.c uuname.c versys.c
6: * the names are also known by uucheck.c
7: */
8:
9: #include "uucp.h"
10:
11: #ifdef MANYSYS
12:
13: /*
14: * suffixes to be tacked onto SYSFILE
15: */
16:
17: char *Sysnames[] = {
18: ".local",
19: ".dk",
20: "", /* just plain Systems */
21: "1",
22: ".gen",
23: NULL
24: };
25:
26: int Nextsys;
27:
28: sysrewind()
29: {
30:
31: Nextsys = 0;
32: }
33:
34: FILE *
35: sysopen(mode)
36: char *mode;
37: {
38: FILE *fp;
39: char buf[MAXFULLNAME];
40:
41: while (Sysnames[Nextsys] != NULL) {
42: sprintf(buf, "%s%s", SYSFILE, Sysnames[Nextsys]);
43: Nextsys++;
44: CDEBUG(4, "try %s\n", buf);
45: if ((fp = fopen(buf, mode)) != NULL)
46: return (fp);
47: }
48: return (NULL);
49: }
50:
51: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.