Lines Matching refs:dba
35 #define FLATFILE_DATA flatfile *dba = info->dbf
52 if (dba->nextkey.dptr) { in DBA_CLOSE_FUNC()
53 efree(dba->nextkey.dptr); in DBA_CLOSE_FUNC()
55 pefree(dba, info->flags&DBA_PERSISTENT); in DBA_CLOSE_FUNC()
66 gval = flatfile_fetch(dba, gkey); in DBA_FETCH_FUNC()
86 switch(flatfile_store(dba, gkey, gval, mode==1 ? FLATFILE_INSERT : FLATFILE_REPLACE)) { in DBA_UPDATE_FUNC()
106 gval = flatfile_fetch(dba, gkey); in DBA_EXISTS_FUNC()
118 return(flatfile_delete(dba, gkey) == -1 ? FAILURE : SUCCESS); in DBA_DELETE_FUNC()
125 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
126 efree(dba->nextkey.dptr); in DBA_FIRSTKEY_FUNC()
128 dba->nextkey = flatfile_firstkey(dba); in DBA_FIRSTKEY_FUNC()
129 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
131 *newlen = dba->nextkey.dsize; in DBA_FIRSTKEY_FUNC()
133 return estrndup(dba->nextkey.dptr, dba->nextkey.dsize); in DBA_FIRSTKEY_FUNC()
142 if (!dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
146 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
147 efree(dba->nextkey.dptr); in DBA_NEXTKEY_FUNC()
149 dba->nextkey = flatfile_nextkey(dba); in DBA_NEXTKEY_FUNC()
150 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
152 *newlen = dba->nextkey.dsize; in DBA_NEXTKEY_FUNC()
154 return estrndup(dba->nextkey.dptr, dba->nextkey.dsize); in DBA_NEXTKEY_FUNC()