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

Comparing ray/src/px/pflip.c (file contents):
Revision 2.4 by greg, Mon Oct 16 11:40:11 1995 UTC vs.
Revision 2.6 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   /*
5   * flip picture file horizontally and/or vertically
6   */
7  
8   #include <stdio.h>
9 + #include  <time.h>
10  
11 < #ifdef MSDOS
14 < #include  <fcntl.h>
15 < #endif
16 <
11 > #include "platform.h"
12   #include "color.h"
18
13   #include "resolu.h"
14  
15   int     order;                          /* input orientation */
# Line 31 | Line 25 | FILE   *fin;                           /* input file */
25  
26   char    *progname;
27  
34 extern char     *malloc();
28  
36
29   int
30   neworder()                      /* figure out new order from old */
31   {
# Line 58 | Line 50 | char   *argv[];
50   {
51          static char     picfmt[LPICFMT+1] = PICFMT;
52          int     i, rval;
53 < #ifdef MSDOS
54 <        extern int  _fmode;
63 <        _fmode = O_BINARY;
64 <        setmode(fileno(stdout), O_BINARY);
65 < #endif
53 >        SET_DEFAULT_BINARY();
54 >        SET_FILE_BINARY(stdout);
55          progname = argv[0];
56  
57          for (i = 1; i < argc; i++)
# Line 138 | Line 127 | scanfile()                             /* scan to the end of file */
127                  }
128          }
129          scanpos[0] = ftell(fin);
130 <        free((char *)scanin);
130 >        free((void *)scanin);
131   }
132  
133  
# Line 172 | Line 161 | flip()                                 /* flip the picture */
161                          exit(1);
162                  }
163          }
164 <        free((char *)scanin);
164 >        free((void *)scanin);
165          if (fhoriz)
166 <                free((char *)scanout);
166 >                free((void *)scanout);
167   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines