diff baum.c @ 10:0e15841ae111

s/list/stack/g because thats what it is
author meillo@marmaro.de
date Sat, 09 Feb 2008 16:49:29 +0100
parents c020b0d1cfca
children 8e34daa80f64
line wrap: on
line diff
--- 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;