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

Comparing ray/src/rt/func.c (file contents):
Revision 2.20 by greg, Mon Aug 4 22:37:53 2003 UTC vs.
Revision 2.22 by schorsch, Tue Mar 30 16:13:01 2004 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 < #include  "ray.h"
10 > #include <math.h>
11  
12 + #include  "ray.h"
13 + #include  "paths.h"
14   #include  "otypes.h"
13
15   #include  "func.h"
16  
17  
# Line 34 | Line 35 | static RAY  *fray = NULL;      /* current function ray */
35   static double  l_erf(char *), l_erfc(char *), l_arg(char *);
36  
37  
38 < MFUNC *
39 < getfunc(m, ff, ef, dofwd)       /* get function for this modifier */
40 < OBJREC  *m;
41 < int  ff;
42 < unsigned int  ef;
43 < int  dofwd;
38 > extern MFUNC *
39 > getfunc(        /* get function for this modifier */
40 >        OBJREC  *m,
41 >        int  ff,
42 >        unsigned int  ef,
43 >        int  dofwd
44 > )
45   {
46          static char  initfile[] = INITFILE;
47          char  sbuf[MAXSTR];
# Line 131 | Line 133 | toofew:
133          objerror(m, USER, "too few string arguments");
134   memerr:
135          error(SYSTEM, "out of memory in getfunc");
136 +        return NULL; /* pro forma return */
137   }
138  
139  
140 < void
141 < freefunc(m)                     /* free memory associated with modifier */
142 < OBJREC  *m;
140 > extern void
141 > freefunc(                       /* free memory associated with modifier */
142 >        OBJREC  *m
143 > )
144   {
145          register MFUNC  *f;
146          register int  i;
# Line 163 | Line 167 | OBJREC  *m;
167   }
168  
169  
170 < int
171 < setfunc(m, r)                   /* set channels for function call */
172 < OBJREC  *m;
173 < register RAY  *r;
170 > extern int
171 > setfunc(                        /* set channels for function call */
172 >        OBJREC  *m,
173 >        register RAY  *r
174 > )
175   {
176          static unsigned long  lastrno = ~0;
177          register MFUNC  *f;
# Line 194 | Line 199 | register RAY  *r;
199   }
200  
201  
202 < void
203 < loadfunc(fname)                 /* load definition file */
204 < char  *fname;
202 > extern void
203 > loadfunc(                       /* load definition file */
204 >        char  *fname
205 > )
206   {
207          char  *ffname;
208  
# Line 232 | Line 238 | l_arg(char *nm)                        /* return nth real argument */
238   static double
239   l_erf(char *nm)                 /* error function */
240   {
235        extern double  erf();
236
241          return(erf(argument(1)));
242   }
243  
# Line 241 | Line 245 | l_erf(char *nm)                        /* error function */
245   static double
246   l_erfc(char *nm)                /* cumulative error function */
247   {
244        extern double  erfc();
245
248          return(erfc(argument(1)));
249   }
250  
251  
252 < double
253 < chanvalue(n)                    /* return channel n to calcomp */
254 < register int  n;
252 > extern double
253 > chanvalue(                      /* return channel n to calcomp */
254 >        register int  n
255 > )
256   {
257          if (fray == NULL)
258                  syntax("ray parameter used in constant expression");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines