334 int tabPack(
const char *fname);
433 int (*cmpFn)(
const void *recp,
const void *keyp));
459 int (*cmpFn)(
const void *recp,
const void *keyp));
Signal that the target entry is marked as deleted.
Definition: tab.h:80
int tabGoFirst(table_t *t)
Move the current entry marker to the first (zero'th) element on the table.
struct table_t table_t
Opaque type of a table instance.
Definition: tab.h:74
int tabCount(table_t *t)
Return the number of non-deleted entries on the table.
int tabGetNext(table_t *t, void *recp)
Read the current entry and move to the next.
int tabSize(table_t *t)
Return the total number of entries on the table.
int tabFind(table_t *t, void *recp, const void *keyp, int(*cmpFn)(const void *recp, const void *keyp))
Search the table for an element.
int tabGetStamp(table_t *t, uint32_t *stamp)
Return the stamp value of the table.
int tabAppend(table_t *t, const void *recp)
Append an entry to the table.
int tabFlush(table_t *t)
Force an update of the table file.
int tabFindNext(table_t *t, void *recp, const void *keyp, int(*cmpFn)(const void *recp, const void *keyp))
Search incrementally the table for an entry.
int tabUnDelete(table_t *t, int recn)
Remove the deleted mark of an entry.
int tabCreate(const char *fname, int recSize, table_t **t)
Create a new table or reset an existing one.
int tabDelete(table_t *t, int recn)
Mark an entry as deleted.
tabErrors_t
Return codes specific to this module.
Definition: tab.h:79
unsigned int uint32_t
Unsigned 32-bit integer.
Definition: base.h:168
int tabPack(const char *fname)
Permanently remove from the table all entries marked as deleted.
Larlib basic definitions.
int tabSetStamp(table_t *t, uint32_t stamp)
Modify the stamp value of the table.
int tabGetPrev(table_t *t, void *recp)
Read the previous element.
int tabGet(table_t *t, int recn, void *recp)
Read an entry from the table.
int tabPut(table_t *t, int recn, const void *recp)
Write or update an entry on the table.
int tabGoLast(table_t *t)
Move to the last element on the table.
int tabRecSize(table_t *t)
Return the record size for a table.
int tabOpen(const char *fname, table_t **t)
Open an existing table.
void tabClose(table_t *t)
Close a table_t instance.