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

Comparing ray/src/util/rmatrix.c (file contents):
Revision 2.96 by greg, Thu Apr 17 23:30:16 2025 UTC vs.
Revision 2.97 by greg, Fri Apr 18 23:59:03 2025 UTC

# Line 389 | Line 389 | rmx_load_data(RMATRIX *rm, FILE *fp)
389  
390   /* Load matrix from supported file type */
391   RMATRIX *
392 < rmx_load(const char *inspec, RMPref rmp)
392 > rmx_load(const char *inspec)
393   {
394          FILE            *fp;
395          RMATRIX         *dnew;
# Line 403 | Line 403 | rmx_load(const char *inspec, RMPref rmp)
403                  fp = stdin;
404          else if (inspec[0] == '!')
405                  fp = popen(inspec+1, "r");
406 <        else {                                  /* check suffix */
407 <                const char      *sp = strrchr(inspec, '.');
408 <                if (sp > inspec && !strcasecmp(sp+1, "XML")) {  /* BSDF? */
409 <                        CMATRIX *cm = rmp==RMPnone ? (CMATRIX *)NULL :
410 <                                        rmp==RMPtrans ? cm_loadBTDF(inspec) :
411 <                                        cm_loadBRDF(inspec, rmp==RMPreflB) ;
412 <                        if (!cm)
413 <                                return(NULL);
414 <                        dnew = rmx_from_cmatrix(cm);
415 <                        cm_free(cm);
416 <                        dnew->dtype = DTascii;
417 <                        return(dnew);           /* return here */
418 <                }                               /* else open it ourselves */
406 >        else
407                  fp = fopen(inspec, "r");
420        }
408          if (!fp) {
409                  fprintf(stderr, "Cannot open for reading: %s\n", inspec);
410                  return(NULL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines