--- ray/src/px/ra_xyze.c 2006/08/22 21:38:22 2.10 +++ ray/src/px/ra_xyze.c 2018/08/02 18:33:48 2.12 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ra_xyze.c,v 2.10 2006/08/22 21:38:22 greg Exp $"; +static const char RCSid[] = "$Id: ra_xyze.c,v 2.12 2018/08/02 18:33:48 greg Exp $"; #endif /* * Program to convert between RADIANCE RGBE and XYZE formats @@ -14,6 +14,7 @@ static const char RCSid[] = "$Id: ra_xyze.c,v 2.10 200 #include "platform.h" #include "color.h" #include "resolu.h" +#include "rtio.h" int rgbinp = -1; /* input is RGBE? */ int rgbout = 0; /* output should be RGBE? */ @@ -36,7 +37,7 @@ headline( /* process header line */ void *p ) { - char fmt[32]; + char fmt[MAXFMTLEN]; if (formatval(fmt, s)) { /* check if format string */ if (!strcmp(fmt,COLRFMT)) @@ -224,7 +225,7 @@ convert(void) /* convert to XYZE or RGBE picture */ setcolr(scanout[x], colval(scanin[x],RED), colval(scanin[x],GRN), colval(scanin[x],BLU)); - fwrite((char *)scanout, sizeof(COLR), xmax, stdout); + putbinary((char *)scanout, sizeof(COLR), xmax, stdout); } else fwritescan(scanin, xmax, stdout); if (ferror(stdout))