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 */ |
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 |
|
|