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

Comparing ray/src/common/image.c (file contents):
Revision 2.48 by greg, Fri Apr 27 18:09:26 2018 UTC vs.
Revision 2.49 by greg, Tue Aug 7 23:17:06 2018 UTC

# Line 386 | Line 386 | int  ac,
386   char  *av[]
387   )
388   {
389 < #define check(c,l)      if ((av[0][c]&&av[0][c]!=' ') || \
389 > #define check(c,l)      if ((av[0][c]&&!isspace(av[0][c])) || \
390                          badarg(ac-1,av+1,l)) return(-1)
391  
392          if (ac <= 0 || av[0][0] != '-' || av[0][1] != 'v')
393                  return(-1);
394          switch (av[0][2]) {
395          case 't':                       /* type */
396 <                if (!av[0][3] || av[0][3]==' ')
396 >                if (!av[0][3] || isspace(av[0][3]))
397                          return(-1);
398                  check(4,"");
399                  v->type = av[0][3];
# Line 578 | Line 578 | char  *s
578          }
579                                          /* skip leading path */
580          cp = s;
581 <        while (*cp && *cp != ' ')
581 >        while (*cp && !isspace(*cp))
582                  cp++;
583          while (cp > s && !ISDIRSEP(cp[-1]))
584                  cp--;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines