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

Comparing ray/src/common/badarg.c (file contents):
Revision 2.7 by greg, Sun Jun 10 17:50:29 2012 UTC vs.
Revision 2.12 by greg, Mon Feb 6 22:40:21 2023 UTC

# Line 18 | Line 18 | int
18   badarg(         /* check argument list */
19   int     ac,
20   char    **av,
21 < char    *fl
21 > const char      *fl
22   )
23   {
24          int     i;
# Line 34 | Line 34 | char   *fl
34                  case 's':               /* string */
35                          while (isspace(*s))
36                                  ++s;
37 <                        if (*s == '\0')
38 <                                return(i);
39 <                        while (*s)
40 <                                if (!isascii(*s++))
41 <                                        return(i);
37 >                        if (!isprint(*s))
38 >                                return(i);
39 >                        while (isprint(*s) | isspace(*s))
40 >                                ++s;
41 >                        if (*s)
42 >                                return(i);
43                          break;
44                  case 'i':               /* integer */
45                          if (!isintd(s, " \t\r\n"))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines