7 |
|
|
8 |
|
#include "copyright.h" |
9 |
|
|
10 |
+ |
#include "platform.h" |
11 |
|
#include "ray.h" |
11 |
– |
|
12 |
|
#include "ambient.h" |
13 |
|
|
14 |
|
|
62 |
|
} |
63 |
|
fputformat(AMBFMT, stdout); |
64 |
|
putchar('\n'); |
65 |
< |
#ifdef MSDOS |
66 |
< |
setmode(fileno(stdout), O_BINARY); |
67 |
< |
#endif |
65 |
> |
SET_FILE_BINARY(stdout); |
66 |
|
putambmagic(stdout); |
67 |
|
writamb(fp); |
68 |
|
} else { |
69 |
< |
#ifdef MSDOS |
72 |
< |
setmode(fileno(fp), O_BINARY); |
73 |
< |
#endif |
69 |
> |
SET_FILE_BINARY(fp); |
70 |
|
if (checkheader(fp, AMBFMT, header ? stdout : (FILE *)NULL) < 0) |
71 |
|
goto formaterr; |
72 |
|
if (!hasambmagic(fp)) |