9 |
|
*/ |
10 |
|
|
11 |
|
#include <stdio.h> |
12 |
– |
|
13 |
– |
#ifdef MSDOS |
14 |
– |
#include <fcntl.h> |
15 |
– |
#endif |
16 |
– |
|
12 |
|
#include <time.h> |
18 |
– |
|
13 |
|
#include <math.h> |
14 |
|
|
15 |
+ |
#include "platform.h" |
16 |
|
#include "color.h" |
22 |
– |
|
17 |
|
#include "resolu.h" |
24 |
– |
|
18 |
|
#include "random.h" |
26 |
– |
|
19 |
|
#include "targa.h" |
20 |
|
|
21 |
|
#define goodpic(h) (((h)->dataType==IM_RGB || (h)->dataType==IM_CRGB) \ |
47 |
|
struct hdStruct head; |
48 |
|
int reverse = 0; |
49 |
|
int i; |
50 |
< |
#ifdef MSDOS |
51 |
< |
extern int _fmode; |
52 |
< |
_fmode = O_BINARY; |
61 |
< |
setmode(fileno(stdin), O_BINARY); |
62 |
< |
setmode(fileno(stdout), O_BINARY); |
63 |
< |
#endif |
50 |
> |
SET_DEFAULT_BINARY(); |
51 |
> |
SET_FILE_BINARY(stdin); |
52 |
> |
SET_FILE_BINARY(stdout); |
53 |
|
progname = argv[0]; |
54 |
|
|
55 |
|
head.dataBits = 16; |