ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/fgetword.c
(Generate patch)

Comparing ray/src/common/fgetword.c (file contents):
Revision 2.5 by schorsch, Sun Jul 27 22:12:01 2003 UTC vs.
Revision 2.6 by greg, Wed Oct 12 03:37:54 2005 UTC

# Line 15 | Line 15 | static const char      RCSid[] = "$Id$";
15  
16  
17   char *
18 < fgetword(s, n, fp)              /* get (quoted) word up to n-1 characters */
19 < char  *s;
20 < int  n;
21 < register FILE  *fp;
18 > fgetword(                       /* get (quoted) word up to n-1 characters */
19 >        char  *s,
20 >        int  n,
21 >        register FILE  *fp
22 > )
23   {
24          int  quote = '\0';
25          register char  *cp;
26          register int  c;
27 +                                        /* sanity checks */
28 +        if ((s == NULL) | (n <= 0))
29 +                return(NULL);
30                                          /* skip initial white space */
31          do
32                  c = getc(fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines