int f(){} int g(){} int k(){} typedef int *(pfvoid)(); int main() { add(f); add(g); add(k); cycle(); } cycle() { queue_t new; pfvoid pf; for (;;) while (pf = q->dequeue()) { pf(); new->add(pf); } dup(new, q); } queue_t q; add(pfvoid pf) { q->add(pf); }