diff options
author | spew <devnull@localhost> | 2017-04-22 14:28:02 -0500 |
---|---|---|
committer | spew <devnull@localhost> | 2017-04-22 14:28:02 -0500 |
commit | 6261dcb06b11c2db815b2e259b25b18a9673d900 (patch) | |
tree | 3ec7f3b8808a9499c7b87a2923f2ac09845af6d6 /sys/src/cmd/replica/all.h | |
parent | 9cf519814591413493be10cfaa00853cb15e7a0b (diff) |
replica: use libavl for avl tree implementation
Diffstat (limited to 'sys/src/cmd/replica/all.h')
-rw-r--r-- | sys/src/cmd/replica/all.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/sys/src/cmd/replica/all.h b/sys/src/cmd/replica/all.h index 96d8e1f54..5e8148de4 100644 --- a/sys/src/cmd/replica/all.h +++ b/sys/src/cmd/replica/all.h @@ -2,37 +2,14 @@ #include <libc.h> #include <bio.h> #include <disk.h> - -/* avl.c */ -typedef struct Avl Avl; -typedef struct Avltree Avltree; -typedef struct Avlwalk Avlwalk; - -#pragma incomplete Avltree -#pragma incomplete Avlwalk - -struct Avl -{ - Avl *p; /* parent */ - Avl *n[2]; /* children */ - int bal; /* balance bits */ -}; - -Avltree *mkavltree(int(*cmp)(Avl*, Avl*)); -void insertavl(Avltree *tree, Avl *new, Avl **oldp); -Avl *lookupavl(Avltree *tree, Avl *key); -void deleteavl(Avltree *tree, Avl *key, Avl **oldp); -Avlwalk *avlwalk(Avltree *tree); -Avl *avlnext(Avlwalk *walk); -Avl *avlprev(Avlwalk *walk); -void endwalk(Avlwalk *walk); +#include <avl.h> /* db.c */ typedef struct Db Db; typedef struct Entry Entry; struct Entry { - Avl a; + Avl; char *name; struct { char *name; |