Rizin
unix-like reverse engineering framework and cli tools
cdb_make.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: D. J. Bernstein <djb@cr.yp.to>
2 // SPDX-License-Identifier: CC-PDDC
3 
4 #ifndef CDB_MAKE_H
5 #define CDB_MAKE_H
6 
7 #include "buffer.h"
8 #include <rz_types.h>
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #define CDB_HPLIST 1000
15 
16 struct cdb_hp {
19 };
20 
21 struct cdb_hplist {
22  struct cdb_hp hp[CDB_HPLIST];
23  struct cdb_hplist *next;
24  int num;
25 };
26 
27 struct cdb_make {
28  char bspace[8192];
29  char final[1024];
30  ut32 count[256];
31  ut32 start[256];
32  struct cdb_hplist *head;
33  struct cdb_hp *split; /* includes space for hash */
34  struct cdb_hp *hash;
39  int fd;
40 };
41 
42 extern int cdb_make_start(struct cdb_make *, int);
43 extern int cdb_make_addbegin(struct cdb_make *, unsigned int, unsigned int);
44 extern int cdb_make_addend(struct cdb_make *, unsigned int, unsigned int, ut32);
45 extern int cdb_make_add(struct cdb_make *, const char *, unsigned int, const char *, unsigned int);
46 extern int cdb_make_finish(struct cdb_make *);
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif
int cdb_make_finish(struct cdb_make *)
Definition: cdb_make.c:124
int cdb_make_start(struct cdb_make *, int)
Definition: cdb_make.c:37
#define CDB_HPLIST
Definition: cdb_make.h:14
int cdb_make_add(struct cdb_make *, const char *, unsigned int, const char *, unsigned int)
Definition: cdb_make.c:108
int cdb_make_addbegin(struct cdb_make *, unsigned int, unsigned int)
Definition: cdb_make.c:100
int cdb_make_addend(struct cdb_make *, unsigned int, unsigned int, ut32)
Definition: cdb_make.c:63
uint32_t ut32
Definition: buffer.h:15
ut32 h
Definition: cdb_make.h:17
ut32 p
Definition: cdb_make.h:18
int num
Definition: cdb_make.h:24
struct cdb_hplist * next
Definition: cdb_make.h:23
struct cdb_hp hp[CDB_HPLIST]
Definition: cdb_make.h:22
char bspace[8192]
Definition: cdb_make.h:28
ut32 count[256]
Definition: cdb_make.h:30
ut32 memsize
Definition: cdb_make.h:36
ut32 numentries
Definition: cdb_make.h:35
struct cdb_hp * split
Definition: cdb_make.h:33
struct cdb_hp * hash
Definition: cdb_make.h:34
ut32 pos
Definition: cdb_make.h:38
int fd
Definition: cdb_make.h:39
ut32 start[256]
Definition: cdb_make.h:31
buffer b
Definition: cdb_make.h:37
struct cdb_hplist * head
Definition: cdb_make.h:32