view paper/src/pop2.cbc @ 158:d2be76d48b00 default tip

update
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Wed, 17 Feb 2021 14:37:21 +0900
parents a5e840dede1b
children
line wrap: on
line source

__code pop2SingleLinkedStack(struct SingleLinkedStack* stack, __code next(union Data* data, union Data* data1, ...)) {
    if (stack->top) {
        data = stack->top->data;
        stack->top = stack->top->next;
    } else {
        data = NULL;
    }
    if (stack->top) {
        data1 = stack->top->data;
        stack->top = stack->top->next;
    } else {
        data1 = NULL;
    }
    goto next(data, data1, ...);
}