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) */ |
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) { |
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); |
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; |