ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/ra_pict.c
(Generate patch)

Comparing ray/src/px/ra_pict.c (file contents):
Revision 2.7 by greg, Mon Jul 19 12:04:35 1993 UTC vs.
Revision 2.9 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*              Convert an Radiance image to APPLE pict format.
5   *
6   *                      Orginally Iris to PICT by       Paul Haeberli - 1990
# Line 21 | Line 18 | static char SCCSid[] = "$SunId$ LBL";
18  
19   #include <stdio.h>
20   #include <math.h>
21 < #ifdef MSDOS
25 < #include <fcntl.h>
26 < #endif
21 > #include  <time.h>
22  
23 + #include "platform.h"
24   #include "pict.h"
25   #include "color.h"
26   #include "resolu.h"
27  
32 extern char     *malloc();
33
28   int     outbytes;                   /* This had better be 32 bits! */
29   char    *progname;
30   int     verbose = 0;
# Line 101 | Line 95 | char **argv;
95      int xsize, ysize;
96      int i, picsize;
97      int ssizepos, lsizepos;
98 < #ifdef MSDOS
99 <    extern int  _fmode;
100 <    _fmode = O_BINARY;
107 <    setmode(fileno(stdin), O_BINARY);
108 <    setmode(fileno(stdout), O_BINARY);
109 < #endif
98 >        SET_DEFAULT_BINARY();
99 >    SET_FILE_BINARY(stdin);
100 >    SET_FILE_BINARY(stdout);
101      progname = argv[0];
102  
103      for (i = 1; i < argc ; i++)
# Line 224 | Line 215 | int ysize;
215      int     nbytes, rowbytes;
216      char    *cbuf, *pbuf;
217  
218 <    cbuf = malloc(4 * xsize);
218 >    cbuf = (char *)malloc(4 * xsize);
219  
220      if (cbuf == NULL) {
221          fprintf(stderr, "%s: not enough memory\n", progname);
222          exit(1);
223          }
224  
225 <    pbuf = malloc(4 * xsize);
225 >    pbuf = (char *)malloc(4 * xsize);
226  
227      if (pbuf == NULL) {
228          fprintf(stderr, "%s: not enough memory\n", progname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines