--- ray/src/px/ra_rgbe.c 1998/10/27 09:08:27 2.9 +++ ray/src/px/ra_rgbe.c 2003/06/05 19:29:34 2.12 @@ -1,23 +1,18 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: ra_rgbe.c,v 2.12 2003/06/05 19:29:34 schorsch Exp $"; #endif - /* * program to convert from RADIANCE RLE to flat format */ #include #include +#include + +#include "platform.h" #include "color.h" #include "resolu.h" -#ifdef MSDOS -#include -#endif - -extern char *malloc(), *realloc(), *tempbuffer(); extern int addhline(); #define dumpheader(fp) fwrite(headlines, 1, headlen, fp) @@ -80,9 +75,7 @@ gotfile: progname, argv[i]); exit(1); } -#ifdef MSDOS - setmode(fileno(stdin), O_BINARY); -#endif + SET_FILE_BINARY(stdin); ospec = i==argc-2 ? argv[i+1] : (char *)NULL; while (transfer(ospec)) ; @@ -157,9 +150,7 @@ char *ospec; } } } -#ifdef MSDOS - setmode(fileno(fp), O_BINARY); -#endif + SET_FILE_BINARY(fp); dumpheader(fp); /* put out header */ fputs(progname, fp); if (bradj) @@ -212,7 +203,7 @@ char *s; frameno = atoi(s+6); n = strlen(s); if (headlen) - headlines = (char *)realloc(headlines, headlen+n+1); + headlines = (char *)realloc((void *)headlines, headlen+n+1); else headlines = (char *)malloc(n+1); if (headlines == NULL) {