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

Comparing ray/src/common/loadvars.c (file contents):
Revision 2.11 by greg, Wed Apr 23 00:52:33 2003 UTC vs.
Revision 2.14 by schorsch, Wed Jul 30 10:11:06 2003 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include <stdio.h>
11   #include <stdlib.h>
12   #include <ctype.h>
13 +
14 + #include "standard.h"
15   #include "vars.h"
16  
17   #define NOCHAR  127             /* constant for character to delete */
# Line 58 | Line 60 | char   *rfname;
60   int
61   setvariable(ass, mv)            /* assign variable according to string */
62   register char   *ass;
63 < VARIABLE        *(*mv)();
63 > VARIABLE        *(*mv)(char*);
64   {
65          char    varname[32];
66          int     n;
# Line 88 | Line 90 | VARIABLE       *(*mv)();
90          if (vp == NULL)
91                  return(-1);
92                                          /* assign new value */
93 <        if (i = vp->nass) {
93 >        if ( (i = vp->nass) ) {
94                  cp = vp->value;
95                  while (i--)
96                          while (*cp++)
# Line 138 | Line 140 | register int   n;
140   {
141          register char   *cp;
142  
143 <        if (vval(vn) == NULL | n < 0 | n >= vdef(vn))
143 >        if ((vval(vn) == NULL) | (n < 0) | (n >= vdef(vn)))
144                  return(NULL);
145          cp = vval(vn);
146          while (n--)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines