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

Comparing ray/src/cv/ies2rad.c (file contents):
Revision 2.16 by gregl, Fri Jul 25 12:08:06 1997 UTC vs.
Revision 2.17 by gregl, Mon Nov 10 10:13:58 1997 UTC

# Line 968 | Line 968 | char *
968   getword(fp)                     /* scan a word from fp */
969   register FILE   *fp;
970   {
971 <        static char     word[MAXWORD];
971 >        static char     wrd[MAXWORD];
972          register char   *cp;
973          register int    c;
974  
975          while (isspace(c=getc(fp)))
976                  ;
977 <        for (cp = word; c != EOF && cp < word+MAXWORD-1;
977 >        for (cp = wrd; c != EOF && cp < wrd+MAXWORD-1;
978                          *cp++ = c, c = getc(fp))
979                  if (isspace(c) || c == ',') {
980                          while (isspace(c))
# Line 982 | Line 982 | register FILE  *fp;
982                          if (c != EOF & c != ',')
983                                  ungetc(c, fp);
984                          *cp = '\0';
985 <                        return(word);
985 >                        return(wrd);
986                  }
987          *cp = '\0';
988 <        return(cp > word ? word : NULL);
988 >        return(cp > wrd ? wrd : NULL);
989   }
990  
991  
992 < cvtint(ip, word)                /* convert a word to an integer */
992 > cvtint(ip, wrd)                 /* convert a word to an integer */
993   int     *ip;
994 < char    *word;
994 > char    *wrd;
995   {
996 <        if (word == NULL || !isint(word))
996 >        if (wrd == NULL || !isint(wrd))
997                  return(0);
998 <        *ip = atoi(word);
998 >        *ip = atoi(wrd);
999          return(1);
1000   }
1001  
1002  
1003 < cvtflt(rp, word)                /* convert a word to a double */
1003 > cvtflt(rp, wrd)                 /* convert a word to a double */
1004   double  *rp;
1005 < char    *word;
1005 > char    *wrd;
1006   {
1007 <        if (word == NULL || !isflt(word))
1007 >        if (wrd == NULL || !isflt(wrd))
1008                  return(0);
1009 <        *rp = atof(word);
1009 >        *rp = atof(wrd);
1010          return(1);
1011   }
1012  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines