GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72636
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tavl.c File Reference
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "tavl.h"
Include dependency graph for tavl.c:

Go to the source code of this file.

Functions

struct tavl_tabletavl_create (tavl_comparison_func *compare, void *param, struct libavl_allocator *allocator)
 
void * tavl_find (const struct tavl_table *tree, const void *item)
 
void ** tavl_probe (struct tavl_table *tree, void *item)
 
void * tavl_insert (struct tavl_table *table, void *item)
 
void * tavl_replace (struct tavl_table *table, void *item)
 
void * tavl_delete (struct tavl_table *tree, const void *item)
 
void tavl_t_init (struct tavl_traverser *trav, struct tavl_table *tree)
 
void * tavl_t_first (struct tavl_traverser *trav, struct tavl_table *tree)
 
void * tavl_t_last (struct tavl_traverser *trav, struct tavl_table *tree)
 
void * tavl_t_find (struct tavl_traverser *trav, struct tavl_table *tree, void *item)
 
void * tavl_t_insert (struct tavl_traverser *trav, struct tavl_table *tree, void *item)
 
void * tavl_t_copy (struct tavl_traverser *trav, const struct tavl_traverser *src)
 
void * tavl_t_next (struct tavl_traverser *trav)
 
void * tavl_t_prev (struct tavl_traverser *trav)
 
void * tavl_t_cur (struct tavl_traverser *trav)
 
void * tavl_t_replace (struct tavl_traverser *trav, void *new)
 
struct tavl_tabletavl_copy (const struct tavl_table *org, tavl_copy_func *copy, tavl_item_func *destroy, struct libavl_allocator *allocator)
 
void tavl_destroy (struct tavl_table *tree, tavl_item_func *destroy)
 
void * tavl_malloc (struct libavl_allocator *allocator, size_t size)
 
void tavl_free (struct libavl_allocator *allocator, void *block)
 
void() tavl_assert_insert (struct tavl_table *table, void *item)
 
void *() tavl_assert_delete (struct tavl_table *table, void *item)
 

Variables

struct libavl_allocator tavl_allocator_default
 

Function Documentation

void*() tavl_assert_delete ( struct tavl_table table,
void *  item 
)

Definition at line 918 of file tavl.c.

References NULL, and tavl_delete().

void() tavl_assert_insert ( struct tavl_table table,
void *  item 
)

Definition at line 909 of file tavl.c.

References NULL, and tavl_probe().

void* tavl_find ( const struct tavl_table tree,
const void *  item 
)
void tavl_free ( struct libavl_allocator allocator,
void *  block 
)

Definition at line 893 of file tavl.c.

References free(), and NULL.

void* tavl_insert ( struct tavl_table table,
void *  item 
)

Definition at line 243 of file tavl.c.

References NULL, and tavl_probe().

void* tavl_malloc ( struct libavl_allocator allocator,
size_t  size 
)

Definition at line 886 of file tavl.c.

References malloc(), and NULL.

void* tavl_replace ( struct tavl_table table,
void *  item 
)

Definition at line 254 of file tavl.c.

References NULL, r, and tavl_probe().

void* tavl_t_copy ( struct tavl_traverser trav,
const struct tavl_traverser src 
)
void* tavl_t_cur ( struct tavl_traverser trav)

Definition at line 710 of file tavl.c.

References NULL, tavl_node::tavl_data, and tavl_traverser::tavl_node.

void* tavl_t_first ( struct tavl_traverser trav,
struct tavl_table tree 
)
void tavl_t_init ( struct tavl_traverser trav,
struct tavl_table tree 
)

Definition at line 546 of file tavl.c.

References NULL, tavl_traverser::tavl_node, and tavl_traverser::tavl_table.

Referenced by tavl_t_insert().

void* tavl_t_insert ( struct tavl_traverser trav,
struct tavl_table tree,
void *  item 
)
void* tavl_t_last ( struct tavl_traverser trav,
struct tavl_table tree 
)
void* tavl_t_replace ( struct tavl_traverser trav,
void *  new 
)

Definition at line 720 of file tavl.c.

References NULL, old, tavl_node::tavl_data, and tavl_traverser::tavl_node.

Variable Documentation

struct libavl_allocator tavl_allocator_default
Initial value:
= {
}
void * tavl_malloc(struct libavl_allocator *allocator, size_t size)
Definition: tavl.c:886
void tavl_free(struct libavl_allocator *allocator, void *block)
Definition: tavl.c:893

Definition at line 900 of file tavl.c.

Referenced by tavl_create().