404 |
|
return(fflush(stdout) == 0); |
405 |
|
} |
406 |
|
|
407 |
< |
/* check to see if a string contains a %d specification */ |
408 |
< |
int |
409 |
< |
hasDecimalSpec(const char *s) |
407 |
> |
/* check to see if a string contains a %d or %o specification */ |
408 |
> |
static int |
409 |
> |
hasNumberFormat(const char *s) |
410 |
|
{ |
411 |
|
while (*s && *s != '%') |
412 |
|
s++; |
416 |
|
++s; |
417 |
|
while (isdigit(*s)); |
418 |
|
|
419 |
< |
return(*s == 'd'); |
419 |
> |
return(*s == 'd' | *s == 'i' | *s == 'o' | *s == 'x' | *s == 'X'); |
420 |
|
} |
421 |
|
|
422 |
|
int |
447 |
|
free_BSDF(btdf); |
448 |
|
cvec = cm_multiply(Tmat, ivec); /* cvec = component vector */ |
449 |
|
cm_free(Tmat); cm_free(ivec); |
450 |
< |
if (hasDecimalSpec(argv[1])) { /* generating image */ |
450 |
> |
if (hasNumberFormat(argv[1])) { /* generating image */ |
451 |
|
SET_FILE_BINARY(stdout); |
452 |
|
newheader("RADIANCE", stdout); |
453 |
|
printargs(argc, argv, stdout); |