add bulk memory operations and memtest
[tedtools.git] / tbtree.h
index 9e75231..083d34c 100644 (file)
--- a/tbtree.h
+++ b/tbtree.h
 #define offsetof(type, field)   ((int) &((type *)0)->field)
 #endif   /* offsetof */
 
-#define TYPEALIGN(ALIGNVAL,LEN)  \
-        (((long) (LEN) + (ALIGNVAL-1)) & ~((long) (ALIGNVAL-1)))
-
-#define PTRALIGN(LEN)     TYPEALIGN(sizeof(void*), (LEN))
-
-/*#define HASHSIZE(LEN)        ( TYPEALIGN(2, (int)((LEN)*2)) + 1 )*/
 #define HASHSIZE(LEN)  ( (LEN)<<1 )
 /* end utils */
 
@@ -157,6 +151,7 @@ typedef struct {
 } 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);