diff baum.c @ 41:1ad3d7305e5d

reduced output; cleanups
author meillo@marmaro.de
date Sat, 01 Mar 2008 20:35:00 +0100
parents 5c13e29bc6fd
children 233ac9bea4f1
line wrap: on
line diff
--- a/baum.c	Sat Mar 01 20:15:20 2008 +0100
+++ b/baum.c	Sat Mar 01 20:35:00 2008 +0100
@@ -17,16 +17,22 @@
 #define VERSION "0.3"
 
 
-struct Node* root = 0;
-struct Stackitem* stack = NULL;
-
-
 void printNode(struct Node* node, int level);
 void printTree(struct Node* root, int level);
 struct Node* lastNode(struct Node* node);
 void delete(struct Node* node);
 
 
+struct Stackitem {
+	struct Node* node;
+	struct Stackitem* next;
+};
+
+
+
+struct Node* root = 0;
+struct Stackitem* stack = NULL;
+
 
 void logit(char* text) {
 	if (option_verbose) {
@@ -260,6 +266,7 @@
 	read_input(argv[0]);
 
 	if (option_verbose) {
+		fprintf(stderr, "\n\ntree read from input\n(should be the same without comments and empty lines)\n\n");
 		printTree(root, 0);
 	}
 
@@ -267,6 +274,7 @@
 	fflush(stdout);
 
 	if (option_verbose) {
+		fprintf(stderr, "\n\ntree after execution of the program\n\n");
 		printTree(root, 0);
 	}