aboutsummaryrefslogtreecommitdiff
path: root/Computer_Science/data_structures/chapter_4/print_ascii_tree.h
blob: 12eed6a066328f98936e208697c57aef9958d44a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef _PRINT_ASCII_TREE_H
#define _PRINT_ASCII_TREE_H

struct asciinode_struct;
typedef struct asciinode_struct asciinode;
typedef SearchTree Tree;

#define MAX_HEIGHT 1000
#define INFINITY (1 << 20)

int MIN (int X, int Y);
int MAX (int X, int Y);
asciinode *build_ascii_tree_recursive(Tree t);
asciinode *build_ascii_tree(Tree t);
void free_ascii_tree(asciinode *node);
void compute_lprofile(asciinode *node, int x, int y);
void compute_rprofile(asciinode *node, int x, int y);
void compute_edge_lengths(asciinode *node);
void print_level(asciinode *node, int x, int level);
void print_ascii_tree(Tree t);

#endif