--- ray/src/px/pvalue.c 2003/02/27 02:00:12 2.17 +++ ray/src/px/pvalue.c 2003/06/26 00:58:10 2.21 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pvalue.c,v 2.17 2003/02/27 02:00:12 greg Exp $"; +static const char RCSid[] = "$Id: pvalue.c,v 2.21 2003/06/26 00:58:10 schorsch Exp $"; #endif /* * pvalue.c - program to print pixel values. @@ -7,16 +7,13 @@ static const char RCSid[] = "$Id: pvalue.c,v 2.17 2003 * 4/23/86 */ -#include "standard.h" - -#include "color.h" - #include +#include "standard.h" +#include "platform.h" +#include "color.h" #include "resolu.h" -typedef unsigned short uint16; /* sizeof (uint16) must == 2 */ - #define min(a,b) ((a)<(b)?(a):(b)) /* what to put out (also RED, GRN, BLU) */ @@ -271,10 +268,10 @@ unkopt: } if (reverse) { -#ifdef MSDOS - setmode(fileno(stdout), O_BINARY); +#ifdef _WIN32 + SET_FILE_BINARY(stdout); if (format != 'a' && format != 'i') - setmode(fileno(fin), O_BINARY); + SET_FILE_BINARY(fin); #endif /* get header */ if (header) { @@ -319,10 +316,10 @@ unkopt: fputsresolu(&picres, stdout); /* always put resolution */ valtopix(); } else { -#ifdef MSDOS - setmode(fileno(fin), O_BINARY); +#ifdef _WIN32 + SET_FILE_BINARY(fin); if (format != 'a' && format != 'i') - setmode(fileno(stdout), O_BINARY); + SET_FILE_BINARY(stdout); #endif /* get header */ getheader(fin, checkhead, NULL); @@ -392,7 +389,7 @@ pixtoval() /* convert picture to values */ register COLOR *scanln; int dogamma; COLOR lastc; - FLOAT hv[2]; + RREAL hv[2]; int startprim, endprim; long startpos; int y;