Classes | Functions
ptree.c File Reference
#include "../stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "ptree.h"
Include dependency graph for ptree.c:

Go to the source code of this file.

Classes

struct  ptree_node

Functions

static ptree_node_t_find_min (ptree_node_t *pn, int *levelp)
static ptree_node_t_find_succ (ptree_node_t *pn, int *levelp)
static void _remove_node (ptree_node_t **rootp, ptree_node_t *pn, void **oldval)
static ptree_walk_res_t _visit (struct ptree_node *pn, int level, void *arg1, void *arg2)
static int _walk_int (struct ptree_node *pn, ptree_order_t order, int level, ptree_walk_res_t(*func)(struct ptree_node *, int level, void *, void *), void *arg1, void *arg2)
static int _walk_to (void *v, struct ptree_node **startp, struct ptree_node ***pp, int(*cmp)(const void *v1, const void *v2))
void ptree_clear (ptree_node_t **rootp)
ptree_walk_res_t ptree_clear_func (struct ptree_node *pn, int level, void *arg1, void *arg2)
int ptree_contains (void *v, ptree_node_t *parentp, int(*cmp)(const void *v1, const void *v2), void **nodeval)
int ptree_inorder_walk_remove (ptree_node_t **rootp, void **oldval, void *pn, int(*cmp)(const void *v1, const void *v2))
int ptree_remove (void *v, ptree_node_t **rootp, int(*cmp)(const void *v1, const void *v2), void **oldval)
int ptree_replace (void *v, ptree_node_t **rootp, int(*cmp)(const void *v1, const void *v2), void **oldval)
ptree_walk_res_t ptree_walk (ptree_node_t *start, ptree_order_t order, ptree_walk_res_t(*func)(const void *v1, int level, void *arg, void *ptree_inorder_walking_remove_arg), int(*cmp)(const void *v1, const void *v2), void *arg)

Function Documentation

static ptree_node_t* _find_min ( ptree_node_t pn,
int *  levelp 
) [static]

Definition at line 57 of file ptree.c.

static ptree_node_t* _find_succ ( ptree_node_t pn,
int *  levelp 
) [static]

Definition at line 70 of file ptree.c.

static void _remove_node ( ptree_node_t **  rootp,
ptree_node_t pn,
void **  oldval 
) [static]

Definition at line 219 of file ptree.c.

static ptree_walk_res_t _visit ( struct ptree_node pn,
int  level,
void arg1,
void arg2 
) [static]

Definition at line 46 of file ptree.c.

static int _walk_int ( struct ptree_node pn,
ptree_order_t  order,
int  level,
ptree_walk_res_t(*)(struct ptree_node *, int level, void *, void *)  func,
void arg1,
void arg2 
) [static]

Definition at line 102 of file ptree.c.

static int _walk_to ( void v,
struct ptree_node **  startp,
struct ptree_node ***  pp,
int(*)(const void *v1, const void *v2)  cmp 
) [static]

Definition at line 18 of file ptree.c.

void ptree_clear ( ptree_node_t **  rootp)

Definition at line 348 of file ptree.c.

ptree_walk_res_t ptree_clear_func ( struct ptree_node pn,
int  level,
void arg1,
void arg2 
)

Definition at line 337 of file ptree.c.

int ptree_contains ( void v,
ptree_node_t parentp,
int(*)(const void *v1, const void *v2)  cmp,
void **  nodeval 
)

Definition at line 444 of file ptree.c.

int ptree_inorder_walk_remove ( ptree_node_t **  rootp,
void **  oldval,
void pn,
int(*)(const void *v1, const void *v2)  cmp 
)

Definition at line 302 of file ptree.c.

int ptree_remove ( void v,
ptree_node_t **  rootp,
int(*)(const void *v1, const void *v2)  cmp,
void **  oldval 
)

Definition at line 355 of file ptree.c.

int ptree_replace ( void v,
ptree_node_t **  rootp,
int(*)(const void *v1, const void *v2)  cmp,
void **  oldval 
)

Definition at line 379 of file ptree.c.

ptree_walk_res_t ptree_walk ( ptree_node_t start,
ptree_order_t  order,
ptree_walk_res_t(*)(const void *v1, int level, void *arg, void *ptree_inorder_walking_remove_arg)  func,
int(*)(const void *v1, const void *v2)  cmp,
void arg 
)

Definition at line 321 of file ptree.c.



pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:22