ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pvalue.c
(Generate patch)

Comparing ray/src/px/pvalue.c (file contents):
Revision 2.17 by greg, Thu Feb 27 02:00:12 2003 UTC vs.
Revision 2.21 by schorsch, Thu Jun 26 00:58:10 2003 UTC

# Line 7 | Line 7 | static const char RCSid[] = "$Id$";
7   *     4/23/86
8   */
9  
10 #include  "standard.h"
11
12 #include  "color.h"
13
10   #include  <time.h>
11  
12 + #include  "standard.h"
13 + #include  "platform.h"
14 + #include  "color.h"
15   #include  "resolu.h"
16  
18 typedef unsigned short uint16;  /* sizeof (uint16) must == 2 */
19
17   #define  min(a,b)               ((a)<(b)?(a):(b))
18  
19                                  /* what to put out (also RED, GRN, BLU) */
# Line 271 | Line 268 | unkopt:
268          }
269  
270          if (reverse) {
271 < #ifdef MSDOS
272 <                setmode(fileno(stdout), O_BINARY);
271 > #ifdef _WIN32
272 >                SET_FILE_BINARY(stdout);
273                  if (format != 'a' && format != 'i')
274 <                        setmode(fileno(fin), O_BINARY);
274 >                        SET_FILE_BINARY(fin);
275   #endif
276                                          /* get header */
277                  if (header) {
# Line 319 | Line 316 | unkopt:
316                  fputsresolu(&picres, stdout);   /* always put resolution */
317                  valtopix();
318          } else {
319 < #ifdef MSDOS
320 <                setmode(fileno(fin), O_BINARY);
319 > #ifdef _WIN32
320 >                SET_FILE_BINARY(fin);
321                  if (format != 'a' && format != 'i')
322 <                        setmode(fileno(stdout), O_BINARY);
322 >                        SET_FILE_BINARY(stdout);
323   #endif
324                                                  /* get header */
325                  getheader(fin, checkhead, NULL);
# Line 392 | Line 389 | pixtoval()                             /* convert picture to values */
389          register COLOR  *scanln;
390          int  dogamma;
391          COLOR  lastc;
392 <        FLOAT  hv[2];
392 >        RREAL  hv[2];
393          int  startprim, endprim;
394          long  startpos;
395          int  y;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines