mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2025-01-03 14:56:36 -05:00
Namespace cleanup: _mangle exported symbols, declare others static.
This is tedious. svn path=/trunk/avl/; revision=5082
This commit is contained in:
parent
cfb106b16b
commit
d0a179694b
18
avl/avl.c
18
avl/avl.c
@ -22,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* $Id: avl.c,v 1.4 2003/03/15 02:10:18 msmith Exp $ */
|
||||
/* $Id: avl.c,v 1.5 2003/07/07 01:10:14 brendan Exp $ */
|
||||
|
||||
/*
|
||||
* This is a fairly straightfoward translation of a prototype
|
||||
@ -83,7 +83,7 @@ avl_tree_new (avl_key_compare_fun_type compare_fun,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
avl_tree_free_helper (avl_node * node, avl_free_key_fun_type free_key_fun)
|
||||
{
|
||||
if (node->left) {
|
||||
@ -610,7 +610,7 @@ int avl_delete(avl_tree *tree, void *key, avl_free_key_fun_type free_key_fun)
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
avl_iterate_inorder_helper (avl_node * node,
|
||||
avl_iter_fun_type iter_fun,
|
||||
void * iter_arg)
|
||||
@ -755,7 +755,7 @@ avl_iterate_index_range (avl_tree * tree,
|
||||
* representing the closest preceding value.
|
||||
*/
|
||||
|
||||
avl_node *
|
||||
static avl_node *
|
||||
avl_get_index_by_key (avl_tree * tree,
|
||||
void * key,
|
||||
unsigned long * index)
|
||||
@ -978,7 +978,7 @@ avl_get_item_by_key_least (avl_tree * tree,
|
||||
|
||||
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
|
||||
|
||||
long
|
||||
static long
|
||||
avl_verify_balance (avl_node * node)
|
||||
{
|
||||
if (!node) {
|
||||
@ -998,7 +998,7 @@ avl_verify_balance (avl_node * node)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
avl_verify_parent (avl_node * node, avl_node * parent)
|
||||
{
|
||||
if (node->parent != parent) {
|
||||
@ -1013,7 +1013,7 @@ avl_verify_parent (avl_node * node, avl_node * parent)
|
||||
}
|
||||
}
|
||||
|
||||
long
|
||||
static long
|
||||
avl_verify_rank (avl_node * node)
|
||||
{
|
||||
if (!node) {
|
||||
@ -1059,9 +1059,9 @@ typedef struct _link_node {
|
||||
int width;
|
||||
} link_node;
|
||||
|
||||
char balance_chars[3] = {'\\', '-', '/'};
|
||||
static char balance_chars[3] = {'\\', '-', '/'};
|
||||
|
||||
int
|
||||
static int
|
||||
default_key_printer (char * buffer, void * key)
|
||||
{
|
||||
return sprintf (buffer, "%p", key);
|
||||
|
34
avl/avl.h
34
avl/avl.h
@ -2,7 +2,7 @@
|
||||
* Copyright (C) 1995 by Sam Rushing <rushing@nightmare.com>
|
||||
*/
|
||||
|
||||
/* $Id: avl.h,v 1.6 2003/03/15 02:10:18 msmith Exp $ */
|
||||
/* $Id: avl.h,v 1.7 2003/07/07 01:10:14 brendan Exp $ */
|
||||
|
||||
#ifndef __AVL_H
|
||||
#define __AVL_H
|
||||
@ -62,6 +62,34 @@ typedef int (*avl_key_printer_fun_type) (char *, void *);
|
||||
* function with each tree, separately.
|
||||
*/
|
||||
|
||||
#ifdef _mangle
|
||||
# define avl_tree_new _mangle(avl_tree_new)
|
||||
# define avl_node_new _mangle(avl_node_new)
|
||||
# define avl_tree_free _mangle(avl_tree_free)
|
||||
# define avl_insert _mangle(avl_insert)
|
||||
# define avl_delete _mangle(avl_delete)
|
||||
# define avl_get_by_index _mangle(avl_get_by_index)
|
||||
# define avl_get_by_key _mangle(avl_get_by_key)
|
||||
# define avl_iterate_inorder _mangle(avl_iterate_inorder)
|
||||
# define avl_iterate_index_range _mangle(avl_iterate_index_range)
|
||||
# define avl_tree_rlock _mangle(avl_tree_rlock)
|
||||
# define avl_tree_wlock _mangle(avl_tree_wlock)
|
||||
# define avl_tree_wlock _mangle(avl_tree_wlock)
|
||||
# define avl_tree_unlock _mangle(avl_tree_unlock)
|
||||
# define avl_node_rlock _mangle(avl_node_rlock)
|
||||
# define avl_node_wlock _mangle(avl_node_wlock)
|
||||
# define avl_node_unlock _mangle(avl_node_unlock)
|
||||
# define avl_get_span_by_key _mangle(avl_get_span_by_key)
|
||||
# define avl_get_span_by_two_keys _mangle(avl_get_span_by_two_keys)
|
||||
# define avl_verify _mangle(avl_verify)
|
||||
# define avl_print_tree _mangle(avl_print_tree)
|
||||
# define avl_get_first _mangle(avl_get_first)
|
||||
# define avl_get_prev _mangle(avl_get_prev)
|
||||
# define avl_get_next _mangle(avl_get_next)
|
||||
# define avl_get_item_by_key_most _mangle(avl_get_item_by_key_most)
|
||||
# define avl_get_item_by_key_least _mangle(avl_get_item_by_key_least)
|
||||
#endif
|
||||
|
||||
typedef struct _avl_tree {
|
||||
avl_node * root;
|
||||
unsigned long height;
|
||||
@ -173,7 +201,3 @@ void avl_node_unlock(avl_node *node);
|
||||
#endif
|
||||
|
||||
#endif /* __AVL_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user