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

Comparing ray/src/common/otypes.c (file contents):
Revision 1.3 by greg, Fri Jan 5 09:16:40 1990 UTC vs.
Revision 1.4 by greg, Fri Jan 12 11:15:40 1990 UTC

# Line 17 | Line 17 | static char SCCSid[] = "$SunId$ LBL";
17   #include  "otypes.h"
18  
19  
20 + extern int  (*addobjnotify[])();        /* people to notify of new objects */
21 +
22   FUN  ofun[NUMOTYPE] = INIT_OTYPE;       /* our object function table */
23  
24   static struct ohtab {
# Line 66 | Line 68 | char  *mname;
68   insertobject(obj)               /* insert new object into our list */
69   register OBJECT  obj;
70   {
71 <        register int  ndx;
71 >        register int  i;
72  
73   #ifdef  GETOBJ
74 <        ndx = otndx(objptr(obj)->oname, &objtab);
75 <        objtab.htab[ndx] = obj;
74 >        i = otndx(objptr(obj)->oname, &objtab);
75 >        objtab.htab[i] = obj;
76   #endif
77          if (ismodifier(objptr(obj)->otype)) {
78 <                ndx = otndx(objptr(obj)->oname, &modtab);
79 <                modtab.htab[ndx] = obj;
78 >                i = otndx(objptr(obj)->oname, &modtab);
79 >                modtab.htab[i] = obj;
80          }
81 +        for (i = 0; addobjnotify[i] != NULL; i++)
82 +                (*addobjnotify[i])(obj);
83   }
84  
85  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines