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.16 by greg, Wed Oct 24 00:39:09 2012 UTC vs.
Revision 2.17 by greg, Sat Apr 20 02:31:41 2013 UTC

# Line 146 | Line 146 | funset(                                /* set a library function */
146              quit(1);
147          }
148          for (lp = &library[libsize]; lp > library; lp--)
149 <            if (strcmp(lp[-1].fname, fname) > 0) {
150 <                lp[0].fname = lp[-1].fname;
151 <                lp[0].nargs = lp[-1].nargs;
152 <                lp[0].atyp = lp[-1].atyp;
153 <                lp[0].f = lp[-1].f;
154 <            } else
149 >            if (strcmp(lp[-1].fname, fname) > 0)
150 >                lp[0] = lp[-1];
151 >            else
152                  break;
153          libsize++;
154      }
155      if (fptr == NULL) {                         /* delete */
156          while (lp < &library[libsize-1]) {
157 <            lp[0].fname = lp[1].fname;
161 <            lp[0].nargs = lp[1].nargs;
162 <            lp[0].atyp = lp[1].atyp;
163 <            lp[0].f = lp[1].f;
157 >            lp[0] = lp[1];
158              lp++;
159          }
160          libsize--;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines