
/*
 *  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;
}


