aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1a797aa..8cec5ee 100644
--- a/main.c
+++ b/main.c
@@ -3,6 +3,7 @@
#include "read.h"
#include "nodelink.h"
+#include "strbst.h"
static void printlink(char* name, link* conn) {
if (conn->desc[0])
@@ -25,12 +26,19 @@ static void printeach(strbstnode* loc, char reprint) {
printeach(loc->right, reprint); // recursion
}
-void printnode(node* root) {
+static void printnode(node* root) {
printeach(root->links->head, 1);
}
+static void listeach(strbstnode* loc) {
+ if (loc == NULL) return;
+ listeach(loc->left); listeach(loc->right);
+ printf("Got %s\n",loc->ind);
+}
+
int main() {
node* root = readfile("template");
+ listeach(root->links->head);
printnode(root);
return 0;
}