Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include "sdb.h"
#include "cdb.h"
#include "cdb_make.h"
#include "sdb_private.h"
Go to the source code of this file.
Macros | |
#define | ALIGNMENT sizeof(void *) |
#define | R_ANEW(x) (x *)cdb_alloc(sizeof(x)) |
Functions | |
char * | cdb_alloc (ut32 n) |
void | cdb_alloc_free (void *x) |
int | cdb_make_start (struct cdb_make *c, int fd) |
static int | incpos (struct cdb_make *c, ut32 len) |
int | cdb_make_addend (struct cdb_make *c, ut32 keylen, ut32 datalen, ut32 h) |
static int | pack_kvlen (ut8 *buf, ut32 klen, ut32 vlen) |
int | cdb_make_addbegin (struct cdb_make *c, ut32 keylen, ut32 datalen) |
int | cdb_make_add (struct cdb_make *c, const char *key, ut32 keylen, const char *data, ut32 datalen) |
int | cdb_make_finish (struct cdb_make *c) |
#define ALIGNMENT sizeof(void *) |
Definition at line 16 of file cdb_make.c.
char* cdb_alloc | ( | ut32 | n | ) |
Definition at line 18 of file cdb_make.c.
References ALIGNMENT, malloc(), n, and NULL.
Referenced by cdb_make_finish().
void cdb_alloc_free | ( | void * | x | ) |
int cdb_make_add | ( | struct cdb_make * | c, |
const char * | key, | ||
ut32 | keylen, | ||
const char * | data, | ||
ut32 | datalen | ||
) |
Definition at line 108 of file cdb_make.c.
References buffer_putalign(), c, cdb_make_addbegin(), cdb_make_addend(), key, and sdb_hash().
Referenced by sdb_disk_insert().
Definition at line 100 of file cdb_make.c.
References buffer_putalign(), c, KVLSZ, and pack_kvlen().
Referenced by cdb_make_add().
Definition at line 63 of file cdb_make.c.
References c, CDB_HPLIST, h, test-lz4-versions::head, incpos(), KVLSZ, and R_ANEW.
Referenced by cdb_make_add().
Definition at line 124 of file cdb_make.c.
References buffer_flush(), buffer_putalign(), buffer_putflush(), c, cdb_alloc(), cdb_alloc_free(), count, cdb_hp::h, i, incpos(), len, n, seek_set(), UT32_MAX, ut32_pack(), and x.
Referenced by sdb_disk_finish().
Definition at line 37 of file cdb_make.c.
References buffer_init(), c, fd, i, seek_set(), and write.
Referenced by sdb_disk_create().
Definition at line 86 of file cdb_make.c.
References SDB_CDB_MAX_KEY, SDB_CDB_MAX_VALUE, and ut8.
Referenced by cdb_make_addbegin().