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.7 by schorsch, Thu Jul 3 22:41:44 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 + #include  <string.h>
11  
12 < #ifdef MSDOS
14 < #include  <fcntl.h>
15 < #endif
16 <
12 > #include "platform.h"
13   #include "color.h"
18
14   #include "resolu.h"
15  
16   int     order;                          /* input orientation */
# Line 31 | Line 26 | FILE   *fin;                           /* input file */
26  
27   char    *progname;
28  
34 extern char     *malloc();
29  
36
30   int
31   neworder()                      /* figure out new order from old */
32   {
# Line 58 | Line 51 | char   *argv[];
51   {
52          static char     picfmt[LPICFMT+1] = PICFMT;
53          int     i, rval;
54 < #ifdef MSDOS
55 <        extern int  _fmode;
63 <        _fmode = O_BINARY;
64 <        setmode(fileno(stdout), O_BINARY);
65 < #endif
54 >        SET_DEFAULT_BINARY();
55 >        SET_FILE_BINARY(stdout);
56          progname = argv[0];
57  
58          for (i = 1; i < argc; i++)
# Line 138 | Line 128 | scanfile()                             /* scan to the end of file */
128                  }
129          }
130          scanpos[0] = ftell(fin);
131 <        free((char *)scanin);
131 >        free((void *)scanin);
132   }
133  
134  
# Line 172 | Line 162 | flip()                                 /* flip the picture */
162                          exit(1);
163                  }
164          }
165 <        free((char *)scanin);
165 >        free((void *)scanin);
166          if (fhoriz)
167 <                free((char *)scanout);
167 >                free((void *)scanout);
168   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines