10 |
|
#include <string.h> |
11 |
|
#include <math.h> |
12 |
|
#include <time.h> |
13 |
+ |
|
14 |
+ |
#include "platform.h" |
15 |
|
#include "color.h" |
16 |
|
#include "resolu.h" |
17 |
|
|
16 |
– |
#ifdef MSDOS |
17 |
– |
#include <fcntl.h> |
18 |
– |
#endif |
19 |
– |
|
18 |
|
int rgbinp = -1; /* input is RGBE? */ |
19 |
|
|
20 |
|
int rgbout = 0; /* output should be RGBE? */ |
29 |
|
|
30 |
|
char *progname; |
31 |
|
|
32 |
+ |
static gethfunc headline; |
33 |
|
|
34 |
< |
int |
35 |
< |
headline(s) /* process header line */ |
36 |
< |
char *s; |
34 |
> |
|
35 |
> |
static int |
36 |
> |
headline( /* process header line */ |
37 |
> |
char *s, |
38 |
> |
void *p |
39 |
> |
) |
40 |
|
{ |
41 |
|
char fmt[32]; |
42 |
|
|
63 |
|
char *argv[]; |
64 |
|
{ |
65 |
|
int i; |
66 |
< |
#ifdef MSDOS |
67 |
< |
extern int _fmode; |
68 |
< |
_fmode = O_BINARY; |
67 |
< |
setmode(fileno(stdin), O_BINARY); |
68 |
< |
setmode(fileno(stdout), O_BINARY); |
69 |
< |
#endif |
66 |
> |
SET_DEFAULT_BINARY(); |
67 |
> |
SET_FILE_BINARY(stdin); |
68 |
> |
SET_FILE_BINARY(stdout); |
69 |
|
progname = argv[0]; |
70 |
|
|
71 |
|
for (i = 1; i < argc; i++) |