Mercurial > hg > Papers > 2019 > oshiro-thesis
view final_pre/src/SingleLinkedStack.cbc.replace @ 11:ef87093f92d4
add pdf
author | e155702 |
---|---|
date | Sun, 17 Feb 2019 17:13:37 +0900 |
parents | 0e8b9646d43f |
children |
line wrap: on
line source
__code pushSingleLinkedStack(struct Single LinkedStack* stack,union Data* data, __code next(...)) { Element* element = new Element(); element->next = stack->top; element->data = data; stack->top = element; goto next(...); } __code popSingleLinkedStack(struct Single LinkedStack* stack, __code next(union Data* data, ...)) { if (stack->top) { data = stack->top->data; stack->top = stack->top->next; } else { data = NULL; } goto next(data, ...); }