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.37 by greg, Thu May 18 23:55:10 2023 UTC vs.
Revision 2.39 by greg, Sat Mar 1 04:50:13 2025 UTC

# Line 18 | Line 18 | static const char RCSid[] = "$Id$";
18   const char      stdin_name[] = "<stdin>";
19  
20   const char      *cm_fmt_id[] = {
21 <                        "unknown", COLRFMT, CIEFMT,
21 >                        "unknown", COLRFMT, CIEFMT, SPECFMT,
22                          "float", "ascii", "double"
23                  };
24  
25   const int       cm_elem_size[] = {
26 <                        0, 4, 4, 3*sizeof(float), 0, 3*sizeof(double)
26 >                        0, 4, 4, 0, 3*sizeof(float), 0, 3*sizeof(double)
27                  };
28  
29   /* Allocate a color coefficient matrix */
# 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