--- ray/src/px/ra_tiff.c 2003/07/16 01:32:53 2.24 +++ ray/src/px/ra_tiff.c 2003/07/27 22:12:03 2.26 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ra_tiff.c,v 2.24 2003/07/16 01:32:53 greg Exp $"; +static const char RCSid[] = "$Id: ra_tiff.c,v 2.26 2003/07/27 22:12:03 schorsch Exp $"; #endif /* * Program to convert between RADIANCE and TIFF files. @@ -161,13 +161,14 @@ doneopts: if (i != argc-2) goto userr; /* consistency checks */ - if (CHK(C_GRY)) + if (CHK(C_GRY)) { if (cvts.phot == PHOTOMETRIC_RGB) cvts.phot = PHOTOMETRIC_MINISBLACK; else { cvts.phot = PHOTOMETRIC_LOGL; cvts.comp = COMPRESSION_SGILOG; } + } if (CHK(C_TWRD|C_TFLT) == (C_TWRD|C_TFLT)) goto userr; @@ -207,7 +208,7 @@ allocbufs() /* allocate scanline buffers */ (CHK(C_GRY) ? 1 : 3); cvts.r.p = (char *)malloc(rsiz*cvts.xmax); cvts.t.p = (char *)malloc(tsiz*cvts.xmax); - if (cvts.r.p == NULL | cvts.t.p == NULL) + if ((cvts.r.p == NULL) | (cvts.t.p == NULL)) quiterr("no memory to allocate scanline buffers"); } @@ -659,7 +660,7 @@ void RRGGBB2Color(y) /* read/convert/write RGB16->COLOR scanline */ uint32 y; { - int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; + int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); register double d; register int x; @@ -806,7 +807,7 @@ void GGry2Color(y) /* read/convert/write G16->COLOR scanline */ uint32 y; { - int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; + int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); double m; register double d; register int x; @@ -836,7 +837,7 @@ void Color2GGry(y) /* read/convert/write COLOR->G16 scanline */ uint32 y; { - int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; + int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); float m = pow(2.,(double)cvts.bradj); register int x; @@ -925,7 +926,7 @@ void Color2RRGGBB(y) /* read/convert/write COLOR->RGB16 scanline */ uint32 y; { - int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; + int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); float m = pow(2.,(double)cvts.bradj); register int x, i;