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.5 by greg, Thu Dec 13 10:37:17 1990 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines