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 1.8 by greg, Tue Jan 16 11:29:43 1990 UTC vs.
Revision 1.9 by greg, Tue Jan 16 16:21:07 1990 UTC

# Line 143 | Line 143 | register char  *av[];
143   #define check(c,n)      if ((av[0][c]&&av[0][c]!=' ') || n>=ac) return(-1)
144          extern double  atof();
145  
146 <        if (av[0][0] != '-' || av[0][1] != 'v')
146 >        if (ac <= 0 || av[0][0] != '-' || av[0][1] != 'v')
147                  return(-1);
148          switch (av[0][2]) {
149          case 't':                       /* type */
# Line 205 | Line 205 | register char  *s;
205  
206          while (*s == ' ')
207                  s++;
208 <        do {
208 >        while (*s) {
209                  ac = 0;
210                  do {
211                          av[ac++] = s;
# Line 218 | Line 218 | register char  *s;
218                          if (na+1 < ac)
219                                  s = av[na+1];
220                          nvopts++;
221 <                }
222 <        } while (*s);
221 >                } else if (ac > 1)
222 >                        s = av[1];
223 >        }
224          return(nvopts);
225   }
226  
# Line 233 | Line 234 | FILE  *fp;
234          fprintf(fp, " -vd %.6g %.6g %.6g", vp->vdir[0], vp->vdir[1], vp->vdir[2]);
235          fprintf(fp, " -vu %.6g %.6g %.6g", vp->vup[0], vp->vup[1], vp->vup[2]);
236          fprintf(fp, " -vh %.6g -vv %.6g", vp->horiz, vp->vert);
237 <        fprintf(fp, " -vs %d -vl %d", vp->hoff, vp->voff);
237 >        fprintf(fp, " -vs %.6g -vl %.6g", vp->hoff, vp->voff);
238   }
239  
240  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines