# HG changeset patch # User meillo@marmaro.de # Date 1202572169 -3600 # Node ID 0e15841ae111b3c5748e55452c37673e37df90d5 # Parent c020b0d1cfca2f9edd88c4949af361d179b4dc88 s/list/stack/g because thats what it is diff -r c020b0d1cfca -r 0e15841ae111 actions.c --- a/actions.c Sat Feb 09 16:41:41 2008 +0100 +++ b/actions.c Sat Feb 09 16:49:29 2008 +0100 @@ -74,7 +74,8 @@ unsigned char action_input(struct Node* node) { /* unsigned char input = (unsigned char) getchar(); - getchar(); /* catches the newline */ + getchar(); + */ /* reads a number which is treated as ASCII value */ int input; @@ -90,7 +91,7 @@ struct Node* tp; unsigned char i; tp = node->down; - for (i; i < node->value; i++) { + for (i = 0; i < node->value; i++) { /* deep copy */ } return 0; diff -r c020b0d1cfca -r 0e15841ae111 baum.c --- a/baum.c Sat Feb 09 16:41:41 2008 +0100 +++ b/baum.c Sat Feb 09 16:49:29 2008 +0100 @@ -16,7 +16,7 @@ struct Node* root = 0; -struct Listitem* list = NULL; +struct Stackitem* stack = NULL; void logit(char* text) { @@ -108,22 +108,22 @@ void push(struct Node* node) { - struct Listitem* tmp; - struct Listitem* new; - new = (struct Listitem*) malloc(sizeof(struct Listitem)); + struct Stackitem* tmp; + struct Stackitem* new; + new = (struct Stackitem*) malloc(sizeof(struct Stackitem)); new->node = node; - tmp = list; - list = new; - list->next = tmp; + tmp = stack; + stack = new; + stack->next = tmp; } struct Node* pull() { - if (list == NULL) { + if (stack == NULL) { return NULL; } - struct Listitem* tmp; + struct Stackitem* tmp; struct Node* node; - tmp = list; - list = list->next; + tmp = stack; + stack = stack->next; node = tmp->node; free(tmp); tmp=0; return node; diff -r c020b0d1cfca -r 0e15841ae111 baum.h --- a/baum.h Sat Feb 09 16:41:41 2008 +0100 +++ b/baum.h Sat Feb 09 16:49:29 2008 +0100 @@ -21,7 +21,7 @@ }; -struct Listitem { +struct Stackitem { struct Node* node; - struct Listitem* next; + struct Stackitem* next; };