summaryrefslogtreecommitdiffabout
path: root/compat/dbmfetch.c
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:29:42 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:29:42 (GMT)
commit9839c83761c573414d77de1b957bae04547bc910 (patch) (side-by-side diff)
tree5698520af3c5170d3d6b971948c61899dab75d70 /compat/dbmfetch.c
parent39cc2512acbcf56ffbf87e3d26afc0450ca37de9 (diff)
downloadgdbm-9839c83761c573414d77de1b957bae04547bc910.tar.gz
gdbm-9839c83761c573414d77de1b957bae04547bc910.tar.bz2
Include nbdm.h.
Use the new DBM declaration.
Diffstat (limited to 'compat/dbmfetch.c') (more/less context) (ignore whitespace changes)
-rw-r--r--compat/dbmfetch.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/compat/dbmfetch.c b/compat/dbmfetch.c
index e779d1a..03a8065 100644
--- a/compat/dbmfetch.c
+++ b/compat/dbmfetch.c
@@ -19,25 +19,24 @@
/* Include system configuration before all else. */
#include "autoconf.h"
-
+#include "ndbm.h"
#include "gdbmdefs.h"
-#include "extern.h"
-
/* NDBM Look up a given KEY and return the information associated with that
KEY. The pointer in the structure that is returned is a pointer to
dynamically allocated memory block. */
datum
-dbm_fetch (GDBM_FILE dbf, datum key)
+dbm_fetch (DBM *dbm, datum key)
{
datum ret_val; /* The return value. */
/* Free previous dynamic memory, do actual call, and save pointer to new
memory. */
- ret_val = gdbm_fetch (dbf, key);
- if (_gdbm_fetch_val != NULL) free (_gdbm_fetch_val);
- _gdbm_fetch_val = ret_val.dptr;
+ ret_val = gdbm_fetch (dbm->file, key);
+ if (dbm->_dbm_fetch_val != NULL)
+ free (dbm->_dbm_fetch_val);
+ dbm->_dbm_fetch_val = ret_val.dptr;
/* Return the new value. */
return ret_val;

Return to:

Send suggestions and report system problems to the System administrator.