--- ray/src/px/ra_pict.c 1993/07/19 12:04:35 2.7 +++ ray/src/px/ra_pict.c 2003/06/05 19:29:34 2.9 @@ -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_pict.c,v 2.9 2003/06/05 19:29:34 schorsch Exp $"; #endif - /* Convert an Radiance image to APPLE pict format. * * Orginally Iris to PICT by Paul Haeberli - 1990 @@ -21,16 +18,13 @@ static char SCCSid[] = "$SunId$ LBL"; #include #include -#ifdef MSDOS -#include -#endif +#include +#include "platform.h" #include "pict.h" #include "color.h" #include "resolu.h" -extern char *malloc(); - int outbytes; /* This had better be 32 bits! */ char *progname; int verbose = 0; @@ -101,12 +95,9 @@ char **argv; int xsize, ysize; int i, picsize; int ssizepos, lsizepos; -#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++) @@ -224,14 +215,14 @@ int ysize; int nbytes, rowbytes; char *cbuf, *pbuf; - cbuf = malloc(4 * xsize); + cbuf = (char *)malloc(4 * xsize); if (cbuf == NULL) { fprintf(stderr, "%s: not enough memory\n", progname); exit(1); } - pbuf = malloc(4 * xsize); + pbuf = (char *)malloc(4 * xsize); if (pbuf == NULL) { fprintf(stderr, "%s: not enough memory\n", progname);