#include "citadel.h"
#include "server.h"
#include "proto.h"
+#include "database.h"
/*
* Reclaim unused space in the databases. We need to do each one of
* these discretely, rather than in a loop.
*/
-void defrag_databases() {
+void defrag_databases(void) {
/* defrag the message base */
begin_critical_section(S_MSGMAIN);
* Open the various gdbm databases we'll be using. Any database which
* does not exist should be created.
*/
-void open_databases() {
+void open_databases(void) {
int a;
gdbms[CDB_MSGMAIN] = gdbm_open("msgmain.gdbm", 8192,
* Close all of the gdbm database files we've opened. This can be done
* in a loop, since it's just a bunch of closes.
*/
-void close_databases() {
+void close_databases(void) {
int a;
defrag_databases();
* datum already exists it should be overwritten.
*/
int cdb_store(int cdb,
- char *key, int keylen,
- char *data, int datalen) {
+ void *key, int keylen,
+ void *data, int datalen) {
datum dkey, ddata;
/*
* Delete a piece of data. Returns 0 if the operation was successful.
*/
-int cdb_delete(int cdb, char *key, int keylen) {
+int cdb_delete(int cdb, void *key, int keylen) {
datum dkey;
* a struct cdbdata which it is the caller's responsibility to free later on
* using the cdb_free() routine.
*/
-struct cdbdata *cdb_fetch(int cdb, char *key, int keylen) {
+struct cdbdata *cdb_fetch(int cdb, void *key, int keylen) {
struct cdbdata *tempcdb;
datum dkey, dret;