16 |
|
|
17 |
|
#include "object.h" |
18 |
|
|
19 |
< |
#define OSTSIZ 3037 /* object table size (a prime!) */ |
19 |
> |
#include "otypes.h" |
20 |
|
|
21 |
+ |
#ifndef OSTSIZ |
22 |
+ |
#define OSTSIZ 12329 /* object table size (a prime!) */ |
23 |
+ |
#endif |
24 |
+ |
|
25 |
|
static OBJECT *ostable[OSTSIZ]; /* the object set table */ |
26 |
|
|
27 |
|
|
177 |
|
return; |
178 |
|
noderr: |
179 |
|
error(CONSISTENCY, "bad node in objset"); |
180 |
+ |
} |
181 |
+ |
|
182 |
+ |
|
183 |
+ |
nonsurfinset(orig, nobjs) /* check sets for non-surfaces */ |
184 |
+ |
int orig, nobjs; |
185 |
+ |
{ |
186 |
+ |
int n; |
187 |
+ |
register OBJECT *os; |
188 |
+ |
register OBJECT i; |
189 |
+ |
|
190 |
+ |
for (n = 0; n < OSTSIZ; n++) { |
191 |
+ |
if ((os = ostable[n]) == NULL) |
192 |
+ |
continue; |
193 |
+ |
while ((i = *os++) > 0) |
194 |
+ |
while (i--) { |
195 |
+ |
if (*os >= orig && *os < orig+nobjs && |
196 |
+ |
!issurface(objptr(*os)->otype)) |
197 |
+ |
return(1); |
198 |
+ |
os++; |
199 |
+ |
} |
200 |
+ |
} |
201 |
+ |
return(0); |
202 |
|
} |