tree.c File Reference

Go to the source code of this file.

Classes

struct  AVTreeNode

Functions

void * av_tree_find (const AVTreeNode *t, void *key, int(*cmp)(void *key, const void *b), void *next[2])
void * av_tree_insert (AVTreeNode **tp, void *key, int(*cmp)(void *key, const void *b))
 Finds a element for which cmp(key, elem)==0, if no such element is found key is inserted into the tree.
void av_tree_destroy (AVTreeNode *t)
void av_tree_enumerate (AVTreeNode *t, void *opaque, int(*f)(void *opaque, void *elem))
static int check (AVTreeNode *t)
static void print (AVTreeNode *t, int depth)
int cmp (const void *a, const void *b)
int main ()


Function Documentation

void* av_tree_find ( const AVTreeNode t,
void *  key,
int(*)(void *key, const void *b cmp,
void *  next[2] 
)

Definition at line 31 of file tree.c.

Referenced by read_seek(), and write_packet().

void* av_tree_insert ( struct AVTreeNode **  rootp,
void *  key,
int(*)(void *key, const void *b cmp 
)

Finds a element for which cmp(key, elem)==0, if no such element is found key is inserted into the tree.

Parameters:
rootp A pointer to a pointer to the root node of the tree. Note that the root node can change during insertions, this is required to keep the tree balanced.
Returns:
If no insertion happened, the found element. If an insertion happened, then either key or NULL will be returned. Which one it is depends on the tree state and the implementation. You should make no assumptions that it's one or the other in the code.

Definition at line 44 of file tree.c.

Referenced by av_tree_insert(), ff_nut_add_sp(), and main().

void av_tree_destroy ( AVTreeNode t  ) 

Definition at line 88 of file tree.c.

Referenced by av_tree_destroy().

void av_tree_enumerate ( AVTreeNode t,
void *  opaque,
int(*)(void *opaque, void *elem)  f 
)

Definition at line 95 of file tree.c.

static int check ( AVTreeNode t  )  [static]

static void print ( AVTreeNode t,
int  depth 
) [static]

Definition at line 120 of file tree.c.

Referenced by $table(), elsif(), if(), main(), MusicNode::printYourself(), unless(), usage(), and while().

int cmp ( const void *  a,
const void *  b 
)

Definition at line 131 of file tree.c.

int main ( void   ) 

Definition at line 135 of file tree.c.


Generated on Sat Dec 18 05:15:56 2010 for MythTV by  doxygen 1.5.5