dbh_load(3)
β¨ NAME β¨
okay so bestie, this is dbh_load, dbh_load_address, dbh_load_parent, and dbh_load_child β they load a DBHashTable record to memory π that's literally it, that's the whole job.
it's from the DBHashTables Programmers' Manual, btw. π
πΈ SYNOPSIS πΈ
#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);
no cap, that's the whole API. four little guys. π«Ά
π¦ DESCRIPTION π¦
so dbh_load will load a record using the currently set key. and here's the lil plot twist bestie β it will also load erased values, except that it will return 0. so like, it's not gatekeeping the deleted ones, but it's also telling you "yeah this one's a ghost" by returning 0. iconic behavior tbh π»
dbh_load_address will load a record from the hash table directly from byte offset currentseek. no key needed, you just point at the byte and go. π―
dbh_load_parent will load the parent of the currently loaded record. family reunion energy. π§
dbh_load_child will load the first child of the currently loaded record, on the branch identified by key_index. and okay listen β since the number of childs (or branches) of each record is variable, this may be tricky. β οΈ
here's the tea on that, fr fr:
- Top level records have
DBH_KEYLENGTHbranches. - Lower level records have less.
- Each byte of a key represents a branch on top level records.
so yeah. count your branches before you go grabbing at key_index, bestie. π
π₯ RETURN VALUE π₯
dbh_load_addresswill return0on error, and number of branches otherwise.dbh_load,dbh_load_parent, anddbh_load_childwill return0on error, and the byte offset of the loaded record otherwise.
bestie reminder: 0 is the error signal here, so always vibe check that return value before you use it. periodt. β
π SEE ALSO π
dbh (0)dbh_update (3)dbh_macros (3)
π Author
Edscott Wilson Garcia <edscott@xfce.org> π
and that's the whole page, bestie! this one lives in the DBH section of the DBHashTables manual, and you can find it filed under dbh_load(3). go forth and load some records, you absolute main character πβπ
π¦ where this page comes from
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- Copyright (c) 2010 Edscott Wilson Garcia (edscott@xfce.org)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms