aboutsummaryrefslogtreecommitdiff
path: root/nodelink.c
diff options
context:
space:
mode:
Diffstat (limited to 'nodelink.c')
-rw-r--r--nodelink.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/nodelink.c b/nodelink.c
index aaf8c18..d66bed4 100644
--- a/nodelink.c
+++ b/nodelink.c
@@ -1,6 +1,5 @@
#include <stdlib.h>
#include <stdio.h>
-#include <string.h>
#include "nodelink.h"
#include "strbst.h"
@@ -23,28 +22,3 @@ link* newlink(node* to) {
new->to = to;
return new;
}
-
-static void printlink(char* name, link* conn) {
- if (conn->desc[0])
- printf("%s: %s", name, conn->desc);
- else
- printf("%s\n", name);
-}
-
-static void printeach(strbstnode* loc, char reprint) {
- if (loc == NULL) return;
- // loc->ind is the name of the connection and loc->data the link
- if (!reprint) printf(" "); // indent on subnode
- printlink(loc->ind, loc->data); // prints it
- // and subnodes if iterating over root tree (except root link)
- if (reprint && strcmp(loc->ind,"")) {
- // prints the link's target's link tree
- printeach( ( (link*)loc->data)->to->links->head, 0);
- }
- printeach(loc->left, reprint);
- printeach(loc->right, reprint); // recursion
-}
-
-void printnode(node* root) {
- printeach(root->links->head, 1);
-}