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

Comparing ray/src/util/cmatrix.c (file contents):
Revision 2.38 by greg, Tue Nov 21 01:30:20 2023 UTC vs.
Revision 2.40 by greg, Sat Mar 22 01:27:22 2025 UTC

# Line 96 | Line 96 | get_cminfo(char *s, void *p)
96          char    fmt[MAXFMTLEN];
97          int     i;
98  
99 <        if (!strncmp(s, "NCOMP=", 6) && atoi(s+6) != 3) {
99 >        if (isncomp(s) && ncompval(s) != 3) {
100                  ip->err = "unexpected # components (must be 3)";
101                  return(-1);
102          }
# Line 495 | Line 495 | cm_write(const CMATRIX *cm, int dtype, FILE *fp)
495  
496          if (!cm)
497                  return(0);
498 + #ifdef getc_unlocked
499 +        flockfile(fp);
500 + #endif
501          mp = cm->cmem;
502          switch (dtype) {
503          case DTascii:
# Line 546 | Line 549 | cm_write(const CMATRIX *cm, int dtype, FILE *fp)
549                  fputs("Unsupported data type in cm_write()!\n", stderr);
550                  return(0);
551          }
552 + #ifdef getc_unlocked
553 +        funlockfile(fp);
554 + #endif
555          return(fflush(fp) == 0);
556   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines