--- ray/src/util/rcrop.c 2022/03/15 15:01:22 1.6 +++ ray/src/util/rcrop.c 2022/03/15 20:54:49 1.8 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcrop.c,v 1.6 2022/03/15 15:01:22 greg Exp $"; +static const char RCSid[] = "$Id: rcrop.c,v 1.8 2022/03/15 20:54:49 greg Exp $"; #endif /* * rcrop.c - crop a Radiance picture or matrix data @@ -18,7 +18,7 @@ char *progname; /* global argv[0] */ VIEW vw = STDVIEW; int gotvw = 0; -char fmt[MAXFMTLEN] = "Unknown"; +char fmt[MAXFMTLEN] = "ascii"; /* assumed when unspecified */ int ncomp = 0; RESOLU res; int rmin, cmin, nrows, ncols; @@ -234,6 +234,10 @@ main(int argc, char *argv[]) fputs(": cannot open for writing\n", stderr); return(1); } +#ifdef getc_unlocked /* avoid stupid semaphores */ + flockfile(fp); + flockfile(stdout); +#endif /* process information header */ if (getheader(fp, headline, NULL) < 0) { fputs(progname, stderr);