--- libelwix/src/patricia.c 2013/01/17 10:05:35 1.1.1.1 +++ libelwix/src/patricia.c 2013/05/26 20:03:19 1.1.1.1.6.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: patricia.c,v 1.1.1.1 2013/01/17 10:05:35 misho Exp $ +* $Id: patricia.c,v 1.1.1.1.6.1 2013/05/26 20:03:19 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -213,12 +213,12 @@ static inline prefix_t *New_Prefix(int family, void *d // ------------------------------------------------------------------------------------ -inline char *prefix_toa(prefix_t * prefix) +char *prefix_toa(prefix_t * prefix) { return prefix_toa2x(prefix, NULL, 0); } -inline prefix_t *ascii2prefix(int family, char *string) +prefix_t *ascii2prefix(int family, char *string) { u_long bitlen, maxbitlen = 0; char *cp; @@ -279,7 +279,7 @@ inline prefix_t *ascii2prefix(int family, char *string return NULL; } -inline prefix_t *Ref_Prefix(prefix_t *prefix) +prefix_t *Ref_Prefix(prefix_t *prefix) { if (!prefix) return NULL; @@ -293,7 +293,7 @@ inline prefix_t *Ref_Prefix(prefix_t *prefix) return prefix; } -inline void Deref_Prefix(prefix_t *prefix) +void Deref_Prefix(prefix_t *prefix) { if (!prefix) return; @@ -309,7 +309,7 @@ inline void Deref_Prefix(prefix_t *prefix) /* } */ /* these routines support continuous mask only */ -inline patricia_tree_t *New_Patricia(int maxbits) +patricia_tree_t *New_Patricia(int maxbits) { patricia_tree_t *patricia; @@ -330,7 +330,7 @@ inline patricia_tree_t *New_Patricia(int maxbits) * if func is supplied, it will be called as func(node->data) * before deleting the node */ -inline void Clear_Patricia(patricia_tree_t *patricia, void_fn_t func) +void Clear_Patricia(patricia_tree_t *patricia, void_fn_t func) { assert(patricia); if (patricia->head) { @@ -368,7 +368,7 @@ inline void Clear_Patricia(patricia_tree_t *patricia, /* Delete(patricia); */ } -inline void Destroy_Patricia(patricia_tree_t *patricia, void_fn_t func) +void Destroy_Patricia(patricia_tree_t *patricia, void_fn_t func) { Clear_Patricia(patricia, func); Delete(patricia); @@ -379,7 +379,7 @@ inline void Destroy_Patricia(patricia_tree_t *patricia /* * if func is supplied, it will be called as func(node->prefix, node->data) */ -inline void patricia_process(patricia_tree_t *patricia, void_fn_t func) +void patricia_process(patricia_tree_t *patricia, void_fn_t func) { patricia_node_t *node; @@ -391,7 +391,7 @@ inline void patricia_process(patricia_tree_t *patricia } -inline patricia_node_t *patricia_search_exact(patricia_tree_t *patricia, prefix_t *prefix) +patricia_node_t *patricia_search_exact(patricia_tree_t *patricia, prefix_t *prefix) { patricia_node_t *node; u_char *addr; @@ -459,7 +459,7 @@ inline patricia_node_t *patricia_search_exact(patricia /* if inclusive != 0, "best" may be the given prefix itself */ -inline patricia_node_t *patricia_search_best2(patricia_tree_t *patricia, prefix_t *prefix, int inclusive) +patricia_node_t *patricia_search_best2(patricia_tree_t *patricia, prefix_t *prefix, int inclusive) { patricia_node_t *node; patricia_node_t *stack[PATRICIA_MAXBITS + 1]; @@ -549,13 +549,13 @@ inline patricia_node_t *patricia_search_best2(patricia return NULL; } -inline patricia_node_t *patricia_search_best(patricia_tree_t *patricia, prefix_t *prefix) +patricia_node_t *patricia_search_best(patricia_tree_t *patricia, prefix_t *prefix) { return patricia_search_best2(patricia, prefix, 1); } -inline patricia_node_t *patricia_lookup(patricia_tree_t *patricia, prefix_t *prefix) +patricia_node_t *patricia_lookup(patricia_tree_t *patricia, prefix_t *prefix) { patricia_node_t *node, *new_node, *parent, *glue; u_char *addr, *test_addr; @@ -759,7 +759,7 @@ inline patricia_node_t *patricia_lookup(patricia_tree_ } -inline void patricia_remove(patricia_tree_t *patricia, patricia_node_t *node) +void patricia_remove(patricia_tree_t *patricia, patricia_node_t *node) { patricia_node_t *parent, *child; @@ -860,7 +860,7 @@ inline void patricia_remove(patricia_tree_t *patricia, /* { from demo.c */ -inline void lookup_then_remove(patricia_tree_t *tree, char *string) +void lookup_then_remove(patricia_tree_t *tree, char *string) { patricia_node_t *node; @@ -868,7 +868,7 @@ inline void lookup_then_remove(patricia_tree_t *tree, patricia_remove(tree, node); } -inline patricia_node_t *make_and_lookup(patricia_tree_t *tree, char *string) +patricia_node_t *make_and_lookup(patricia_tree_t *tree, char *string) { prefix_t *prefix; patricia_node_t *node; @@ -883,7 +883,7 @@ inline patricia_node_t *make_and_lookup(patricia_tree_ return node; } -inline patricia_node_t *try_search_exact(patricia_tree_t *tree, char *string) +patricia_node_t *try_search_exact(patricia_tree_t *tree, char *string) { prefix_t *prefix; patricia_node_t *node; @@ -904,7 +904,7 @@ inline patricia_node_t *try_search_exact(patricia_tree return node; } -inline patricia_node_t *try_search_best(patricia_tree_t *tree, char *string) +patricia_node_t *try_search_best(patricia_tree_t *tree, char *string) { prefix_t *prefix; patricia_node_t *node;