void scanSegStack(segstack *stack, void (*func)(void *cell)) { segchunk *chunk; if ( (chunk=stack->last) ) /* something there */ { chunk->top = stack->top; /* close last chunk */ for(; chunk; chunk=chunk->previous) scan_chunk(stack, chunk->top, chunk->data, func); } }
void scanSegStack(segstack *stack, void (*func)(void *cell)) { segchunk *chunk; if ( (chunk=stack->last) ) /* something there */ { if ( stack->base == CHUNK_DATA(chunk) ) chunk->top = stack->top; /* close last chunk */ for(; chunk; chunk=chunk->previous) scan_chunk(stack, chunk->top, CHUNK_DATA(chunk), func); } }