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

Comparing ray/src/util/dcglare.c (file contents):
Revision 2.6 by greg, Fri Mar 11 02:27:02 2022 UTC vs.
Revision 2.9 by greg, Fri Jun 6 19:11:21 2025 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4   /*
5   * Compute time-step glare using imageless DGP calculation method.
6   *
# Line 27 | Line 30
30   */
31  
32   #include <ctype.h>
33 + #include "paths.h"
34   #include "platform.h"
35   #include "standard.h"
36   #include "cmatrix.h"
37   #include "resolu.h"
38   #include "cmglare.h"
39  
36 char    *progname;                      /* global argv[0] */
37
40   /* Sum together a set of images and write result to fout */
41   static int
42   sum_images(const char *fspec, const CMATRIX *cv, FILE *fout)
# Line 93 | Line 95 | sum_images(const char *fspec, const CMATRIX *cv, FILE
95                  }
96                                                          /* flat file check */
97                  if ((data_start = ftell(fp)) > 0 && fseek(fp, 0L, SEEK_END) == 0) {
98 <                        flat_file = (ftell(fp) == data_start + sizeof(COLR)*xr*yr);
98 >                        flat_file = (ftell(fp) >= data_start + sizeof(COLR)*xr*yr);
99                          if (fseek(fp, data_start, SEEK_SET) < 0) {
100                                  sprintf(errmsg, "cannot seek on picture '%s'", fname);
101                                  error(SYSTEM, errmsg);
# Line 184 | Line 186 | main(int argc, char *argv[])
186          clock_t timer = clock();
187   #endif /* DC_GLARE */
188  
189 <        progname = argv[0];
189 >        fixargv0(argv[0]);
190                                          /* get options */
191          for (a = 1; a < argc && argv[a][0] == '-'; a++)
192                  switch (argv[a][1]) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines