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 { |
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 |
|
|