--- ray/src/px/ra_bn.c 1994/02/27 10:17:10 2.6 +++ ray/src/px/ra_bn.c 2003/06/05 19:29:34 2.8 @@ -1,9 +1,6 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: ra_bn.c,v 2.8 2003/06/05 19:29:34 schorsch Exp $"; #endif - /* * ra_bn.c - program to convert between RADIANCE and barneyscan picture format. * @@ -11,19 +8,13 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include - -#ifdef MSDOS -#include -#endif - +#include #include +#include "platform.h" #include "color.h" - #include "resolu.h" -extern char *malloc(); - double gamcor = 2.0; /* gamma correction */ int bradj = 0; /* brightness adjustment */ @@ -43,12 +34,9 @@ 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 + SET_DEFAULT_BINARY(); + SET_FILE_BINARY(stdin); + SET_FILE_BINARY(stdout); progname = argv[0]; for (i = 1; i < argc; i++) @@ -210,7 +198,7 @@ ra2bn() /* convert radiance to barneyscan */ if (ferror(bnfp[0]) || ferror(bnfp[1]) || ferror(bnfp[2])) quiterr("error writing Barney files"); } - free((char *)inl); + free((void *)inl); } @@ -236,5 +224,5 @@ bn2ra() /* convert barneyscan to radiance */ if (fwritecolrs(outline, xmax, rafp) < 0) quiterr("error writing RADIANCE file"); } - free((char *)outline); + free((void *)outline); }