annotate paper/src/StackPush.cbc @ 72:951cb9681030

add source code
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 04 Feb 2021 14:54:44 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
72
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 __code pushSingleLinkedStack(struct SingleLinkedStack* stack, union Data* data, __code next(...)) {
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 Element* element = new Element();
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 element->next = stack->top;
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 element->data = data;
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 stack->top = element;
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 goto next(...);
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 }
951cb9681030 add source code
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8