Lines Matching refs:objects

94 	end = SIZE(objects);  in init_objects()
97 let = objects[first].oc_olet; in init_objects()
99 while (last < end && objects[last].oc_olet == let in init_objects()
100 && objects[last].oc_name != NULL) in init_objects()
112 sum += objects[j].oc_prob; in init_objects()
115 objects[j].oc_prob = (100 + j - first) / (last - first); in init_objects()
121 if (objects[first].oc_descr != NULL && let != TOOL_SYM) { in init_objects()
123 while (last < end && objects[last].oc_olet == let) in init_objects()
128 tmp = objects[j].oc_descr; in init_objects()
129 objects[j].oc_descr = objects[i].oc_descr; in init_objects()
130 objects[i].oc_descr = tmp; in init_objects()
142 while ((prob -= objects[i].oc_prob) >= 0) in probtype()
144 if (objects[i].oc_olet != let || !objects[i].oc_name) in probtype()
157 objects[first + j].oc_prob = 0; in setgemprobs()
159 if (first >= LAST_GEM || first >= SIZE(objects) || in setgemprobs()
160 objects[first].oc_olet != GEM_SYM || in setgemprobs()
161 objects[first].oc_name == NULL) in setgemprobs()
165 objects[j].oc_prob = (20 + j - first) / (LAST_GEM - first); in setgemprobs()
180 bwrite(fd, objects, sizeof objects); in savenames()
185 for (i = 0; i < SIZE(objects); i++) { in savenames()
186 if (objects[i].oc_uname) { in savenames()
187 len = strlen(objects[i].oc_uname) + 1; in savenames()
189 bwrite(fd, objects[i].oc_uname, len); in savenames()
200 mread(fd, objects, sizeof objects); in restnames()
201 for (i = 0; i < SIZE(objects); i++) in restnames()
202 if (objects[i].oc_uname) { in restnames()
204 objects[i].oc_uname = alloc(len); in restnames()
205 mread(fd, objects[i].oc_uname, len); in restnames()
217 end = SIZE(objects); in dodiscovered()
237 objects[i].oc_uname != NULL || in interesting_to_discover()
238 (objects[i].oc_name_known && objects[i].oc_descr != NULL) in interesting_to_discover()