aboutsummaryrefslogtreecommitdiff
path: root/compat/dbmfetch.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:29:42 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:29:42 +0000
commit9839c83761c573414d77de1b957bae04547bc910 (patch)
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')
-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.