Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7858 views
1
#ifndef MUPDF_FITZ_TREE_H
2
#define MUPDF_FITZ_TREE_H
3
4
#include "mupdf/fitz/system.h"
5
#include "mupdf/fitz/context.h"
6
7
/* AA-tree to look up things by strings. */
8
9
typedef struct fz_tree_s fz_tree;
10
11
void *fz_tree_lookup(fz_context *ctx, fz_tree *node, const char *key);
12
13
/*
14
Insert a new key/value pair and rebalance the tree.
15
Return the new root of the tree after inserting and rebalancing.
16
May be called with a NULL root to create a new tree.
17
*/
18
fz_tree *fz_tree_insert(fz_context *ctx, fz_tree *root, const char *key, void *value);
19
20
void fz_drop_tree(fz_context *ctx, fz_tree *node, void (*dropfunc)(fz_context *ctx, void *value));
21
22
void fz_debug_tree(fz_context *ctx, fz_tree *root);
23
24
#endif
25
26