Mercurial > baum
diff actions.c @ 38:ff01f0f076e4
option_verbose is now global; stuff about warning when (expected) nodes are not there
author | meillo@marmaro.de |
---|---|
date | Sat, 01 Mar 2008 20:04:08 +0100 |
parents | b11ac43f3917 |
children | 1ad3d7305e5d |
line wrap: on
line diff
--- a/actions.c Sat Mar 01 17:55:42 2008 +0100 +++ b/actions.c Sat Mar 01 20:04:08 2008 +0100 @@ -14,7 +14,9 @@ unsigned char action(struct Node* node) { if (node == NULL) { - fprintf(stderr, "action of non existing node\n"); + if (option_verbose) { + fprintf(stderr, "warning: action of non existing node\n"); + } return 0; } @@ -67,7 +69,9 @@ unsigned char action_number(struct Node* node) { - action(node->down); + if (node->down != NULL) { + action(node->down); + } return node->value; }