baum
diff actions.c @ 26:f0856c177403
removed obsolete stuff; only relevant stuff is extern now; refactoring
author | meillo@marmaro.de |
---|---|
date | Tue, 19 Feb 2008 22:23:37 +0100 |
parents | b62288419c1c |
children | cd979b979610 |
line diff
1.1 --- a/actions.c Wed Feb 13 22:04:50 2008 +0100 1.2 +++ b/actions.c Tue Feb 19 22:23:37 2008 +0100 1.3 @@ -4,6 +4,14 @@ 1.4 #include "baum.h" 1.5 #include "actions.h" 1.6 1.7 +unsigned char action_print(struct Node* node); 1.8 +unsigned char action_sum(struct Node* node); 1.9 +unsigned char action_number(struct Node* node); 1.10 +unsigned char action_input(struct Node* node); 1.11 +unsigned char action_times(struct Node* node); 1.12 +unsigned char action_blackhole(struct Node* node); 1.13 + 1.14 + 1.15 1.16 unsigned char action(struct Node* node) { 1.17 if (node == NULL) { 1.18 @@ -11,28 +19,24 @@ 1.19 return 0; 1.20 } 1.21 1.22 + logit(node->name); 1.23 + 1.24 if (strcmp(node->name, "print") == 0) { 1.25 - logit("print-node"); 1.26 return action_print(node); 1.27 1.28 } else if (strcmp(node->name, "sum") == 0) { 1.29 - logit("sum-node"); 1.30 return action_sum(node); 1.31 1.32 } else if (strcmp(node->name, "number") == 0) { 1.33 - logit("number-node"); 1.34 return action_number(node); 1.35 1.36 } else if (strcmp(node->name, "input") == 0) { 1.37 - logit("input-node"); 1.38 return action_input(node); 1.39 1.40 } else if (strcmp(node->name, "times") == 0) { 1.41 - logit("times-node"); 1.42 return action_times(node); 1.43 1.44 } else if (strcmp(node->name, "blackhole") == 0) { 1.45 - logit("blackhole-node"); 1.46 return action_blackhole(node); 1.47 1.48 } else {