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 1.3 by greg, Sat Sep 29 11:18:34 1990 UTC vs.
Revision 1.4 by greg, Tue Apr 23 15:44:39 1991 UTC

# Line 51 | Line 51 | static double  l_exp(), l_log(), l_log10();
51   #ifdef  BIGLIB
52                          /* functions must be listed alphabetically */
53   static LIBR  library[MAXLIB] = {
54 <    { "acos", 1, l_acos },
55 <    { "asin", 1, l_asin },
56 <    { "atan", 1, l_atan },
57 <    { "atan2", 2, l_atan2 },
58 <    { "ceil", 1, l_ceil },
59 <    { "cos", 1, l_cos },
60 <    { "exp", 1, l_exp },
61 <    { "floor", 1, l_floor },
62 <    { "if", 3, l_if },
63 <    { "log", 1, l_log },
64 <    { "log10", 1, l_log10 },
65 <    { "rand", 1, l_rand },
66 <    { "select", 1, l_select },
67 <    { "sin", 1, l_sin },
68 <    { "sqrt", 1, l_sqrt },
69 <    { "tan", 1, l_tan },
54 >    { "acos", 1, ':', l_acos },
55 >    { "asin", 1, ':', l_asin },
56 >    { "atan", 1, ':', l_atan },
57 >    { "atan2", 2, ':', l_atan2 },
58 >    { "ceil", 1, ':', l_ceil },
59 >    { "cos", 1, ':', l_cos },
60 >    { "exp", 1, ':', l_exp },
61 >    { "floor", 1, ':', l_floor },
62 >    { "if", 3, ':', l_if },
63 >    { "log", 1, ':', l_log },
64 >    { "log10", 1, ':', l_log10 },
65 >    { "rand", 1, ':', l_rand },
66 >    { "select", 1, ':', l_select },
67 >    { "sin", 1, ':', l_sin },
68 >    { "sqrt", 1, ':', l_sqrt },
69 >    { "tan", 1, ':', l_tan },
70   };
71  
72   static int  libsize = 16;
# Line 74 | Line 74 | static int  libsize = 16;
74   #else
75                          /* functions must be listed alphabetically */
76   static LIBR  library[MAXLIB] = {
77 <    { "ceil", 1, l_ceil },
78 <    { "floor", 1, l_floor },
79 <    { "if", 3, l_if },
80 <    { "rand", 1, l_rand },
81 <    { "select", 1, l_select },
77 >    { "ceil", 1, ':', l_ceil },
78 >    { "floor", 1, ':', l_floor },
79 >    { "if", 3, ':', l_if },
80 >    { "rand", 1, ':', l_rand },
81 >    { "select", 1, ':', l_select },
82   };
83  
84   static int  libsize = 5;
# Line 145 | Line 145 | double  *a;
145   }
146  
147  
148 < funset(fname, nargs, fptr)              /* set a library function */
148 > funset(fname, nargs, assign, fptr)      /* set a library function */
149   char  *fname;
150   int  nargs;
151 + int  assign;
152   double  (*fptr)();
153   {
154      register LIBR  *lp;
# Line 161 | Line 162 | double  (*fptr)();
162              if (strcmp(lp[-1].fname, fname) > 0) {
163                  lp[0].fname = lp[-1].fname;
164                  lp[0].nargs = lp[-1].nargs;
165 +                lp[0].atyp = lp[-1].atyp;
166                  lp[0].f = lp[-1].f;
167              } else
168                  break;
# Line 168 | Line 170 | double  (*fptr)();
170      }
171      lp[0].fname = savestr(fname);
172      lp[0].nargs = nargs;
173 +    lp[0].atyp = assign;
174      lp[0].f = fptr;
175   }
176  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines