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.40 by greg, Fri Feb 23 03:45:52 2024 UTC vs.
Revision 2.42 by greg, Tue Oct 29 00:36:54 2024 UTC

# Line 65 | Line 65 | initfunc(void) /* initialize function evaluation */
65  
66   /* Set parameters for current evaluation */
67   void
68 < set_eparams(char *prms)
68 > set_eparams(const char *prms)
69   {
70 <        static char     *last_params = NULL;
71 <        char            vname[RMAXWORD];
72 <        double          value;
73 <        char            *cpd;
70 >        static const char       *last_params = NULL;
71 >        char                    vname[RMAXWORD];
72 >        double                  value;
73 >        char                    *cpd;
74                                          /* check if already set */
75          if (prms == NULL || !*prms)
76                  return;
# Line 96 | Line 96 | set_eparams(char *prms)
96                  if (*prms++ != '=')
97                          goto bad_params;
98                  value = atof(prms);
99 <                if ((prms = fskip(prms)) == NULL)
99 >                if ((prms = fskip((char *)prms)) == NULL)
100                          goto bad_params;
101                  while (isspace(*prms)) prms++;
102                  prms += (*prms == ',') | (*prms == ';') | (*prms == ':');
# Line 148 | Line 148 | getfunc(       /* get function for this modifier */
148                  } else                          /* reference_count++ */
149                          varset(REFVNAME, '=', varvalue(REFVNAME)+1.0);
150          }
151 <        curfunc = NULL;                 /* parse expressions */
151 >        ecurfunc = NULL;                        /* parse expressions */
152          sprintf(sbuf, "%s \"%s\"", ofun[m->otype].funame, m->oname);
153          for (i=0, ne=0; ef && i < na; i++, ef>>=1)
154                  if (ef & 1) {                   /* flagged as an expression? */
# Line 157 | Line 157 | getfunc(       /* get function for this modifier */
157                          initstr(arg[i], sbuf, 0);
158                          f->ep[ne++] = getE1();
159                          if (nextc != EOF)
160 <                                syntax("unexpected character");
160 >                                esyntax("unexpected character");
161                  }
162          if (ef)
163                  goto toofew;
# Line 256 | Line 256 | setfunc(                       /* set channels for function call */
256  
257   int
258   worldfunc(                      /* special function context sans object */
259 <        char    *ctx,
259 >        const char      *ctx,
260          RAY     *r
261   )
262   {
# Line 265 | Line 265 | worldfunc(                     /* special function context sans object *
265          if (rayinitcal[0])              /* initialize on first call */
266                  initfunc();
267                                          /* set evaluator context */
268 <        calcontext(ctx);
268 >        calcontext((char *)ctx);
269                                          /* check if ray already set */
270          if ((fobj == NULL) & (r->rno == lastrno))
271                  return(0);
# Line 336 | Line 336 | chanvalue(                     /* return channel n to calcomp */
336   )
337   {
338          if (fray == NULL)
339 <                syntax("ray parameter used in constant expression");
339 >                esyntax("ray parameter used in constant expression");
340  
341          if (--n < 0)
342                  goto badchan;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines