30 lines
403 B
C
30 lines
403 B
C
|
#include <stdio.h>
|
||
|
#include "../stack.h"
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
bci_stack_t stack = NULL;
|
||
|
int i;
|
||
|
uint16_t res;
|
||
|
char status = 0;
|
||
|
|
||
|
|
||
|
for(i = 0; i < 10; i++)
|
||
|
{
|
||
|
bci_stack_t_push(&stack, (uint16_t) i);
|
||
|
}
|
||
|
while(!status)
|
||
|
{
|
||
|
status = bci_stack_t_pop(&stack, &res);
|
||
|
printf("%d\n", res);
|
||
|
}
|
||
|
|
||
|
|
||
|
for(i = 0; i < 10; i++)
|
||
|
{
|
||
|
bci_stack_t_push(&stack, (uint16_t) i);
|
||
|
}
|
||
|
bci_stack_t_del(&stack);
|
||
|
return 0;
|
||
|
}
|