File: tree.h

package info (click to toggle)
squid 1.1.21-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,828 kB
  • ctags: 3,705
  • sloc: ansic: 34,400; sh: 1,975; perl: 899; makefile: 559
file content (29 lines) | stat: -rw-r--r-- 746 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* tree.h - declare structures used by tree library
 *
 * vix 22jan93 [revisited; uses RCS, ANSI, POSIX; has bug fixes]
 * vix 27jun86 [broken out of tree.c]
 *
 * $Id: tree.h,v 1.2.2.1 1997/11/03 19:27:04 wessels Exp $
 */


#ifndef	_TREE_H_INCLUDED
#define	_TREE_H_INCLUDED

typedef struct tree_s {
    void *data;
    struct tree_s *left, *right;
    int bal;
} tree;

typedef int BTREE_CMP (void *, void *);
typedef int BTREE_UAR (void *);

void tree_init (tree **);
void *tree_srch (tree **, BTREE_CMP *, void *);
void *tree_add (tree **, int (*)(), void *, BTREE_UAR *);
int tree_delete (tree **, BTREE_CMP *, void *, BTREE_UAR *);
int tree_trav (tree **, BTREE_UAR *);
void tree_mung (tree **, BTREE_UAR *);

#endif /* _TREE_H_INCLUDED */