#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 */
} 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);