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++) { |
444 |
|
static int |
445 |
|
hasNumberFormat(const char *s) |
446 |
|
{ |
447 |
< |
while (*s && *s != '%') |
448 |
< |
s++; |
449 |
< |
if (!*s) |
450 |
< |
return(0); |
451 |
< |
do |
452 |
< |
++s; |
453 |
< |
while (isdigit(*s)); |
454 |
< |
|
455 |
< |
return((*s == 'd') | (*s == 'i') | (*s == 'o') | |
456 |
< |
(*s == 'x') | (*s == 'X')); |
447 |
> |
while (*s) { |
448 |
> |
while (*s != '%') |
449 |
> |
if (!*s++) |
450 |
> |
return(0); |
451 |
> |
if (*++s == '%') { /* ignore "%%" */ |
452 |
> |
++s; |
453 |
> |
continue; |
454 |
> |
} |
455 |
> |
while (isdigit(*s)) /* field length */ |
456 |
> |
++s; |
457 |
> |
/* field we'll use? */ |
458 |
> |
if ((*s == 'd') | (*s == 'i') | (*s == 'o') | |
459 |
> |
(*s == 'x') | (*s == 'X')) |
460 |
> |
return(1); |
461 |
> |
} |
462 |
> |
return(0); /* didn't find one */ |
463 |
|
} |
464 |
|
|
465 |
|
int |