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

Comparing ray/src/px/xshowtrace.c (file contents):
Revision 2.9 by schorsch, Mon Nov 10 12:28:56 2003 UTC vs.
Revision 2.10 by schorsch, Sun Mar 28 20:33:14 2004 UTC

# Line 45 | Line 45 | struct node {                          /* ray tree node */
45  
46   int     slow = 0;               /* slow trace? */
47  
48 + void mainloop(void);
49 + static void freetree(struct node        *tp);
50 + static void tracerays(struct node       *tp);
51 + static int strtoipt(int ipt[2], char    *str);
52 + static void setvec(int  ipt[2]);
53 + static void vector(int  ip1[2], int     ip2[2]);
54  
55 < main(argc, argv)                /* takes both the octree and the image */
56 < int     argc;
57 < char    *argv[];
55 >
56 > int
57 > main(           /* takes both the octree and the image */
58 >        int     argc,
59 >        char    *argv[]
60 > )
61   {
62          int     i;
63          char    combuf[PATH_MAX];
# Line 96 | Line 105 | char   *argv[];
105   }
106  
107  
108 < mainloop()                              /* get and process input */
108 > void
109 > mainloop(void)                          /* get and process input */
110   {
111          static struct node      *sis[MAXDEPTH];
112          register struct node    *newp;
# Line 135 | Line 145 | mainloop()                             /* get and process input */
145   }
146  
147  
148 < freetree(tp)                            /* free a trace tree */
149 < struct node     *tp;
148 > static void
149 > freetree(                               /* free a trace tree */
150 >        struct node     *tp
151 > )
152   {
153          register struct node    *kid, *k2;
154  
# Line 148 | Line 160 | struct node    *tp;
160   }
161  
162  
163 < tracerays(tp)                           /* trace a ray tree */
164 < struct node     *tp;
163 > static void
164 > tracerays(                              /* trace a ray tree */
165 >        struct node     *tp
166 > )
167   {
168          register struct node    *kid;
169  
# Line 160 | Line 174 | struct node    *tp;
174   }
175  
176  
177 < strtoipt(ipt, str)              /* convert string x y z to image point */
178 < int     ipt[2];
179 < char    *str;
177 > static int
178 > strtoipt(               /* convert string x y z to image point */
179 >        int     ipt[2],
180 >        char    *str
181 > )
182   {
183          FVECT   im_pt, pt;
184  
# Line 186 | Line 202 | Window gwind = 0;
202   int     xoff, yoff;
203  
204  
205 < setvec(ipt)                     /* set up vector drawing for pick */
206 < int     ipt[2];
205 > static void
206 > setvec(                 /* set up vector drawing for pick */
207 >        int     ipt[2]
208 > )
209   {
210          extern Window   xfindwind();
211          XWindowAttributes       wa;
# Line 226 | Line 244 | int    ipt[2];
244   }
245  
246  
247 < vector(ip1, ip2)                /* draw a vector */
248 < int     ip1[2], ip2[2];
247 > static void
248 > vector(         /* draw a vector */
249 >        int     ip1[2],
250 >        int     ip2[2]
251 > )
252   {
253          if (ip2[0] == -1 && ip2[1] == -1)
254                  return;                 /* null vector */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines