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

Comparing ray/src/common/fgetval.c (file contents):
Revision 2.1 by greg, Fri Jun 30 16:06:09 1995 UTC vs.
Revision 2.2 by greg, Tue Aug 22 08:52:14 1995 UTC

# Line 29 | Line 29 | register FILE  *fp;
29   int     ty;
30   char    *vp;
31   {
32        static char     delims[] = " \t\n\r\f#";
32          char    wrd[64];
33          register char   *cp;
34          register int    c;
# Line 55 | Line 54 | char   *vp;
54          *cp = '\0';
55          switch (ty) {                   /* check and convert it */
56          case 'h':                       /* short */
57 <                if (!isintd(wrd, delims))
57 >                if (!isint(wrd))
58                          return(0);
59                  *(short *)vp = c = atoi(wrd);
60                  if (*(short *)vp != c)
61                          return(0);
62                  return(1);
63          case 'i':                       /* integer */
64 <                if (!isintd(wrd, delims))
64 >                if (!isint(wrd))
65                          return(0);
66                  *(int *)vp = atoi(wrd);
67                  return(1);
68          case 'l':                       /* long */
69 <                if (!isintd(wrd, delims))
69 >                if (!isint(wrd))
70                          return(0);
71                  *(long *)vp = atol(wrd);
72                  return(1);
73          case 'f':                       /* float */
74 <                if (!isfltd(wrd, delims))
74 >                if (!isflt(wrd))
75                          return(0);
76                  *(float *)vp = atof(wrd);
77                  return(1);
78          case 'd':                       /* double */
79 <                if (!isfltd(wrd, delims))
79 >                if (!isflt(wrd))
80                          return(0);
81                  *(double *)vp = atof(wrd);
82                  return(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines