300 |
|
CMATRIX *cm = cm_alloc(bsdf->nout, bsdf->ninc); |
301 |
|
int nbadohm = 0; |
302 |
|
int nneg = 0; |
303 |
– |
float dom; |
304 |
– |
int doforward; |
303 |
|
int r, c; |
304 |
|
/* reciprocity is "transparent" */ |
305 |
|
for (c = 0; c < cm->ncols; c++) { |
306 |
< |
/* get projected solid angle */ |
307 |
< |
dom = mBSDF_incohm(bsdf,c); |
306 |
> |
const double dom = mBSDF_incohm(bsdf,c); |
307 |
> |
/* projected solid angle */ |
308 |
|
nbadohm += (dom <= 0); |
309 |
|
|
310 |
|
for (r = 0; r < cm->nrows; r++) { |
382 |
|
int dt, xr, yr; |
383 |
|
COLORV *psp; |
384 |
|
/* check for zero */ |
385 |
< |
if ((scv[RED] == 0) & (scv[GRN] == 0) & (scv[BLU] == 0)) |
385 |
> |
if ((scv[RED] == 0) & (scv[GRN] == 0) & (scv[BLU] == 0) && |
386 |
> |
(myDT != DTfromHeader) | (i < cv->nrows-1)) |
387 |
|
continue; |
388 |
|
/* open next picture */ |
389 |
|
sprintf(fname, fspec, i); |
445 |
|
static int |
446 |
|
hasNumberFormat(const char *s) |
447 |
|
{ |
448 |
< |
while (*s && *s != '%') |
449 |
< |
s++; |
450 |
< |
if (!*s) |
451 |
< |
return(0); |
452 |
< |
do |
453 |
< |
++s; |
454 |
< |
while (isdigit(*s)); |
455 |
< |
|
456 |
< |
return((*s == 'd') | (*s == 'i') | (*s == 'o') | |
457 |
< |
(*s == 'x') | (*s == 'X')); |
448 |
> |
while (*s) { |
449 |
> |
while (*s != '%') |
450 |
> |
if (!*s++) |
451 |
> |
return(0); |
452 |
> |
if (*++s == '%') { /* ignore "%%" */ |
453 |
> |
++s; |
454 |
> |
continue; |
455 |
> |
} |
456 |
> |
while (isdigit(*s)) /* field length */ |
457 |
> |
++s; |
458 |
> |
/* field we'll use? */ |
459 |
> |
if ((*s == 'd') | (*s == 'i') | (*s == 'o') | |
460 |
> |
(*s == 'x') | (*s == 'X')) |
461 |
> |
return(1); |
462 |
> |
} |
463 |
> |
return(0); /* didn't find one */ |
464 |
|
} |
465 |
|
|
466 |
|
int |