home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * LSYS.C
- *
- * $Header: Beta:src/uucp/src/lib/RCS/lsys.c,v 1.1 90/02/02 12:08:20 dillon Exp Locker: dillon $
- *
- * (C) Copyright 1989-1990 by Matthew Dillon, All Rights Reserved.
- *
- */
-
- #include <exec/types.h>
- #include <stdio.h>
- #include "config.h"
-
- Prototype int is_in_L_sys_file(const char *);
-
- int
- is_in_L_sys_file(system_name)
- const char *system_name;
- {
- static char buf[256];
- static char system[128];
- FILE *fd;
- char *lsysFile = MakeConfigPath(UULIB, "L.sys");
-
- if (!(fd = fopen(lsysFile, "r"))) {
- printf("Couldn't open %s\n", lsysFile);
- exit(1);
- }
-
- sprintf(system, "%s ", system_name);
-
- while (fgets(buf, sizeof buf, fd)) {
- if (buf[0] == '#' || buf[0] == '\n')
- continue;
- if (strncmp(buf, system, strlen(system)) == 0) {
- fclose(fd);
- return TRUE;
- }
- }
- fclose(fd);
- return FALSE;
- }
-
-
-