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

Comparing ray/src/util/vwrays.c (file contents):
Revision 3.9 by greg, Wed Oct 22 02:06:35 2003 UTC vs.
Revision 3.10 by schorsch, Fri Mar 26 23:34:23 2004 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9   #include "standard.h"
10   #include "view.h"
11  
12 < extern int      putf(), putd(), puta();
12 > typedef void putfunc(FVECT ro, FVECT rd);
13 > static putfunc puta;
14 > static putfunc putf;
15 > static putfunc putd;
16 > static void pix2rays(FILE *fp);
17 > static void putrays(void);
18  
19 < int     (*putr)() = puta;
19 > static putfunc *putr = puta;
20  
21   VIEW    vw = STDVIEW;
22  
# Line 26 | Line 31 | int    fromstdin = 0;
31   char    *progname;
32  
33  
34 < main(argc, argv)
35 < int     argc;
36 < char    *argv[];
34 > int
35 > main(
36 >        int     argc,
37 >        char    *argv[]
38 > )
39   {
40          char    *err;
41          int     rval, getdim = 0;
# Line 140 | Line 147 | userr:
147   }
148  
149  
150 < pix2rays(FILE *fp)
150 > static void
151 > pix2rays(
152 >        FILE *fp
153 > )
154   {
155          static FVECT    rorg, rdir;
156          float   zval;
# Line 190 | Line 200 | pix2rays(FILE *fp)
200   }
201  
202  
203 < putrays()
203 > static void
204 > putrays(void)
205   {
206          static RREAL    loc[2];
207          static FVECT    rorg, rdir;
208 <        float   *zbuf;
208 >        float   *zbuf = NULL;
209          int     sc;
210          double  d;
211          register int    si, i;
# Line 237 | Line 248 | putrays()
248   }
249  
250  
251 < puta(ro, rd)            /* put out ray in ASCII format */
252 < FVECT   ro, rd;
251 > static void
252 > puta(           /* put out ray in ASCII format */
253 >        FVECT   ro,
254 >        FVECT   rd
255 > )
256   {
257          printf("%.5e %.5e %.5e %.5e %.5e %.5e\n",
258                          ro[0], ro[1], ro[2],
# Line 246 | Line 260 | FVECT  ro, rd;
260   }
261  
262  
263 < putf(ro, rd)            /* put out ray in float format */
264 < FVECT   ro, rd;
263 > static void
264 > putf(           /* put out ray in float format */
265 >        FVECT   ro,
266 >        FVECT   rd
267 > )
268   {
269          float v[6];
270  
# Line 257 | Line 274 | FVECT  ro, rd;
274   }
275  
276  
277 < putd(ro, rd)            /* put out ray in double format */
278 < FVECT   ro, rd;
277 > static void
278 > putd(           /* put out ray in double format */
279 >        FVECT   ro,
280 >        FVECT   rd
281 > )
282   {
283          double v[6];
284  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines