int lookahead(void* p, int level) { void* const q = work.data(); while (level >= 1) { for (int b = 1; b < 2; ++b) { spec.get_copy(q, p); if (spec.get_child(q, level, b) != 0) { spec.destruct(q); return level; } spec.destruct(q); } level = spec.get_child(p, level, 0); } return level; }
void destruct(void* p) { spec.destruct(p); }