# HG changeset patch # User meillo@marmaro.de # Date 1204400100 -3600 # Node ID 1ad3d7305e5d184d28eb9163d8478d090a07d4c8 # Parent 5c13e29bc6fd298e6bd41e689eda2bb2a0591bd8 reduced output; cleanups diff -r 5c13e29bc6fd -r 1ad3d7305e5d actions.c --- 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); diff -r 5c13e29bc6fd -r 1ad3d7305e5d baum.c --- 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); } diff -r 5c13e29bc6fd -r 1ad3d7305e5d baum.h --- 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; -};