changeset 41:1ad3d7305e5d

reduced output; cleanups
author meillo@marmaro.de
date Sat, 01 Mar 2008 20:35:00 +0100 (2008-03-01)
parents 5c13e29bc6fd
children 233ac9bea4f1
files actions.c baum.c baum.h
diffstat 3 files changed, 12 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/actions.c	Sat Mar 01 20:15:20 2008 +0100
+++ b/actions.c	Sat Mar 01 20:35:00 2008 +0100
@@ -20,8 +20,6 @@
 		return 0;
 	}
 
-	logit(node->name);
-
 	if (strcmp(node->name, "print") == 0) {
 		return action_print(node);
 
--- 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);
 	}
 
--- a/baum.h	Sat Mar 01 20:15:20 2008 +0100
+++ b/baum.h	Sat Mar 01 20:35:00 2008 +0100
@@ -1,7 +1,5 @@
 int option_verbose;
 
-void logit(char* text);
-
 struct Node* newNode(char* name, unsigned char value);
 struct Node* insertLast(struct Node* node, struct Node* insert);
 
@@ -13,8 +11,3 @@
 	struct Node* down;
 	struct Node* right;
 };
-
-struct Stackitem {
-	struct Node* node;
-	struct Stackitem* next;
-};