missing files

This commit is contained in:
Enno Rehling 2018-10-24 07:00:26 +02:00
parent b8ee5b3c76
commit 6738962d73
2 changed files with 39 additions and 0 deletions

28
src/kernel/database.c Normal file
View File

@ -0,0 +1,28 @@
#include "config.h"
#include "database.h"
#include "db/driver.h"
void swapdb_open(void)
{
const char *dbname;
dbname = config_get("game.dbswap");
db_driver_open(DB_SWAP, dbname);
}
void swapdb_close(void)
{
db_driver_close(DB_SWAP);
}
dbstring_id db_string_save(const char *s) {
(void)s;
return 0;
}
dbstring_id dbstring_save(const char *s) {
return db_driver_string_save(s);
}
const char *dbstring_load(dbstring_id id, size_t *size) {
return db_driver_string_load(id, size);
}

11
src/kernel/database.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
#include <stddef.h>
typedef unsigned int dbstring_id;
void swapdb_open(void);
void swapdb_close(void);
dbstring_id dbstring_save(const char *s);
const char *dbstring_load(dbstring_id id, size_t *size);