133 |
|
tab->hsiz = nexthsiz(tab->hsiz); |
134 |
|
tab->htab = (OBJECT *)malloc(tab->hsiz*sizeof(OBJECT)); |
135 |
|
if (tab->htab == NULL) |
136 |
< |
error(SYSTEM, "out of memory in tputo"); |
136 |
> |
error(SYSTEM, "out of memory in otndx"); |
137 |
|
ndx = tab->hsiz; |
138 |
|
while (ndx--) /* empty it */ |
139 |
|
tab->htab[ndx] = OVOID; |
140 |
|
} |
141 |
|
/* look up object */ |
142 |
|
hval = shash(name); |
143 |
+ |
tryagain: |
144 |
|
for (i = 0; i < tab->hsiz; i++) { |
145 |
|
ndx = (hval + i*i) % tab->hsiz; |
146 |
|
if (tab->htab[ndx] == OVOID || |
157 |
|
tab->htab[i] = oldhtab[ndx]; |
158 |
|
} |
159 |
|
free((char *)oldhtab); |
160 |
< |
return(otndx(name, tab)); |
160 |
> |
goto tryagain; /* should happen only once! */ |
161 |
|
} |