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

Comparing ray/src/common/words.c (file contents):
Revision 2.12 by greg, Sat Dec 28 18:05:14 2019 UTC vs.
Revision 2.13 by greg, Fri Jan 1 02:10:32 2021 UTC

# Line 82 | Line 82 | iskip(char *s)                 /* skip integer in string */
82   {
83          while (isspace(*s))
84                  s++;
85 <        if ((*s == '-') | (*s == '+'))
86 <                s++;
85 >        s += (*s == '-') | (*s == '+');
86          if (!isdigit(*s))
87                  return(NULL);
88          do
# Line 100 | Line 99 | fskip(char *s)                 /* skip float in string */
99  
100          while (isspace(*s))
101                  s++;
102 <        if ((*s == '-') | (*s == '+'))
104 <                s++;
102 >        s += (*s == '-') | (*s == '+');
103          cp = s;
104          while (isdigit(*cp))
105                  cp++;
# Line 163 | Line 161 | isname(char *s)                        /* check for legal identifier name *
161   {
162          while (*s == '_')                       /* skip leading underscores */
163                  s++;
164 <        if (!isascii(*s) || !isalpha(*s))       /* start with a letter */
164 >        if (!isascii(*s) | !isalpha(*s))        /* start with a letter */
165                  return(0);
166          while (isascii(*++s) && isgraph(*s))    /* all visible characters */
167                  ;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines