aboutsummaryrefslogtreecommitdiff
path: root/src/gdbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdbm.c')
-rw-r--r--src/gdbm.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gdbm.c b/src/gdbm.c
index 58153f8..7e9d3e5 100644
--- a/src/gdbm.c
+++ b/src/gdbm.c
@@ -2,7 +2,7 @@
2 gdbm.c 2 gdbm.c
3 3
4 This file is part of GNU Anubis. 4 This file is part of GNU Anubis.
5 Copyright (C) 2003-2014 The Anubis Team. 5 Copyright (C) 2003-2024 The Anubis Team.
6 6
7 GNU Anubis is free software; you can redistribute it and/or modify it 7 GNU Anubis is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
@@ -33,7 +33,7 @@
33 The last two items are optional */ 33 The last two items are optional */
34 34
35static int 35static int
36gdbm_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode, 36db_gdbm_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode,
37 char const **errp) 37 char const **errp)
38{ 38{
39 GDBM_FILE dbf; 39 GDBM_FILE dbf;
@@ -67,7 +67,7 @@ gdbm_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode,
67} 67}
68 68
69static int 69static int
70gdbm_db_close (void *d) 70db_gdbm_close (void *d)
71{ 71{
72 gdbm_close (d); 72 gdbm_close (d);
73 return ANUBIS_DB_SUCCESS; 73 return ANUBIS_DB_SUCCESS;
@@ -101,7 +101,7 @@ gdbm_content_to_record (char *keystr, datum content, ANUBIS_USER * rec)
101} 101}
102 102
103static int 103static int
104gdbm_db_get (void *d, const char *keystr, ANUBIS_USER * rec, int *errp) 104db_gdbm_get (void *d, const char *keystr, ANUBIS_USER * rec, int *errp)
105{ 105{
106 datum key, content; 106 datum key, content;
107 107
@@ -118,7 +118,7 @@ gdbm_db_get (void *d, const char *keystr, ANUBIS_USER * rec, int *errp)
118} 118}
119 119
120static int 120static int
121gdbm_db_list (void *d, ANUBIS_LIST list, int *ecode) 121db_gdbm_list (void *d, ANUBIS_LIST list, int *ecode)
122{ 122{
123 datum key, content; 123 datum key, content;
124 124
@@ -147,7 +147,7 @@ gdbm_db_list (void *d, ANUBIS_LIST list, int *ecode)
147} 147}
148 148
149static int 149static int
150gdbm_db_put (void *d, const char *keystr, ANUBIS_USER * rec, int *errp) 150db_gdbm_put (void *d, const char *keystr, ANUBIS_USER * rec, int *errp)
151{ 151{
152 size_t size, n; 152 size_t size, n;
153 char *text; 153 char *text;
@@ -191,7 +191,7 @@ gdbm_db_put (void *d, const char *keystr, ANUBIS_USER * rec, int *errp)
191} 191}
192 192
193static int 193static int
194gdbm_db_delete (void *d, const char *keystr, int *ecode) 194db_gdbm_delete (void *d, const char *keystr, int *ecode)
195{ 195{
196 int rc; 196 int rc;
197 datum key; 197 datum key;
@@ -208,21 +208,21 @@ gdbm_db_delete (void *d, const char *keystr, int *ecode)
208 return rc; 208 return rc;
209} 209}
210 210
211const char * 211static const char *
212gdbm_db_strerror (void *d, int rc) 212db_gdbm_strerror (void *d, int rc)
213{ 213{
214 return gdbm_strerror (rc); 214 return gdbm_strerror (rc);
215} 215}
216 216
217void 217void
218gdbm_db_init (void) 218db_gdbm_init (void)
219{ 219{
220 anubis_db_register ("gdbm", 220 anubis_db_register ("gdbm",
221 gdbm_db_open, 221 db_gdbm_open,
222 gdbm_db_close, 222 db_gdbm_close,
223 gdbm_db_get, 223 db_gdbm_get,
224 gdbm_db_put, 224 db_gdbm_put,
225 gdbm_db_delete, gdbm_db_list, gdbm_db_strerror); 225 db_gdbm_delete, db_gdbm_list, db_gdbm_strerror);
226} 226}
227 227
228#endif /* HAVE_LIBGDBM */ 228#endif /* HAVE_LIBGDBM */

Return to:

Send suggestions and report system problems to the System administrator.