1 /* GNU DBM - DataBase Manager include file
2 Copyright 1989, 1991 Free Software Foundation, Inc.
3 Written by Philip A. Nelson.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
19 /* You may contact the author by:
21 us-mail: Philip A. Nelson
22 Computer Science Department
23 Western Washington University
27 *************************************************************************/
29 /* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
30 can create the database. */
33 #define GDBM_WRCREAT 2
36 /* Parameters to gdbm_store for simple insertion or replacement. */
38 #define GDBM_REPLACE 1
41 /* The data and key structure. This structure is defined for compatibility. */
48 /* The file information header. This is good enough for most applications. */
49 typedef struct {int dummy
[10];} *GDBM_FILE
;
52 /* These are the routines! */
54 extern GDBM_FILE
gdbm_open ();
56 extern void gdbm_close ();
58 extern datum
gdbm_fetch ();
60 extern int gdbm_store ();
62 extern int gdbm_delete ();
64 extern datum
gdbm_firstkey ();
66 extern datum
gdbm_nextkey ();
68 extern int gdbm_reorganize ();
71 /* gdbm sends back the following error codes in the variable gdbm_errno. */
72 typedef enum { NO_ERROR
,
86 READER_CANT_REORGANIZE
,