Lines Matching refs:gkey
31 #define GDBM_GKEY datum gkey; gkey.dptr = (char *) key; gkey.dsize = keylen
84 gval = gdbm_fetch(dba->dbf, gkey); in DBA_FETCH_FUNC()
102 switch (gdbm_store(dba->dbf, gkey, gval, mode == 1 ? GDBM_INSERT : GDBM_REPLACE)) { in DBA_UPDATE_FUNC()
121 return gdbm_exists(dba->dbf, gkey) ? SUCCESS : FAILURE; in DBA_EXISTS_FUNC()
129 return gdbm_delete(dba->dbf, gkey) == -1 ? FAILURE : SUCCESS; in DBA_DELETE_FUNC()
135 datum gkey; in DBA_FIRSTKEY_FUNC() local
142 gkey = gdbm_firstkey(dba->dbf); in DBA_FIRSTKEY_FUNC()
143 if(gkey.dptr) { in DBA_FIRSTKEY_FUNC()
144 key = estrndup(gkey.dptr, gkey.dsize); in DBA_FIRSTKEY_FUNC()
145 if(newlen) *newlen = gkey.dsize; in DBA_FIRSTKEY_FUNC()
146 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
157 datum gkey; in DBA_NEXTKEY_FUNC() local
161 gkey = gdbm_nextkey(dba->dbf, dba->nextkey); in DBA_NEXTKEY_FUNC()
163 if(gkey.dptr) { in DBA_NEXTKEY_FUNC()
164 nkey = estrndup(gkey.dptr, gkey.dsize); in DBA_NEXTKEY_FUNC()
165 if(newlen) *newlen = gkey.dsize; in DBA_NEXTKEY_FUNC()
166 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()