--- ray/src/px/ra_gif.c 2003/02/22 02:07:27 2.7 +++ ray/src/px/ra_gif.c 2003/07/21 22:30:19 2.9 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ra_gif.c,v 2.7 2003/02/22 02:07:27 greg Exp $"; +static const char RCSid[] = "$Id: ra_gif.c,v 2.9 2003/07/21 22:30:19 schorsch Exp $"; #endif /* * Convert from Radiance picture file to Compuserve GIF. @@ -7,19 +7,13 @@ static const char RCSid[] = "$Id: ra_gif.c,v 2.7 2003/ */ #include - #include +#include +#include "platform.h" #include "color.h" - #include "resolu.h" -#ifdef MSDOS -#include -#endif - -#include - #define MAXCOLORS 256 int rmap[MAXCOLORS]; @@ -62,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; @@ -167,11 +158,12 @@ int y; if (bradj) shiftcolrs(scanln, xmax, bradj); colrs_gambs(scanln, xmax); - if (pixscan != NULL) + if (pixscan != NULL) { if (samplefac) neu_dith_colrs(pixscan, scanln, xmax); else dith_colrs(pixscan, scanln, xmax); + } }