Commit 151edf82 by Rudolf

Remove tree printing support

This simple printing no longer shows the tree properly
parent 8ce552bd
Showing with 0 additions and 34 deletions
......@@ -93,9 +93,6 @@ int encode_file(FILE *in, FILE *out)
if (!tree)
return -1;
if (DEBUG)
print_tree(tree);
encode_header(&bitbuf, tree);
fseek(in, 0, SEEK_SET);
......@@ -122,9 +119,6 @@ int decode_file(FILE *in, FILE *out)
decode_tree(&bitbuf, out, tree);
if (DEBUG)
print_tree(tree);
free_tree(tree);
return 0;
......
......@@ -45,30 +45,3 @@ void print_char(unsigned char c)
break;
}
}
void print_tree(struct tree *parent)
{
/*int level = 1;
printf("Showing tree\n");
while (parent->left != NULL ) {
if (parent->right) {
for (int i = 0; i < level; i++)
printf(" ");
print_char(parent->right->ch);
}
for (int i = 0; i < level-1; i++) {
printf(" ");
}
printf("o\n");
if (parent->left && !parent->left->left) {
for (int i = 0; i < level; i++)
printf(" ");
print_char(parent->left->ch);
}
level += 1;
parent = parent->left;
}*/
}
......@@ -21,6 +21,5 @@ void __printb(void *value, size_t size);
})
void print_char(unsigned char c);
void print_tree(struct tree *parent);
#endif /* _PRINT_HELPER_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment