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

Comparing ray/src/util/xglaresrc.c (file contents):
Revision 2.10 by greg, Wed Jan 24 04:39:52 2018 UTC vs.
Revision 2.12 by greg, Thu May 14 20:58:03 2020 UTC

# Line 205 | Line 205 | circle_sources(                /* circle sources listed in fp */
205                                  XFlush(theDisplay);
206                                  return;
207                          }
208 <                        if (sscanf(linbuf, "%lf %lf %lf %lf %lf",
209 <                                        &dir[0], &dir[1], &dir[2],
210 <                                        &dom, &lum) != 5)
208 >                        if (sscanf(linbuf, FVFORMAT,
209 >                                        &dir[0], &dir[1], &dir[2]) != 3 ||
210 >                                        sscanf(sskip2(linbuf, 3), "%lf %lf",
211 >                                                &dom, &lum) != 2)
212                                  break;
213                          circle(dir, dom);
214                          value(dir, lum);
# Line 240 | Line 241 | circle(                /* indicate a solid angle on image */
241                  cur[0] += ourview.vp[0];
242                  cur[1] += ourview.vp[1];
243                  cur[2] += ourview.vp[2];
244 <                if (viewloc(pp, &ourview, cur) <= 0)
244 >                if (viewloc(pp, &ourview, cur) != VL_GOOD)
245                          goto fail;
246                  loc2pix(ip, &pres, pp[0], pp[1]);
247                  pt[i].x = ip[0];
# Line 268 | Line 269 | value(                 /* print value on image */
269          pos[0] = ourview.vp[0] + dir[0];
270          pos[1] = ourview.vp[1] + dir[1];
271          pos[2] = ourview.vp[2] + dir[2];
272 <        if (viewloc(pp, &ourview, pos) <= 0)
272 >        if (viewloc(pp, &ourview, pos) != VL_GOOD)
273                  return;
274          loc2pix(ip, &pres, pp[0], pp[1]);
275          sprintf(buf, "%.0f", v);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines