--- ray/src/px/ra_bn.c 1991/12/19 14:52:07 2.2 +++ ray/src/px/ra_bn.c 1994/02/27 10:17:10 2.6 @@ -1,4 +1,4 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Copyright (c) 1992 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -12,13 +12,19 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#ifdef MSDOS +#include +#endif + +#include + #include "color.h" #include "resolu.h" -extern double pow(); +extern char *malloc(); -double gamma = 2.0; /* gamma correction */ +double gamcor = 2.0; /* gamma correction */ int bradj = 0; /* brightness adjustment */ @@ -37,14 +43,19 @@ char *argv[]; { int reverse = 0; int i; - +#ifdef MSDOS + extern int _fmode; + _fmode = O_BINARY; + setmode(fileno(stdin), O_BINARY); + setmode(fileno(stdout), O_BINARY); +#endif progname = argv[0]; for (i = 1; i < argc; i++) if (argv[i][0] == '-') switch (argv[i][1]) { case 'g': - gamma = atof(argv[++i]); + gamcor = atof(argv[++i]); break; case 'r': reverse = !reverse; @@ -60,7 +71,7 @@ char *argv[]; else break; /* set gamma correction */ - setcolrgam(gamma); + setcolrgam(gamcor); if (reverse) { if (i > argc-1 || i < argc-2) @@ -77,6 +88,7 @@ char *argv[]; quiterr(errmsg); } /* put header */ + newheader("RADIANCE", stdout); printargs(i, argv, rafp); fputformat(COLRFMT, rafp); putc('\n', rafp);