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.11 by greg, Thu Apr 28 17:46:25 2011 UTC vs.
Revision 2.13 by greg, Fri Jan 1 02:10:32 2021 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10   #include "copyright.h"
11  
12   #include  <ctype.h>
13 #include  <string.h>
13  
14   #include  "rtio.h"
15  
# Line 83 | Line 82 | iskip(char *s)                 /* skip integer in string */
82   {
83          while (isspace(*s))
84                  s++;
85 <        if ((*s == '-') | (*s == '+'))
87 <                s++;
85 >        s += (*s == '-') | (*s == '+');
86          if (!isdigit(*s))
87                  return(NULL);
88          do
# Line 101 | Line 99 | fskip(char *s)                 /* skip float in string */
99  
100          while (isspace(*s))
101                  s++;
102 <        if ((*s == '-') | (*s == '+'))
105 <                s++;
102 >        s += (*s == '-') | (*s == '+');
103          cp = s;
104          while (isdigit(*cp))
105                  cp++;
# Line 164 | 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