--- ray/src/rt/lookamb.c 1992/07/16 12:08:44 2.3 +++ ray/src/rt/lookamb.c 2003/02/25 02:47:22 2.8 @@ -1,18 +1,13 @@ -/* 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.8 2003/02/25 02:47:22 greg Exp $"; #endif - /* * lookamb.c - program to examine ambient components. - * - * 10/8/86 */ -#include +#include "copyright.h" -#include "color.h" +#include "ray.h" #include "ambient.h" @@ -25,6 +20,7 @@ AMBVAL av; main(argc, argv) /* load ambient values from a file */ +int argc; char *argv[]; { FILE *fp; @@ -60,13 +56,21 @@ char *argv[]; if (header) { if (checkheader(fp, "ascii", stdout) < 0) goto formaterr; - } else + } else { + newheader("RADIANCE", stdout); 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)) @@ -85,6 +89,7 @@ formaterr: } +void lookamb(fp) /* get ambient values from a file */ FILE *fp; { @@ -120,6 +125,7 @@ FILE *fp; } +void writamb(fp) /* write binary ambient values */ FILE *fp; {