--- ray/src/px/pflip.c 1995/10/16 11:40:11 2.4 +++ ray/src/px/pflip.c 2003/06/05 19:29:34 2.6 @@ -1,21 +1,15 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: pflip.c,v 2.6 2003/06/05 19:29:34 schorsch Exp $"; #endif - /* * flip picture file horizontally and/or vertically */ #include +#include -#ifdef MSDOS -#include -#endif - +#include "platform.h" #include "color.h" - #include "resolu.h" int order; /* input orientation */ @@ -31,9 +25,7 @@ FILE *fin; /* input file */ char *progname; -extern char *malloc(); - int neworder() /* figure out new order from old */ { @@ -58,11 +50,8 @@ char *argv[]; { static char picfmt[LPICFMT+1] = PICFMT; int i, rval; -#ifdef MSDOS - extern int _fmode; - _fmode = O_BINARY; - setmode(fileno(stdout), O_BINARY); -#endif + SET_DEFAULT_BINARY(); + SET_FILE_BINARY(stdout); progname = argv[0]; for (i = 1; i < argc; i++) @@ -138,7 +127,7 @@ scanfile() /* scan to the end of file */ } } scanpos[0] = ftell(fin); - free((char *)scanin); + free((void *)scanin); } @@ -172,7 +161,7 @@ flip() /* flip the picture */ exit(1); } } - free((char *)scanin); + free((void *)scanin); if (fhoriz) - free((char *)scanout); + free((void *)scanout); }