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

Comparing ray/src/cv/bsdfpeaks.c (file contents):
Revision 2.3 by greg, Wed May 21 23:10:55 2025 UTC vs.
Revision 2.5 by greg, Tue Jun 3 21:31:51 2025 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10   #include <stdio.h>
11   #include <stdlib.h>
12   #include <math.h>
13 + #include "paths.h"
14   #include "bsdfrep.h"
15  
16   typedef struct {
# Line 21 | Line 22 | typedef struct {
22  
23   typedef double  eval_f(const FVECT vin, const FVECT vout, const void *p);
24  
24 char    *progname;              /* needed by bsdfrep.c */
25
25   /* Comparison function to put larger peaks first */
26   int
27   cmpFWHM(const void *p0, const void *p1)
# Line 127 | Line 126 | main(int argc, char *argv[])
126          int             ndirs;
127          FWHM            *peaka;
128          int             i;
129 <
130 <        progname = argv[0];
129 >                                                /* set global progname */
130 >        fixargv0(argv[0]);
131          if (argc < 2)
132                  goto userr;
133  
# Line 194 | Line 193 | main(int argc, char *argv[])
193                          printf("\t%.1f", 180./M_PI * getFWHM(peaka[i].rbs->invec,
194                                                  vout, sqrt(psa/M_PI),
195                                                  bsdf_eval, sd));
196 +                        SDfreeCache(sd);
197                  }
198                  fputc('\n', stdout);
199          }
200 +        /*                      we're exiting, anyway...
201 +        SDfreeCache(NULL);
202 +        clear_bsdf_rep();
203 +        */
204          return(0);
205   userr:
206          fprintf(stderr, "Usage: %s bsdf.sir [bsdfrep1.xml ..]\n", progname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines