Mercurial > 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 wrap: on
line diff
--- a/actions.c Wed Feb 13 22:04:50 2008 +0100 +++ b/actions.c Tue Feb 19 22:23:37 2008 +0100 @@ -4,6 +4,14 @@ #include "baum.h" #include "actions.h" +unsigned char action_print(struct Node* node); +unsigned char action_sum(struct Node* node); +unsigned char action_number(struct Node* node); +unsigned char action_input(struct Node* node); +unsigned char action_times(struct Node* node); +unsigned char action_blackhole(struct Node* node); + + unsigned char action(struct Node* node) { if (node == NULL) { @@ -11,28 +19,24 @@ return 0; } + logit(node->name); + if (strcmp(node->name, "print") == 0) { - logit("print-node"); return action_print(node); } else if (strcmp(node->name, "sum") == 0) { - logit("sum-node"); return action_sum(node); } else if (strcmp(node->name, "number") == 0) { - logit("number-node"); return action_number(node); } else if (strcmp(node->name, "input") == 0) { - logit("input-node"); return action_input(node); } else if (strcmp(node->name, "times") == 0) { - logit("times-node"); return action_times(node); } else if (strcmp(node->name, "blackhole") == 0) { - logit("blackhole-node"); return action_blackhole(node); } else {