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

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.54 by greg, Mon Mar 10 17:26:26 2003 UTC vs.
Revision 2.55 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 21 | Line 21 | static const char RCSid[] = "$Id";
21   #endif
22   #endif
23  
24 < extern time_t   time();
25 <
24 > #include  <time.h>
25   #include  <signal.h>
26  
27 + #include  "platform.h"
28   #include  "view.h"
29
29   #include  "random.h"
31
30   #include  "paths.h"
31  
32 +
33   #define  RFTEMPLATE     "rfXXXXXX"
34  
35   #ifndef SIGCONT
# Line 108 | Line 107 | int  hres, vres;                       /* resolution for this frame */
107  
108   static VIEW     lastview;               /* the previous view input */
109  
110 < extern char  *mktemp();
110 > extern char  *mktemp();  /* XXX should be in stdlib.h or unistd.h */
111  
112   void  report();
113  
# Line 289 | Line 288 | char  *pout, *zout, *prvr;
288                                          "cannot open output file \"%s\"", fbuf);
289                                  error(SYSTEM, errmsg);
290                          }
291 < #ifdef MSDOS
293 <                        setmode(fileno(stdout), O_BINARY);
294 < #endif
291 >                        SET_FILE_BINARY(stdout);
292                          dupheader();
293                  }
294                  hres = hresolu; vres = vresolu; pa = pixaspect;
# Line 393 | Line 390 | char  *zfile, *oldfile;
390                          sprintf(errmsg, "cannot open z-file \"%s\"", zfile);
391                          error(SYSTEM, errmsg);
392                  }
393 < #ifdef MSDOS
397 <                setmode(zfd, O_BINARY);
398 < #endif
393 >                SET_FD_BINARY(zfd);
394                  for (i = 0; i <= psample; i++) {
395                          zbar[i] = (float *)malloc(hres*sizeof(float));
396                          if (zbar[i] == NULL)
# Line 677 | Line 672 | char  *oldfile;
672                  error(WARNING, errmsg);
673                  goto gotzip;
674          }
675 < #ifdef MSDOS
681 <        setmode(fileno(fp), O_BINARY);
682 < #endif
675 >        SET_FILE_BINARY(fp);
676                                  /* discard header */
677          getheader(fp, NULL, NULL);
678                                  /* get picture size */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines