--- ray/src/px/pextrem.c 2003/02/22 02:07:27 2.5 +++ ray/src/px/pextrem.c 2004/03/28 20:33:14 2.10 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pextrem.c,v 2.5 2003/02/22 02:07:27 greg Exp $"; +static const char RCSid[] = "$Id: pextrem.c,v 2.10 2004/03/28 20:33:14 schorsch Exp $"; #endif /* * Find extrema points in a Radiance picture. @@ -7,10 +7,11 @@ static const char RCSid[] = "$Id: pextrem.c,v 2.5 2003 #include #include -#ifdef MSDOS -#include -#endif +#include + +#include "platform.h" #include "color.h" +#include "resolu.h" int orig = 0; @@ -19,9 +20,14 @@ int wrongformat = 0; COLOR expos = WHTCOLOR; +static gethfunc headline; -headline(s) /* check header line */ -char *s; + +static int +headline( /* check header line */ + char *s, + void *p +) { char fmt[32]; double d; @@ -44,9 +50,11 @@ char *s; } -main(argc, argv) -int argc; -char *argv[]; +int +main( + int argc, + char *argv[] +) { int i; int xres, yres; @@ -55,11 +63,8 @@ char *argv[]; COLR *scan; COLR cmin, cmax; int xmin, ymin, xmax, ymax; -#ifdef MSDOS - extern int _fmode; - _fmode = O_BINARY; - setmode(fileno(stdin), O_BINARY); -#endif + SET_DEFAULT_BINARY(); + SET_FILE_BINARY(stdin); for (i = 1; i < argc; i++) /* get options */ if (!strcmp(argv[i], "-o")) orig++;