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.41 by greg, Mon Sep 16 17:31:14 2024 UTC vs.
Revision 2.43 by greg, Tue Apr 22 17:12:25 2025 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 127 | Line 127 | getfunc(       /* get function for this modifier */
127          if ((f = (MFUNC *)m->os) != NULL)
128                  return(f);
129          fobj = NULL; fray = NULL;
130        if (rayinitcal[0])              /* initialize on first call */
131                initfunc();
130          if ((na = m->oargs.nsargs) <= ff)
131                  goto toofew;
132          arg = m->oargs.sarg;
# Line 256 | Line 254 | setfunc(                       /* set channels for function call */
254  
255   int
256   worldfunc(                      /* special function context sans object */
257 <        char    *ctx,
257 >        const char      *ctx,
258          RAY     *r
259   )
260   {
261          static RNUMBER  lastrno = ~0;
264
265        if (rayinitcal[0])              /* initialize on first call */
266                initfunc();
262                                          /* set evaluator context */
263 <        calcontext(ctx);
263 >        calcontext((char *)ctx);
264                                          /* check if ray already set */
265          if ((fobj == NULL) & (r->rno == lastrno))
266                  return(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines