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

Comparing ray/src/util/getinfo.c (file contents):
Revision 2.23 by greg, Mon Mar 21 00:21:13 2022 UTC vs.
Revision 2.24 by greg, Mon Mar 21 17:11:29 2022 UTC

# Line 135 | Line 135 | main(
135          }
136   #ifdef getc_unlocked                            /* avoid lock/unlock overhead */
137          flockfile(stdin);
138 +        flockfile(stdout);
139   #endif
140          SET_FILE_BINARY(stdin);
141          if (argc > 2 && !strcmp(argv[1], "-c")) {
# Line 228 | Line 229 | main(
229                  if ((fp = fopen(argv[i], "r")) == NULL)
230                          fputs(": cannot open\n", stdout);
231                  else {
232 + #ifdef getc_unlocked                            /* avoid lock/unlock overhead */
233 +                        flockfile(fp);
234 + #endif
235                          if (dim < 0) {                  /* dimensions only */
236                                  if (getheader(fp, NULL, NULL) < 0) {
237                                          fputs("bad header!\n", stdout);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines