dbh_load man page


dbh_load, dbh_load_address, dbh_load_parent, dbh_load_child — load a DBHashTable record to memory


#include <dbh.h>

FILE_POINTER dbh_load (DBHashTable *dbh);
unsigned char dbh_load_address (DBHashTable *dbh, FILE_POINTERcurrentseek);
FILE_POINTER dbh_load_parent (DBHashTable *dbh);
FILE_POINTER dbh_load_child (DBHashTable *dbh, unsigned char key_index);


dbh_load will load a record using the currently set key.  This function will also load erased values, except that it will return 0.
dbh_load_address will load a record from hash table directly from byte offset currentseek.
dbh_load_parent will load the parent of the currently loaded record.
dbh_load_child will load the first child of the currently loaded record, on branch  identified by key_index. Since the number of childs (or branches) of each record is variable, this may be tricky. Top level records have DBH_KEYLENGTH branches. Lower level records have less. Each byte of a key represents a branch  on top level records.

Return Value

dbh_load_address will return 0 on error, number of branches otherwise.
dbh_load, dbh_load_parent, dbh_load_child will return 0 on error, byte offset of loaded record otherwise.

See Also

dbh (0), dbh_update (3), dbh_macros (3),


Edscott Wilson Garcia <edscott@xfce.org>

Referenced By

dbh(3), dbh_erase(3), dbh_find(3), dbh_genkey(3), dbh_set_data(3), dbh_update(3).

The man pages dbh_load_address(3), dbh_load_child(3) and dbh_load_parent(3) are aliases of dbh_load(3).

DBHashTables Programmers' Manual