1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
|
/* |
5 |
|
* Compute time-step glare using imageless DGP calculation method. |
6 |
|
* |
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) |
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); |
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]) { |