X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Favl_tree.h;h=9a531ad90c69f850d5dc527bc67375db51014f69;hp=35c13a32b04a9e5b0aaf2acd6273174e80e331f0;hb=5db596c6844169f1eb5f804b72abe99d067aaa5a;hpb=627f7c22b447bd464b536cd016278545674df93d diff --git a/lib/avl_tree.h b/lib/avl_tree.h index 35c13a32..9a531ad9 100644 --- a/lib/avl_tree.h +++ b/lib/avl_tree.h @@ -29,7 +29,7 @@ library for inclusion into tinc (http://tinc.nl.linux.org/) by Guus Sliepen . - $Id: avl_tree.h,v 1.1.2.5 2002/06/21 10:11:11 guus Exp $ + $Id: avl_tree.h,v 1.1.2.8 2003/07/12 17:41:45 guus Exp $ */ @@ -37,54 +37,54 @@ #define __AVL_TREE_H__ #ifndef AVL_DEPTH - #ifndef AVL_COUNT - #define AVL_DEPTH - #endif +#ifndef AVL_COUNT +#define AVL_DEPTH +#endif #endif typedef struct avl_node_t { - /* Linked list part */ + /* Linked list part */ - struct avl_node_t *next; - struct avl_node_t *prev; + struct avl_node_t *next; + struct avl_node_t *prev; - /* Tree part */ + /* Tree part */ - struct avl_node_t *parent; - struct avl_node_t *left; - struct avl_node_t *right; + struct avl_node_t *parent; + struct avl_node_t *left; + struct avl_node_t *right; #ifdef AVL_COUNT - unsigned int count; + unsigned int count; #endif #ifdef AVL_DEPTH - unsigned char depth; + unsigned char depth; #endif - /* Payload */ + /* Payload */ - void *data; + void *data; } avl_node_t; -typedef int (*avl_compare_t) (const void *, const void *); -typedef void (*avl_action_t) (const void *); -typedef void (*avl_action_node_t) (const avl_node_t *); +typedef int (*avl_compare_t)(const void *, const void *); +typedef void (*avl_action_t)(const void *); +typedef void (*avl_action_node_t)(const avl_node_t *); typedef struct avl_tree_t { - /* Linked list part */ + /* Linked list part */ - avl_node_t *head; - avl_node_t *tail; + avl_node_t *head; + avl_node_t *tail; - /* Tree part */ + /* Tree part */ - avl_node_t *root; + avl_node_t *root; - avl_compare_t compare; - avl_action_t delete; + avl_compare_t compare; + avl_action_t delete; } avl_tree_t; @@ -142,4 +142,4 @@ extern unsigned int avl_index(const avl_node_t *); extern unsigned int avl_depth(avl_tree_t *); #endif -#endif /* __AVL_TREE_H__ */ +#endif /* __AVL_TREE_H__ */