8 #define CDB_HASHSTART 5381
9 extern uint32
cdb_hashadd(uint32
,unsigned char);
10 extern uint32
cdb_hash(const char *,unsigned int);
13 char *map
; /* 0 if no map is available */
15 uint32 size
; /* initialized if map is nonzero */
16 uint32 loop
; /* number of hash slots searched under this key */
17 uint32 khash
; /* initialized if loop is nonzero */
18 uint32 kpos
; /* initialized if loop is nonzero */
19 uint32 hpos
; /* initialized if loop is nonzero */
20 uint32 hslots
; /* initialized if loop is nonzero */
21 uint32 dpos
; /* initialized if cdb_findnext() returns 1 */
22 uint32 dlen
; /* initialized if cdb_findnext() returns 1 */
25 extern void cdb_free(struct cdb
*);
26 extern void cdb_init(struct cdb
*,int fd
);
28 extern int cdb_read(struct cdb
*,char *,unsigned int,uint32
);
30 extern void cdb_findstart(struct cdb
*);
31 extern int cdb_findnext(struct cdb
*,const char *,unsigned int);
32 extern int cdb_find(struct cdb
*,const char *,unsigned int);
34 #define cdb_datapos(c) ((c)->dpos)
35 #define cdb_datalen(c) ((c)->dlen)