s/qmail  3.3.23
Next generation secure email transport
cdb_make.h
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #ifndef CDB_MAKE_H
4 #define CDB_MAKE_H
5 
6 #include "buffer.h"
7 #include "uint32.h"
8 
9 #define CDB_HPLIST 1000
10 
11 struct cdb_hp { uint32 h; uint32 p; } ;
12 
13 struct cdb_hplist {
14  struct cdb_hp hp[CDB_HPLIST];
15  struct cdb_hplist *next;
16  int num;
17 } ;
18 
19 struct cdb_make {
20  char bspace[8192];
21  char final[2048];
22  uint32 count[256];
23  uint32 start[256];
24  struct cdb_hplist *head;
25  struct cdb_hp *split; /* includes space for hash */
26  struct cdb_hp *hash;
27  uint32 numentries;
29  uint32 pos;
30  int fd;
31 } ;
32 
33 extern int cdb_make_start(struct cdb_make *,int);
34 extern int cdb_make_addbegin(struct cdb_make *,unsigned int,unsigned int);
35 extern int cdb_make_addend(struct cdb_make *,unsigned int,unsigned int,uint32);
36 extern int cdb_make_add(struct cdb_make *,char *,unsigned int,char *,unsigned int);
37 extern int cdb_make_finish(struct cdb_make *);
38 
39 #endif
struct cdb_hp * split
Definition: cdb_make.h:25
int cdb_make_add(struct cdb_make *, char *, unsigned int, char *, unsigned int)
Definition: cdb_make.c:65
struct cdb_hplist * next
Definition: cdb_make.h:15
struct cdb_hplist * head
Definition: cdb_make.h:24
int fd
Definition: cdb_make.h:30
int cdb_make_finish(struct cdb_make *)
Definition: cdb_make.c:73
int cdb_make_start(struct cdb_make *, int)
Definition: cdb_make.c:10
struct cdb_hp * hash
Definition: cdb_make.h:26
buffer b
Definition: cdb_make.h:28
#define CDB_HPLIST
Definition: cdb_make.h:9
uint32 numentries
Definition: cdb_make.h:27
uint32 p
Definition: cdb_make.h:11
int num
Definition: cdb_make.h:16
Definition: buffer.h:4
int cdb_make_addend(struct cdb_make *, unsigned int, unsigned int, uint32)
Definition: cdb_make.c:30
uint32 h
Definition: cdb_make.h:11
uint32 pos
Definition: cdb_make.h:29
int cdb_make_addbegin(struct cdb_make *, unsigned int, unsigned int)
Definition: cdb_make.c:52