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

Comparing ray/src/util/glareval.c (file contents):
Revision 2.10 by schorsch, Thu Jul 3 22:41:45 2003 UTC vs.
Revision 2.11 by schorsch, Fri Jan 2 12:48:36 2004 UTC

# Line 52 | Line 52 | static long    nrecl = 0L;     /* number of scanlines reclaim
52  
53   static int      wrongformat = 0;
54  
55 < SCAN    *scanretire();
55 > static SCAN * claimscan(int     y);
56 > static COLR * getpictscan(int   y);
57 > static double pict_val(FVECT    vd);
58 > static void rt_compute(float    *pb, int        np);
59 > static gethfunc getexpos;
60 > static SCAN * scanretire(void);
61 > static void initscans(void);
62 > static void donescans(void);
63  
57 extern long     ftell();
64  
65 <
66 < SCAN *
67 < claimscan(y)                    /* claim scanline from buffers */
68 < int     y;
65 > static SCAN *
66 > claimscan(                      /* claim scanline from buffers */
67 >        int     y
68 > )
69   {
70          int     hi = shash(y);
71          SCAN    *slast;
# Line 85 | Line 91 | int    y;
91   }
92  
93  
94 < COLR *
95 < getpictscan(y)                  /* get picture scanline */
96 < int     y;
94 > static COLR *
95 > getpictscan(                    /* get picture scanline */
96 >        int     y
97 > )
98   {
99          register SCAN   *sl;
100          register int    i;
# Line 137 | Line 144 | seekerr:
144  
145  
146   #ifdef DEBUG
147 < pict_stats()                    /* print out picture read statistics */
147 > static void
148 > pict_stats(void)                        /* print out picture read statistics */
149   {
150          static long     lastcall = 0L;  /* ncall at last report */
151          static long     lastread = 0L;  /* nread at last report */
# Line 154 | Line 162 | pict_stats()                   /* print out picture read statistics */
162   #endif
163  
164  
165 < double
166 < pict_val(vd)                    /* find picture value for view direction */
167 < FVECT   vd;
165 > static double
166 > pict_val(                       /* find picture value for view direction */
167 >        FVECT   vd
168 > )
169   {
170          FVECT   pp;
171          FVECT   ip;
# Line 176 | Line 185 | FVECT  vd;
185   }
186  
187  
188 < double
189 < getviewpix(vh, vv)              /* compute single view pixel */
190 < int     vh, vv;
188 > extern double
189 > getviewpix(             /* compute single view pixel */
190 >        int     vh,
191 >        int     vv
192 > )
193   {
194          FVECT   dir;
195          float   rt_buf[12];
# Line 204 | Line 215 | int    vh, vv;
215   }
216  
217  
218 < getviewspan(vv, vb)             /* compute a span of view pixels */
219 < int     vv;
220 < float   *vb;
218 > extern void
219 > getviewspan(            /* compute a span of view pixels */
220 >        int     vv,
221 >        float   *vb
222 > )
223   {
224          float   rt_buf[6*MAXPIX];       /* rtrace send/receive buffer */
225          register int    n;              /* number of pixels in buffer */
# Line 258 | Line 271 | float  *vb;
271   }
272  
273  
274 < rt_compute(pb, np)              /* process buffer through rtrace */
275 < float   *pb;
276 < int     np;
274 > static void
275 > rt_compute(             /* process buffer through rtrace */
276 >        float   *pb,
277 >        int     np
278 > )
279   {
280   #ifdef DEBUG
281          if (verbose && np > 1)
# Line 277 | Line 292 | int    np;
292   }
293  
294  
295 < int
296 < getexpos(s)                     /* get exposure from header line */
297 < char    *s;
295 > static int
296 > getexpos(                       /* get exposure from header line */
297 >        char    *s,
298 >        void    *p
299 > )
300   {
301          char    fmt[32];
302  
# Line 293 | Line 310 | char   *s;
310   }
311  
312  
313 < open_pict(fn)                   /* open picture file */
314 < char    *fn;
313 > extern void
314 > open_pict(                      /* open picture file */
315 >        char    *fn
316 > )
317   {
318          if ((pictfp = fopen(fn, "r")) == NULL) {
319                  fprintf(stderr, "%s: cannot open\n", fn);
# Line 310 | Line 329 | char   *fn;
329   }
330  
331  
332 < close_pict()                    /* done with picture */
332 > extern void
333 > close_pict(void)                        /* done with picture */
334   {
335          if (pictfp == NULL)
336                  return;
# Line 320 | Line 340 | close_pict()                   /* done with picture */
340   }
341  
342  
343 < fork_rtrace(av)                 /* open pipe and start rtrace */
344 < char    *av[];
343 > extern void
344 > fork_rtrace(                    /* open pipe and start rtrace */
345 >        char    *av[]
346 > )
347   {
348          int     rval;
349  
# Line 341 | Line 363 | char   *av[];
363   }
364  
365  
366 < done_rtrace()                   /* wait for rtrace to finish */
366 > extern void
367 > done_rtrace(void)                       /* wait for rtrace to finish */
368   {
369          int     status;
370  
# Line 355 | Line 378 | done_rtrace()                  /* wait for rtrace to finish */
378   }
379  
380  
381 < SCAN *
382 < scanretire()                    /* retire old scanlines to free list */
381 > static SCAN *
382 > scanretire(void)                        /* retire old scanlines to free list */
383   {
384          SCAN    *sold[NRETIRE];
385          int     n;
# Line 399 | Line 422 | scanretire()                   /* retire old scanlines to free list */
422   static char     *scan_buf;
423  
424  
425 < initscans()                             /* initialize scanline buffers */
425 > static void
426 > initscans(void)                         /* initialize scanline buffers */
427   {
428          int     scansize;
429          register SCAN   *ptr;
# Line 438 | Line 462 | initscans()                            /* initialize scanline buffers */
462   }
463  
464  
465 < donescans()                             /* free up scanlines */
465 > static void
466 > donescans(void)                         /* free up scanlines */
467   {
468          bfree(scan_buf, scanbufsiz);
469          bfree((char *)scanpos, pysiz*sizeof(long));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines