diff options
Diffstat (limited to 'src/gdbm.c')
-rw-r--r-- | src/gdbm.c | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -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 | ||
35 | static int | 35 | static int |
36 | gdbm_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode, | 36 | db_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 | ||
69 | static int | 69 | static int |
70 | gdbm_db_close (void *d) | 70 | db_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 | ||
103 | static int | 103 | static int |
104 | gdbm_db_get (void *d, const char *keystr, ANUBIS_USER * rec, int *errp) | 104 | db_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 | ||
120 | static int | 120 | static int |
121 | gdbm_db_list (void *d, ANUBIS_LIST list, int *ecode) | 121 | db_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 | ||
149 | static int | 149 | static int |
150 | gdbm_db_put (void *d, const char *keystr, ANUBIS_USER * rec, int *errp) | 150 | db_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 | ||
193 | static int | 193 | static int |
194 | gdbm_db_delete (void *d, const char *keystr, int *ecode) | 194 | db_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 | ||
211 | const char * | 211 | static const char * |
212 | gdbm_db_strerror (void *d, int rc) | 212 | db_gdbm_strerror (void *d, int rc) |
213 | { | 213 | { |
214 | return gdbm_strerror (rc); | 214 | return gdbm_strerror (rc); |
215 | } | 215 | } |
216 | 216 | ||
217 | void | 217 | void |
218 | gdbm_db_init (void) | 218 | db_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 */ |