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.15 by greg, Fri Feb 12 00:53:56 2021 UTC vs.
Revision 2.18 by greg, Tue Jun 3 21:31:51 2025 UTC

# Line 20 | Line 20 | char   *picture = NULL;                /* picture file name */
20   char    *octree = NULL;                 /* octree file name */
21  
22   int     verbose = 0;                    /* verbose reporting */
23 char    *progname;                      /* global argv[0] */
23  
24   double  threshold = 0.;                 /* glare threshold */
25  
# Line 53 | Line 52 | main(
52          int     gotview = 0;
53          int     rval, i;
54          char    *err;
55 <
56 <        progname = argv[0];
55 >                                        /* set global progname */
56 >        fixargv0(argv[0]);
57                                          /* process options */
58          for (i = 1; i < argc && argv[i][0] == '-'; i++) {
59                                                  /* expand arguments */
# Line 243 | Line 242 | angcmp(                /* compare two angles */
242          const void      *ap2
243   )
244   {
245 <        register int    a1, a2;
245 >        int     a1, a2;
246  
247          a1 = *(ANGLE *)ap1;
248          a2 = *(ANGLE *)ap2;
# Line 260 | Line 259 | static void
259   init(void)                              /* initialize global variables */
260   {
261          double  d;
262 <        register int    i;
262 >        int     i;
263  
264          if (verbose)
265                  fprintf(stderr, "%s: initializing data structures...\n",
# Line 348 | Line 347 | cleanup(void)                          /* close files, wait for children */
347   }
348  
349  
350 < extern int
350 > int
351   compdir(                        /* compute direction for x,y */
352          FVECT   vd,
353          int     x,
# Line 381 | Line 380 | compdir(                       /* compute direction for x,y */
380   }
381  
382  
383 < extern double
383 > double
384   pixsize(                /* return the solid angle of pixel at (x,y) */
385          int     x,
386          int     y
387   )
388   {
389 <        register int    hl, xo;
389 >        int     hl, xo;
390          double  disc;
391  
392          hl = hlim(y);
# Line 404 | Line 403 | pixsize(               /* return the solid angle of pixel at (x,y)
403   }
404  
405  
406 < extern void
406 > void
407   memerr(                 /* malloc failure */
408          char    *s
409   )
# Line 417 | Line 416 | memerr(                        /* malloc failure */
416   static void
417   printsources(void)                      /* print out glare sources */
418   {
419 <        register struct source  *sp;
419 >        struct source   *sp;
420  
421          printf("BEGIN glare source\n");
422          for (sp = donelist; sp != NULL; sp = sp->next)
423 <                printf("\t%f %f %f\t%f\t%f\n",
423 >                printf("\t%f %f %f\t%e\t%e\n",
424                                  sp->dir[0], sp->dir[1], sp->dir[2],
425                                  sp->dom, sp->brt);
426          printf("END glare source\n");
# Line 431 | Line 430 | printsources(void)                     /* print out glare sources */
430   static void
431   printillum(void)                        /* print out indirect illuminances */
432   {
433 <        register int    i;
433 >        int     i;
434  
435          printf("BEGIN indirect illuminance\n");
436          for (i = 0; i < nglardirs; i++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines