--- ray/src/rt/lookamb.c 1994/02/27 10:17:33 2.6 +++ ray/src/rt/lookamb.c 2003/06/05 19:29:34 2.9 @@ -1,23 +1,14 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: lookamb.c,v 2.9 2003/06/05 19:29:34 schorsch Exp $"; #endif - /* * lookamb.c - program to examine ambient components. - * - * 10/8/86 */ -#include +#include "copyright.h" -#ifdef MSDOS -#include -#endif - -#include "color.h" - +#include "platform.h" +#include "ray.h" #include "ambient.h" @@ -71,15 +62,11 @@ char *argv[]; } fputformat(AMBFMT, stdout); putchar('\n'); -#ifdef MSDOS - setmode(fileno(stdout), O_BINARY); -#endif + SET_FILE_BINARY(stdout); putambmagic(stdout); writamb(fp); } else { -#ifdef MSDOS - setmode(fileno(fp), O_BINARY); -#endif + SET_FILE_BINARY(fp); if (checkheader(fp, AMBFMT, header ? stdout : (FILE *)NULL) < 0) goto formaterr; if (!hasambmagic(fp)) @@ -98,6 +85,7 @@ formaterr: } +void lookamb(fp) /* get ambient values from a file */ FILE *fp; { @@ -133,6 +121,7 @@ FILE *fp; } +void writamb(fp) /* write binary ambient values */ FILE *fp; {