| 14 |
|
#include "platform.h" |
| 15 |
|
#include "color.h" |
| 16 |
|
#include "resolu.h" |
| 17 |
+ |
#include "rtio.h" |
| 18 |
|
|
| 19 |
|
int rgbinp = -1; /* input is RGBE? */ |
| 20 |
|
int rgbout = 0; /* output should be RGBE? */ |
| 37 |
|
void *p |
| 38 |
|
) |
| 39 |
|
{ |
| 40 |
< |
char fmt[32]; |
| 40 |
> |
char fmt[MAXFMTLEN]; |
| 41 |
|
|
| 42 |
|
if (formatval(fmt, s)) { /* check if format string */ |
| 43 |
|
if (!strcmp(fmt,COLRFMT)) |
| 225 |
|
setcolr(scanout[x], colval(scanin[x],RED), |
| 226 |
|
colval(scanin[x],GRN), |
| 227 |
|
colval(scanin[x],BLU)); |
| 228 |
< |
fwrite((char *)scanout, sizeof(COLR), xmax, stdout); |
| 228 |
> |
putbinary((char *)scanout, sizeof(COLR), xmax, stdout); |
| 229 |
|
} else |
| 230 |
|
fwritescan(scanin, xmax, stdout); |
| 231 |
|
if (ferror(stdout)) |