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

Comparing ray/src/common/calfunc.c (file contents):
Revision 2.9 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.12 by schorsch, Thu Jul 17 09:21:29 2003 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13   #include "copyright.h"
14  
15   #include  <stdio.h>
16 <
16 > #include  <string.h>
17   #include  <errno.h>
18
18   #include  <math.h>
19  
20 + #include  "rterror.h"
21   #include  "calcomp.h"
22  
23                                  /* bits in argument flag (better be right!) */
# Line 34 | Line 34 | typedef struct activation {
34  
35   static ACTIVATION  *curact = NULL;
36  
37 < static double  libfunc();
37 > static double  libfunc(char *fname, VARDEF *vp);
38  
39   #ifndef  MAXLIB
40   #define  MAXLIB         64      /* maximum number of library functions */
# Line 255 | Line 255 | badarg:
255      eputs(actp->name);
256      eputs(": argument not a function\n");
257      quit(1);
258 +        return NULL; /* pro forma return */
259   }
260  
261  
# Line 350 | Line 351 | VARDEF  *vp;
351          else if (isinf(d))
352              errno = ERANGE;
353   #endif
354 <    if (errno) {
354 >    if (errno == EDOM || errno == ERANGE) {
355          wputs(fname);
356          if (errno == EDOM)
357                  wputs(": domain error\n");
# Line 386 | Line 387 | l_select()             /* return argument #(A1+1) */
387   {
388          register int  n;
389  
390 <        n = argument(1) + .5;
390 >        n = (int)(argument(1) + .5);
391          if (n == 0)
392                  return(nargum()-1);
393          if (n < 1 || n > nargum()-1) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines