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

Comparing ray/src/cv/mgf2meta.c (file contents):
Revision 2.8 by schorsch, Tue Oct 21 19:19:28 2003 UTC vs.
Revision 2.9 by schorsch, Sat Nov 15 17:54:06 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9   #include <stdlib.h>
10   #include <string.h>
11   #include <math.h>
12 +
13 + #include "meta.h"
14   #include "random.h"
15   #include "mgflib/parser.h"
16 + #include "plocate.h" /* XXX shouldn't this rather be in rtmath.h? */
17  
18   #define MSIZE   ((1<<14)-1)
19   #define MX(v)   (int)(MSIZE*(v)[(proj_axis+1)%3])
20   #define MY(v)   (int)(MSIZE*(v)[(proj_axis+2)%3])
21  
19 int     r_face(int ac, char **av);
22   int     proj_axis;
23   double  limit[3][2];
24   int     layer;
# Line 24 | Line 26 | long   rthresh = 1;
26  
27   extern int      mg_nqcdivs;
28  
29 + static int r_face(int ac, char **av);
30 + static void newlayer(void);
31 + static int doline(int v1x, int v1y, int v2x, int v2y);
32  
33 < main(argc, argv)                /* convert files to stdout */
34 < int     argc;
35 < char    *argv[];
33 >
34 > int
35 > main(           /* convert files to stdout */
36 >        int     argc,
37 >        char    *argv[]
38 > )
39   {
40          int     i;
41                                  /* initialize dispatch table */
# Line 70 | Line 78 | userr:
78  
79  
80   int
81 < r_face(ac, av)                  /* convert a face */
82 < int     ac;
83 < char    **av;
81 > r_face(                 /* convert a face */
82 >        int     ac,
83 >        char    **av
84 > )
85   {
86          static FVECT    bbmin = {0,0,0}, bbmax = {1,1,1};
87          register int    i, j;
# Line 110 | Line 119 | short  hshtab[HTBLSIZ][4];             /* done line segments */
119                                          (long)(mx2)<<5 ^ (long)(my2))
120  
121  
122 < newlayer()                              /* start a new layer */
122 > void
123 > newlayer(void)                          /* start a new layer */
124   {
125          (void)memset((char *)hshtab, '\0', sizeof(hshtab));
126          if (++layer >= 16) {
# Line 121 | Line 131 | newlayer()                             /* start a new layer */
131  
132  
133   int
134 < doline(v1x, v1y, v2x, v2y)              /* draw line conditionally */
135 < int     v1x, v1y, v2x, v2y;
134 > doline(         /* draw line conditionally */
135 >        int     v1x,
136 >        int v1y,
137 >        int v2x,
138 >        int v2y
139 > )
140   {
141          register int    h;
142  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines