aboutsummaryrefslogtreecommitdiff
path: root/compat/dbmseq.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/dbmseq.c
parent39cc2512acbcf56ffbf87e3d26afc0450ca37de9 (diff)
downloadgdbm-9839c83761c573414d77de1b957bae04547bc910.tar.gz
gdbm-9839c83761c573414d77de1b957bae04547bc910.tar.bz2
Include nbdm.h.
Use the new DBM declaration.
Diffstat (limited to 'compat/dbmseq.c')
-rw-r--r--compat/dbmseq.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/compat/dbmseq.c b/compat/dbmseq.c
index afbb980..f98482b 100644
--- a/compat/dbmseq.c
+++ b/compat/dbmseq.c
@@ -20,25 +20,24 @@
/* Include system configuration before all else. */
#include "autoconf.h"
-
+#include "ndbm.h"
#include "gdbmdefs.h"
-#include "extern.h"
-
/* NDBM Start the visit of all keys in the database. This produces
something in hash order, not in any sorted order. DBF is the dbm file
information pointer. */
datum
-dbm_firstkey (GDBM_FILE dbf)
+dbm_firstkey (DBM *dbm)
{
datum ret_val;
/* Free previous dynamic memory, do actual call, and save pointer to new
memory. */
- ret_val = gdbm_firstkey (dbf);
- if (_gdbm_memory.dptr != NULL) free (_gdbm_memory.dptr);
- _gdbm_memory = ret_val;
+ ret_val = gdbm_firstkey (dbm->file);
+ if (dbm->_dbm_memory.dptr != NULL)
+ free (dbm->_dbm_memory.dptr);
+ dbm->_dbm_memory = ret_val;
/* Return the new value. */
return ret_val;
@@ -49,18 +48,19 @@ dbm_firstkey (GDBM_FILE dbf)
DBF is the file information pointer. */
datum
-dbm_nextkey (GDBM_FILE dbf)
+dbm_nextkey (DBM *dbm)
{
datum ret_val;
/* Make sure we have a valid key. */
- if (_gdbm_memory.dptr == NULL)
- return _gdbm_memory;
+ if (dbm->_dbm_memory.dptr == NULL)
+ return dbm->_dbm_memory;
/* Call gdbm nextkey with the old value. After that, free the old value. */
- ret_val = gdbm_nextkey (dbf,_gdbm_memory);
- if (_gdbm_memory.dptr != NULL) free (_gdbm_memory.dptr);
- _gdbm_memory = ret_val;
+ ret_val = gdbm_nextkey (dbm->file, dbm->_dbm_memory);
+ if (dbm->_dbm_memory.dptr != NULL)
+ free (dbm->_dbm_memory.dptr);
+ dbm->_dbm_memory = ret_val;
/* Return the new value. */
return ret_val;

Return to:

Send suggestions and report system problems to the System administrator.