50 |
|
#endif |
51 |
|
#endif |
52 |
|
#ifndef SORT_INTVL |
53 |
< |
#define SORT_INTVL (SORT_THRESH<<4) |
53 |
> |
#define SORT_INTVL (SORT_THRESH<<1) |
54 |
|
#endif |
55 |
|
#ifndef MAX_SORT_INTVL |
56 |
< |
#define MAX_SORT_INTVL (SORT_INTVL<<8) |
56 |
> |
#define MAX_SORT_INTVL (SORT_INTVL<<6) |
57 |
|
#endif |
58 |
|
|
59 |
|
static COLOR avsum = BLKCOLOR; /* computed ambient value sum */ |
144 |
|
pos += (long)nambvals*AMBVALSIZ; |
145 |
|
flen = lseek(fileno(ambfp), 0L, 2); |
146 |
|
if (flen != pos) { |
147 |
< |
error(WARNING, |
147 |
> |
sprintf(errmsg, |
148 |
|
"ignoring last %ld values in ambient file (corrupted)", |
149 |
|
(flen - pos)/AMBVALSIZ); |
150 |
+ |
error(WARNING, errmsg); |
151 |
|
fseek(ambfp, pos, 0); |
152 |
|
ftruncate(fileno(ambfp), pos); |
153 |
|
} |
404 |
|
setbuf(ambfp, bmalloc(BUFSIZ+8)); |
405 |
|
if (creat) { /* new file */ |
406 |
|
newheader("RADIANCE", ambfp); |
407 |
< |
fprintf(ambfp, "%s -av %g %g %g -ab %d -aa %g ", |
407 |
> |
fprintf(ambfp, "%s -av %g %g %g -aw %d -ab %d -aa %g ", |
408 |
|
progname, colval(ambval,RED), |
409 |
|
colval(ambval,GRN), colval(ambval,BLU), |
410 |
< |
ambounce, ambacc); |
410 |
> |
ambvwt, ambounce, ambacc); |
411 |
|
fprintf(ambfp, "-ad %d -as %d -ar %d %s\n", |
412 |
|
ambdiv, ambssamp, ambres, |
413 |
|
octname==NULL ? "" : octname); |