comparison 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
comparison
equal deleted inserted replaced
37:29172b6e802a 38:ff01f0f076e4
12 12
13 13
14 14
15 unsigned char action(struct Node* node) { 15 unsigned char action(struct Node* node) {
16 if (node == NULL) { 16 if (node == NULL) {
17 fprintf(stderr, "action of non existing node\n"); 17 if (option_verbose) {
18 fprintf(stderr, "warning: action of non existing node\n");
19 }
18 return 0; 20 return 0;
19 } 21 }
20 22
21 logit(node->name); 23 logit(node->name);
22 24
65 return node->value; 67 return node->value;
66 } 68 }
67 69
68 70
69 unsigned char action_number(struct Node* node) { 71 unsigned char action_number(struct Node* node) {
70 action(node->down); 72 if (node->down != NULL) {
73 action(node->down);
74 }
71 return node->value; 75 return node->value;
72 } 76 }
73 77
74 78
75 unsigned char action_input(struct Node* node) { 79 unsigned char action_input(struct Node* node) {