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

Comparing ray/src/util/findglare.c (file contents):
Revision 2.14 by greg, Tue Jul 29 21:36:08 2014 UTC vs.
Revision 2.17 by greg, Sun Jan 15 16:38:10 2023 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include "glare.h"
11  
12 #define FEQ(a,b)        ((a)-(b)<=FTINY&&(b)-(a)<=FTINY)
13 #define VEQ(v1,v2)      (FEQ((v1)[0],(v2)[0])&&FEQ((v1)[1],(v2)[1]) \
14                                &&FEQ((v1)[2],(v2)[2]))
15
12   char    *rtargv[64] = {"rtrace", "-h-", "-ov", "-fff", "-ld-", "-i-", "-I-"};
13   int     rtargc = 7;
14  
# Line 195 | Line 191 | main(
191                          exit(1);
192                  }
193                  ourview = pictview;
194 <        } else if (picture != NULL && !VEQ(ourview.vp, pictview.vp)) {
194 >        } else if (picture != NULL && !VABSEQ(ourview.vp, pictview.vp)) {
195                  fprintf(stderr, "%s: picture must have same viewpoint\n",
196                                  progname);
197                  exit(1);
# Line 247 | Line 243 | angcmp(                /* compare two angles */
243          const void      *ap2
244   )
245   {
246 <        register int    a1, a2;
246 >        int     a1, a2;
247  
248          a1 = *(ANGLE *)ap1;
249          a2 = *(ANGLE *)ap2;
# Line 264 | Line 260 | static void
260   init(void)                              /* initialize global variables */
261   {
262          double  d;
263 <        register int    i;
263 >        int     i;
264  
265          if (verbose)
266                  fprintf(stderr, "%s: initializing data structures...\n",
# Line 352 | Line 348 | cleanup(void)                          /* close files, wait for children */
348   }
349  
350  
351 < extern int
351 > int
352   compdir(                        /* compute direction for x,y */
353          FVECT   vd,
354          int     x,
# Line 385 | Line 381 | compdir(                       /* compute direction for x,y */
381   }
382  
383  
384 < extern double
384 > double
385   pixsize(                /* return the solid angle of pixel at (x,y) */
386          int     x,
387          int     y
388   )
389   {
390 <        register int    hl, xo;
390 >        int     hl, xo;
391          double  disc;
392  
393          hl = hlim(y);
# Line 408 | Line 404 | pixsize(               /* return the solid angle of pixel at (x,y)
404   }
405  
406  
407 < extern void
407 > void
408   memerr(                 /* malloc failure */
409          char    *s
410   )
# Line 421 | Line 417 | memerr(                        /* malloc failure */
417   static void
418   printsources(void)                      /* print out glare sources */
419   {
420 <        register struct source  *sp;
420 >        struct source   *sp;
421  
422          printf("BEGIN glare source\n");
423          for (sp = donelist; sp != NULL; sp = sp->next)
424 <                printf("\t%f %f %f\t%f\t%f\n",
424 >                printf("\t%f %f %f\t%e\t%e\n",
425                                  sp->dir[0], sp->dir[1], sp->dir[2],
426                                  sp->dom, sp->brt);
427          printf("END glare source\n");
# Line 435 | Line 431 | printsources(void)                     /* print out glare sources */
431   static void
432   printillum(void)                        /* print out indirect illuminances */
433   {
434 <        register int    i;
434 >        int     i;
435  
436          printf("BEGIN indirect illuminance\n");
437          for (i = 0; i < nglardirs; i++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines