projects
/
tedtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
062d3b0
)
Code clean up
author
teodor
<teodor>
Thu, 26 May 2005 13:21:24 +0000
(13:21 +0000)
committer
teodor
<teodor>
Thu, 26 May 2005 13:21:24 +0000
(13:21 +0000)
tbtree.h
patch
|
blob
|
history
diff --git
a/tbtree.h
b/tbtree.h
index
0df6381
..
3971fda
100644
(file)
--- a/
tbtree.h
+++ b/
tbtree.h
@@
-67,16
+67,16
@@
typedef struct {
#define TBTPOINTERSIZE(db) PTRALIGN( (db->keylen) ? TBTPOINTERHRDSZ + db->keylen : sizeof(TBTPointer) )
#define ISINFPOINTER(db, page, ptr) ( (page)->isleaf==0 && (page)->rightlink == 0 && (char*)(ptr) == (page)->data + ((page)->npointer-1) * TBTPOINTERSIZE(db) )
#define TBTPOINTERSIZE(db) PTRALIGN( (db->keylen) ? TBTPOINTERHRDSZ + db->keylen : sizeof(TBTPointer) )
#define ISINFPOINTER(db, page, ptr) ( (page)->isleaf==0 && (page)->rightlink == 0 && (char*)(ptr) == (page)->data + ((page)->npointer-1) * TBTPOINTERSIZE(db) )
+/* can changed up to 65536 */
#define TBTREEPAGESIZE 8192
#define TBTPAGEHDRSZ (2*sizeof(u_int32_t))
typedef struct {
u_int32_t rightlink;
u_int32_t
#define TBTREEPAGESIZE 8192
#define TBTPAGEHDRSZ (2*sizeof(u_int32_t))
typedef struct {
u_int32_t rightlink;
u_int32_t
- freespace:13, /* correlate to BTREEPAGESIZE */
- npointer:10,
- isleaf:1,
- unused: 8;
+ freespace:16, /* correlate to TBTREEPAGESIZE */
+ npointer:15,
+ isleaf:1;
char data[TBTREEPAGESIZE-TBTPAGEHDRSZ];
} TBTPage;
char data[TBTREEPAGESIZE-TBTPAGEHDRSZ];
} TBTPage;
@@
-151,7
+151,6
@@
typedef struct {
} TBTIterator;
int TBTInitIterator(TBTree *db, TBTIterator *iterator );
} TBTIterator;
int TBTInitIterator(TBTree *db, TBTIterator *iterator );
-int TBTInitPrefixIterator(TBTree *db, TBTIterator *iterator, TBTValue *key );
int TBTIterate(TBTree *db, TBTIterator *iterator, TBTValue *key, TBTValue *value );
void TBTFreeIterator(TBTree *db, TBTIterator *iterator);
int TBTIterate(TBTree *db, TBTIterator *iterator, TBTValue *key, TBTValue *value );
void TBTFreeIterator(TBTree *db, TBTIterator *iterator);