44 |
|
return(0); |
45 |
|
|
46 |
|
rop->mtx = rmx_load(rop->inspec, rop->rmp); |
47 |
< |
if (rop->mtx == NULL) { |
48 |
< |
fputs(rop->inspec, stderr); |
49 |
< |
fputs(": cannot load matrix\n", stderr); |
50 |
< |
return(-1); |
51 |
< |
} |
52 |
< |
return(1); |
47 |
> |
|
48 |
> |
return(!rop->mtx ? -1 : 1); |
49 |
|
} |
50 |
|
|
51 |
|
/* Compute conversion row from spectrum to one channel of RGB */ |
601 |
|
SET_FILE_BINARY(stdout); |
602 |
|
newheader("RADIANCE", stdout); |
603 |
|
printargs(argc, argv, stdout); |
604 |
< |
if (!rmx_write(mres, outfmt, stdout)) { |
605 |
< |
fprintf(stderr, "%s: error writing result matrix\n", argv[0]); |
610 |
< |
return(1); |
611 |
< |
} |
612 |
< |
/* rmx_free(mres); free(mop); */ |
613 |
< |
return(0); |
604 |
> |
|
605 |
> |
return(rmx_write(mres, outfmt, stdout) ? 0 : 1); |
606 |
|
userr: |
607 |
|
fprintf(stderr, |
608 |
|
"Usage: %s [-v][-f[adfc][-t][-s sf .. | -c ce ..][-rf|-rb] m1 [.+*/] .. > mres\n", |