Query: cdbw_put_key
OS: netbsd
Section: 3
Links: netbsd man pages all man pages
Forums: unix linux community forum categories
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
CDBW(3) BSD Library Functions Manual CDBW(3)NAMEcdbw_open, cdbw_put, cdbw_put_data, cdbw_put_key, cdbw_stable_seeder, cdbw_output, cdbw_close -- create constant databasesSYNOPSIS#include <archive_entry.h> struct cdbw * cdbw_open(void); int cdbw_put(struct cdbw *cdbw, const void *key, size_t keylen, const void *data, size_t datalen); int cdbw_put_data(struct cdbw *cdbw, const void *data, size_t datalen, uint32_t *index); int cdbw_put_key(struct cdbw *cdbw, const void *key, size_t keylen, uint32_t index); uint32_t cdbw_stable_seeder(void); int cdbw_output(struct cdbw *cdbw, int output, const char descr[16], uint32_t (*seedgen)(void)); void cdbw_close(struct cdbw *cdbw);DESCRIPTIONThe cdbw functions are used to create a constant databases for use with cdbr(3). Details about the file format, including overhead and limi- tations, can be found in cdb(5). cdbw_open() prepares a new cdb writer. The function returns a handle to pass to the other functions. cdbw_close() frees all resources associated with the handle. cdbw_put() adds the given (key,value) pair after checking for a duplicate key. cdbw_put_data() adds the given value to the writer without adding a key reference. The returned index can be used in subsequent calls to cdbw_put_key() to add one or more keys pointing to this value. cdbw_put_key() checks for duplicate keys and valid index arguments. On success it adds the given key. cdbw_output() computes the database file and writes it to the given descriptor. The function returns an error if the file cannot be written correctly. The descr() parameter provides a human readable description of the database content. The seedgen() parameter can be used to override the default PRNG. The bitwise layout of the output depends on the chosen seed. The function should return a different value for each invocation. The cdbw_stable_seeder() can be used to create reproducible output. It may be slower than the default.SEE ALSOcdbr(3), cdb(5)HISTORYSupport for the cdb format first appeared in NetBSD 6.0.AUTHORSThe cdbr and cdbw functions have been written by Joerg Sonnenberger <joerg@NetBSD.org>.BSDJune 3, 2012 BSD
Related Man Pages |
---|
jenkins_hash(9) - freebsd |
cdb(1) - debian |
cdbw(3) - netbsd |
cdbw_close(3) - netbsd |
hash32_stre(9) - freebsd |
Similar Topics in the Unix Linux Community |
---|
Memory Leaks |
How to install PGX32 on Sparc 10 Ultra? |
Vm versus physical linux server |
Make bold chars in UNIX |