#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "binarytree.h"
Go to the source code of this file.
|
static void | subtree_tostr2 (binarytree_t *subtree, val_tostr tostr, char valstr[], char *left_lead, char result[]) |
|
binarytree_t * | binarytree_new (size_t size, mem_alloc m_alloc) |
|
void | binarytree_del (binarytree_t **root, mem_free m_free) |
|
void * | binarytree_rootval (binarytree_t *tree) |
|
binarytree_t * | binarytree_leftsubtree (binarytree_t *tree) |
|
binarytree_t * | binarytree_rightsubtree (binarytree_t *tree) |
|
void | binarytree_set_leftsubtree (binarytree_t *tree, binarytree_t *subtree) |
|
void | binarytree_set_rightsubtree (binarytree_t *tree, binarytree_t *subtree) |
|
int | binarytree_count (binarytree_t *tree) |
|
binarytree_t * | binarytree_list_to_tree (binarytree_t **head, int count) |
|
void | binarytree_listify_helper (binarytree_t *root, binarytree_t **tail) |
|
binarytree_t * | binarytree_listify (binarytree_t *root) |
|
binarytree_t * | binarytree_listalloc (size_t elt_size, int num_elts, mem_alloc m_alloc) |
|
binarytree_t * | binarytree_find (binarytree_t *root, val_cmp matches, void *val) |
|
void | binarytree_tostring (binarytree_t *tree, val_tostr tostr, char valstr[], char result[]) |
|
void | binarytree_tostring_indent (binarytree_t *root, val_tostr tostr, char valstr[], char *indents, char result[]) |
|
int | binarytree_height (binarytree_t *root) |
|
binarytree_t * | binarytree_insert (binarytree_t *root, val_cmp compare, binarytree_t *key) |
|
◆ MAX_LEFT_LEAD_STR
#define MAX_LEFT_LEAD_STR 256 |
◆ MAX_SUBTREE_STR
#define MAX_SUBTREE_STR 32768 |
◆ binarytree_count()
◆ binarytree_del()
◆ binarytree_find()
◆ binarytree_height()
◆ binarytree_insert()
◆ binarytree_leftsubtree()
◆ binarytree_list_to_tree()
◆ binarytree_listalloc()
◆ binarytree_listify()
◆ binarytree_listify_helper()
◆ binarytree_new()
◆ binarytree_rightsubtree()
◆ binarytree_rootval()
◆ binarytree_set_leftsubtree()
◆ binarytree_set_rightsubtree()
◆ binarytree_tostring()
◆ binarytree_tostring_indent()
void binarytree_tostring_indent |
( |
binarytree_t * |
root, |
|
|
val_tostr |
tostr, |
|
|
char |
valstr[], |
|
|
char * |
indents, |
|
|
char |
result[] |
|
) |
| |
◆ subtree_tostr2()
static void subtree_tostr2 |
( |
binarytree_t * |
subtree, |
|
|
val_tostr |
tostr, |
|
|
char |
valstr[], |
|
|
char * |
left_lead, |
|
|
char |
result[] |
|
) |
| |
|
static |