pinosaur
/
smdp.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed duplicate function + added some comments to header files
[smdp.git]
/
test
/
cstack.c
diff --git
a/test/cstack.c
b/test/cstack.c
index
cf1b504
..
30d4df3
100644
(file)
--- a/
test/cstack.c
+++ b/
test/cstack.c
@@
-9,13
+9,13
@@
int main(int argc, char *argv[]) {
printf("INIT: head: %d, size: %zu, alloc: %zu\n", s->head, s->size, s->alloc);
(s->push)(s, 'a');
printf("INIT: head: %d, size: %zu, alloc: %zu\n", s->head, s->size, s->alloc);
(s->push)(s, 'a');
- printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
(s->top)(s)
, s->head, s->size, s->alloc);
+ printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
s->content[s->head]
, s->head, s->size, s->alloc);
(s->push)(s, 'b');
(s->push)(s, 'b');
- printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
(s->top)(s)
, s->head, s->size, s->alloc);
+ printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
s->content[s->head]
, s->head, s->size, s->alloc);
(s->push)(s, 'c');
(s->push)(s, 'c');
- printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
(s->top)(s)
, s->head, s->size, s->alloc);
+ printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
s->content[s->head]
, s->head, s->size, s->alloc);
char ch = (s->pop)(s);
printf("POP: char: %c, head: %d, size: %zu, alloc: %zu\n", ch, s->head, s->size, s->alloc);
char ch = (s->pop)(s);
printf("POP: char: %c, head: %d, size: %zu, alloc: %zu\n", ch, s->head, s->size, s->alloc);
@@
-24,10
+24,10
@@
int main(int argc, char *argv[]) {
printf("POP: char: %c, head: %d, size: %zu, alloc: %zu\n", ch, s->head, s->size, s->alloc);
(s->push)(s, 'd');
printf("POP: char: %c, head: %d, size: %zu, alloc: %zu\n", ch, s->head, s->size, s->alloc);
(s->push)(s, 'd');
- printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
(s->top)(s)
, s->head, s->size, s->alloc);
+ printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
s->content[s->head]
, s->head, s->size, s->alloc);
(s->push)(s, 'e');
(s->push)(s, 'e');
- printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
(s->top)(s)
, s->head, s->size, s->alloc);
+ printf("PUSH: char: %c, head: %d, size: %zu, alloc: %zu\n",
s->content[s->head]
, s->head, s->size, s->alloc);
while(s->size > 0) {
ch = (s->pop)(s);
while(s->size > 0) {
ch = (s->pop)(s);