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

Comparing ray/src/px/protate.c (file contents):
Revision 2.6 by gwlarson, Tue Oct 27 16:32:33 1998 UTC vs.
Revision 2.9 by schorsch, Sun Mar 28 20:33:14 2004 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1991 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   * prot.c - program to rotate picture file 90 degrees clockwise.
6   *
# Line 14 | Line 11 | static char SCCSid[] = "$SunId$ LBL";
11  
12   #include "color.h"
13  
14 + #include <time.h>
15 +
16   #include "resolu.h"
17  
18   int     order;                          /* input scanline order */
# Line 22 | Line 21 | int    xres, yres;                     /* input resolution */
21   int     correctorder = 0;               /* order correction? */
22   int     ccw = 0;                        /* rotate CCW? */
23  
24 < #ifdef BIGMEM
26 < char    buf[1<<22];                     /* output buffer */
27 < #else
24 > #ifdef SMLMEM
25   char    buf[1<<20];                     /* output buffer */
26 + #else
27 + char    buf[1<<22];                     /* output buffer */
28   #endif
29  
30   int     nrows;                          /* number of rows output at once */
# Line 38 | Line 37 | short  ordertab[4][2] = {
37          {0,XDECR}, {XDECR,XDECR|YDECR}, {XDECR|YDECR,YDECR}, {YDECR,0}
38   };
39  
40 + static int neworder(void);
41 + static void rotatecw(FILE *fp);
42 + static void rotateccw(FILE *fp);
43  
44 < int
45 < neworder()              /* return corrected order */
44 >
45 >
46 > static int
47 > neworder(void)          /* return corrected order */
48   {
49          register int    i;
50  
# Line 53 | Line 57 | neworder()             /* return corrected order */
57          exit(2);
58   }
59  
60 <
61 < main(argc, argv)
62 < int     argc;
63 < char    *argv[];
60 > int
61 > main(
62 >        int     argc,
63 >        char    *argv[]
64 > )
65   {
66          static char     picfmt[LPICFMT+1] = PICFMT;
67          int     rval;
# Line 119 | Line 124 | userr:
124   }
125  
126  
127 < rotatecw(fp)                    /* rotate picture clockwise */
128 < FILE    *fp;
127 > static void
128 > rotatecw(                       /* rotate picture clockwise */
129 >        FILE    *fp
130 > )
131   {
132          register COLR   *inln;
133          register int    xoff, inx, iny;
# Line 151 | Line 158 | FILE   *fp;
158                                  exit(1);
159                          }
160          }
161 <        free((char *)inln);
161 >        free((void *)inln);
162   }
163  
164  
165 < rotateccw(fp)                   /* rotate picture counter-clockwise */
166 < FILE    *fp;
165 > static void
166 > rotateccw(                      /* rotate picture counter-clockwise */
167 >        FILE    *fp
168 > )
169   {
170          register COLR   *inln;
171          register int    xoff, inx, iny;
# Line 187 | Line 196 | FILE   *fp;
196                                  exit(1);
197                          }
198          }
199 <        free((char *)inln);
199 >        free((void *)inln);
200   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines