ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rmtxop.c
(Generate patch)

Comparing ray/src/util/rmtxop.c (file contents):
Revision 2.22 by greg, Mon Nov 27 22:04:45 2023 UTC vs.
Revision 2.23 by greg, Tue Nov 28 16:36:50 2023 UTC

# Line 44 | Line 44 | loadmatrix(ROPMAT *rop)
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 */
# Line 605 | Line 601 | main(int argc, char *argv[])
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",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines