--- ray/src/rt/lookamb.c 1992/07/16 12:08:44 2.3 +++ ray/src/rt/lookamb.c 1993/11/18 09:43:02 2.5 @@ -12,6 +12,10 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#ifdef MSDOS +#include +#endif + #include "color.h" #include "ambient.h" @@ -25,6 +29,7 @@ AMBVAL av; main(argc, argv) /* load ambient values from a file */ +int argc; char *argv[]; { FILE *fp; @@ -64,9 +69,15 @@ char *argv[]; printargs(argc, argv, stdout); fputformat(AMBFMT, stdout); putchar('\n'); +#ifdef MSDOS + setmode(fileno(stdout), O_BINARY); +#endif putambmagic(stdout); writamb(fp); } else { +#ifdef MSDOS + setmode(fileno(fp), O_BINARY); +#endif if (checkheader(fp, AMBFMT, header ? stdout : (FILE *)NULL) < 0) goto formaterr; if (!hasambmagic(fp))