void Temp_dumpMap(FILE *out, Temp_map m) { outfile=out; TAB_dump(m->tab,(void (*)(void *, void*))showit); if (m->under) { fprintf(out,"---------\n"); Temp_dumpMap(out,m->under); } }
void TAB_dump(TAB_table t, void (*show)(void *key, void *value)) { void *k = t->top; int index = ((unsigned)k) % TABSIZE; binder b = t->table[index]; if (b==NULL) return; t->table[index]=b->next; t->top=b->prevtop; show(b->key,b->value); TAB_dump(t,show); assert(t->top == b->prevtop && t->table[index]==b->next); t->top=k; t->table[index]=b; }
void S_dump(S_table t, void (*show)(S_symbol sym, void *binding)) { TAB_dump(t, (void (*)(void *, void *)) show); }