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

Comparing ray/src/px/ra_ppm.c (file contents):
Revision 2.13 by greg, Fri Jan 6 06:40:53 2006 UTC vs.
Revision 2.17 by greg, Sat Dec 28 18:05:14 2019 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   *  program to convert between RADIANCE and Poskanzer Pixmaps
6   */
7  
8 #include  <stdio.h>
8   #include  <math.h>
9   #include  <ctype.h>
11 #include  <time.h>
10  
11   #include  "platform.h"
12 + #include  "rtio.h"
13   #include  "color.h"
14   #include  "resolu.h"
15  
# Line 103 | Line 102 | main(
102                  if (read(fileno(stdin), inpbuf, 2) != 2 || inpbuf[0] != 'P')
103                          quiterr("input not a Poskanzer Pixmap");
104                  ptype = inpbuf[1];
105 < #ifdef _WIN32
105 > #if defined(_WIN32) || defined(_WIN64)
106                  if (ptype > 4)
107                          SET_FILE_BINARY(stdin);
108                  SET_FILE_BINARY(stdout);
# Line 153 | Line 152 | main(
152                                  quiterr("unsupported Pixmap type");
153                          }
154          } else {
155 < #ifdef _WIN32
155 > #if defined(_WIN32) || defined(_WIN64)
156                  SET_FILE_BINARY(stdin);
157                  if (binflag)
158                          SET_FILE_BINARY(stdout);
# Line 587 | Line 586 | getby2(                        /* return 2-byte quantity from fp */
586  
587          upperb = getc(fp);
588          lowerb = getc(fp);
589 <        if (upperb == EOF)
589 >        if (lowerb == EOF)
590                  return(EOF);
591          return(upperb<<8 | lowerb);
592   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines