--- ray/src/common/wordfile.c 1993/04/02 09:11:35 2.6 +++ ray/src/common/wordfile.c 2003/06/08 12:03:09 2.11 @@ -1,18 +1,26 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: wordfile.c,v 2.11 2003/06/08 12:03:09 schorsch Exp $"; #endif - /* * Load whitespace separated words from a file into an array. * Assume the passed pointer array is big enough to hold them all. + * + * External symbols declared in standard.h */ +#include "copyright.h" + #include +#include +#include +#include +#include +#include -#define NULL 0 +#include "standard.h" +#include "platform.h" + #define MAXFLEN 8192 /* file must be smaller than this */ extern char *bmalloc(); @@ -27,6 +35,8 @@ char *fname; char buf[MAXFLEN]; register int n; /* load file into buffer */ + if (fname == NULL) + return(-1); /* no filename */ if ((fd = open(fname, 0)) < 0) return(-1); /* open error */ n = read(fd, buf, MAXFLEN);