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.69 by greg, Mon Dec 4 22:02:40 2023 UTC vs.
Revision 2.71 by greg, Tue Dec 5 21:13:38 2023 UTC

# Line 374 | Line 374 | rmx_load(const char *inspec, RMPref rmp)
374                  fp = stdin;
375          else if (inspec[0] == '!')
376                  fp = popen(inspec+1, "r");
377 <        else if (rmp != RMPnone) {
377 >        else {
378                  const char      *sp = inspec;   /* check suffix */
379                  while (*sp)
380                          ++sp;
381                  while (sp > inspec && sp[-1] != '.')
382                          --sp;
383                  if (!strcasecmp(sp, "XML")) {   /* assume it's a BSDF */
384 <                        CMATRIX *cm = rmp==RMPtrans ? cm_loadBTDF(inspec) :
384 >                        CMATRIX *cm = rmp==RMPnone ? (CMATRIX *)NULL :
385 >                                        rmp==RMPtrans ? cm_loadBTDF(inspec) :
386                                          cm_loadBRDF(inspec, rmp==RMPreflB) ;
387                          if (!cm)
388                                  return(NULL);
# Line 527 | Line 528 | findCIEprims(const char *info)
528   int
529   rmx_write_header(const RMATRIX *rm, int dtype, FILE *fp)
530   {
531 <        if (!rm | !fp || !rm->mtx | (rm->ncols <= 0))
531 >        if (!rm | !fp || rm->ncols <= 0)
532                  return(0);
533          if (rm->info)
534                  fputs(rm->info, fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines