annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 __code pop2SingleLinkedStack(struct SingleLinkedStack* stack, __code next(union Data* data, union Data* data1, ...)) {
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 if (stack->top) {
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 data = stack->top->data;
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 stack->top = stack->top->next;
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 } else {
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 data = NULL;
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 }
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 if (stack->top) {
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 data1 = stack->top->data;
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 stack->top = stack->top->next;
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 } else {
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 data1 = NULL;
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 }
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 goto next(data, data1, ...);
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 }
a5e840dede1b add src
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16