--- ray/src/px/ra_skel.c 1994/04/05 14:10:52 2.10 +++ ray/src/px/ra_skel.c 2006/03/10 19:40:13 2.13 @@ -1,33 +1,28 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: ra_skel.c,v 2.13 2006/03/10 19:40:13 schorsch Exp $"; #endif - /* * Skeletal 24-bit image conversion program. Replace "skel" * in this file with a more appropriate image type identifier. * * The Rmakefile entry should look something like this: * ra_skel: ra_skel.o - * cc $(CFLAGS) -o ra_skel ra_skel.o -lrt -lm + * cc $(CFLAGS) -o ra_skel ra_skel.o -lrtrad -lm * ra_skel.o: ../common/color.h ../common/resolu.h * * If you like to do things the hard way, you can link directly * to the object files "color.o colrops.o resolu.o header.o" in - * the common subdirectory instead of using the -lrt library. + * the common subdirectory instead of using the -lrtrad library. */ #include #include -#ifdef MSDOS -#include -#endif +#include + +#include "platform.h" #include "color.h" #include "resolu.h" -extern char *malloc(); - double gamcor = 2.2; /* gamma correction */ int bradj = 0; /* brightness adjustment */ @@ -78,10 +73,8 @@ char *argv[]; progname, argv[i+1]); exit(1); } -#ifdef MSDOS - setmode(fileno(stdin), O_BINARY); - setmode(fileno(stdout), O_BINARY); -#endif + SET_FILE_BINARY(stdin); + SET_FILE_BINARY(stdout); setcolrgam(gamcor); /* set up gamma correction */ if (reverse) { /* get their image resolution */ @@ -150,7 +143,7 @@ skel2ra() /* convert 24-bit scanlines to Radiance pic quiterr("error writing Radiance picture"); } /* free scanline */ - free((char *)scanout); + free((void *)scanout); } @@ -179,5 +172,5 @@ ra2skel() /* convert Radiance scanlines to 24-bit */ quiterr("error writing skel file"); } /* free scanline */ - free((char *)scanin); + free((void *)scanin); }