Lines Matching refs:gkey
33 #define GDBM_GKEY datum gkey; gkey.dptr = (char *) key; gkey.dsize = keylen
86 gval = gdbm_fetch(dba->dbf, gkey); in DBA_FETCH_FUNC()
104 switch (gdbm_store(dba->dbf, gkey, gval, mode == 1 ? GDBM_INSERT : GDBM_REPLACE)) { in DBA_UPDATE_FUNC()
123 return gdbm_exists(dba->dbf, gkey) ? SUCCESS : FAILURE; in DBA_EXISTS_FUNC()
131 return gdbm_delete(dba->dbf, gkey) == -1 ? FAILURE : SUCCESS; in DBA_DELETE_FUNC()
137 datum gkey; in DBA_FIRSTKEY_FUNC() local
144 gkey = gdbm_firstkey(dba->dbf); in DBA_FIRSTKEY_FUNC()
145 if(gkey.dptr) { in DBA_FIRSTKEY_FUNC()
146 key = estrndup(gkey.dptr, gkey.dsize); in DBA_FIRSTKEY_FUNC()
147 if(newlen) *newlen = gkey.dsize; in DBA_FIRSTKEY_FUNC()
148 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
159 datum gkey; in DBA_NEXTKEY_FUNC() local
163 gkey = gdbm_nextkey(dba->dbf, dba->nextkey); in DBA_NEXTKEY_FUNC()
165 if(gkey.dptr) { in DBA_NEXTKEY_FUNC()
166 nkey = estrndup(gkey.dptr, gkey.dsize); in DBA_NEXTKEY_FUNC()
167 if(newlen) *newlen = gkey.dsize; in DBA_NEXTKEY_FUNC()
168 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()