--- ray/src/px/ra_gif.c 1995/04/03 15:29:43 2.6 +++ ray/src/px/ra_gif.c 2003/07/27 22:12:03 2.10 @@ -1,26 +1,19 @@ -/* Copyright (c) 1994 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: ra_gif.c,v 2.10 2003/07/27 22:12:03 schorsch Exp $"; #endif - /* * Convert from Radiance picture file to Compuserve GIF. * Currently, we don't know how to get back. */ #include +#include +#include +#include "platform.h" #include "color.h" - #include "resolu.h" -#ifdef MSDOS -#include -#endif - -#include - #define MAXCOLORS 256 int rmap[MAXCOLORS]; @@ -63,12 +56,9 @@ char *argv[]; { int bitsperpix; int i; -#ifdef MSDOS - extern int _fmode; - _fmode = O_BINARY; - setmode(fileno(stdin), O_BINARY); - setmode(fileno(stdout), O_BINARY); -#endif + SET_DEFAULT_BINARY(); + SET_FILE_BINARY(stdin); + SET_FILE_BINARY(stdout); progname = argv[0]; samplefac = 0; @@ -128,7 +118,7 @@ char *argv[]; /* set up gamma correction */ setcolrgam(gamv); /* figure out the bits per pixel */ - if (ncolors < 2 | ncolors > MAXCOLORS) + if ((ncolors < 2) | (ncolors > MAXCOLORS)) ncolors = MAXCOLORS; for (bitsperpix = 1; ncolors > 1<