Changeset View
Changeset View
Standalone View
Standalone View
dirmngr/cdb.h
Show All 14 Lines | |||||
/* common routines */ | /* common routines */ | ||||
cdbi_t cdb_hash(const void *buf, cdbi_t len); | cdbi_t cdb_hash(const void *buf, cdbi_t len); | ||||
cdbi_t cdb_unpack(const unsigned char buf[4]); | cdbi_t cdb_unpack(const unsigned char buf[4]); | ||||
void cdb_pack(cdbi_t num, unsigned char buf[4]); | void cdb_pack(cdbi_t num, unsigned char buf[4]); | ||||
struct cdb { | struct cdb { | ||||
int cdb_fd; /* file descriptor */ | int cdb_fd; /* file descriptor */ | ||||
/* private members */ | /* private members */ | ||||
#ifdef HAVE_W32_SYSTEM | |||||
void *cdb_mapping; /* Mapping handle. */ | |||||
#endif | |||||
cdbi_t cdb_fsize; /* datafile size */ | cdbi_t cdb_fsize; /* datafile size */ | ||||
const unsigned char *cdb_mem; /* mmap'ed file memory */ | const unsigned char *cdb_mem; /* mmap'ed file memory */ | ||||
cdbi_t cdb_vpos, cdb_vlen; /* found data */ | cdbi_t cdb_vpos, cdb_vlen; /* found data */ | ||||
cdbi_t cdb_kpos, cdb_klen; /* found key (only set if cdb_findinit | cdbi_t cdb_kpos, cdb_klen; /* found key (only set if cdb_findinit | ||||
was called with KEY set to NULL). */ | was called with KEY set to NULL). */ | ||||
}; | }; | ||||
#define cdb_datapos(c) ((c)->cdb_vpos) | #define cdb_datapos(c) ((c)->cdb_vpos) | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |