home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
341b.lha
/
uucp1_v1.03d
/
src
/
lib
/
lsys.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-28
|
621b
|
39 lines
/*
* LSYS.C
*
* (C) Copyright 1989-1990 by Matthew Dillon, All Rights Reserved.
*
*/
#include <stdio.h>
int
is_in_L_sys_file(system_name)
char *system_name;
{
static char buf[256];
static char system[128];
FILE *fd;
if (!(fd = fopen("UULIB:L.sys","r"))) {
printf("Couldn't open UULIB:L.sys file\n");
exit(1);
}
sprintf(system,"%s ", system_name);
while (NULL != 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;
}