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 |
|
|
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); |
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); |
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 |
|
} |