summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/database.h
blob: 71b8474033cb4e92cb428c26fba45bccbb8fa5a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 *  database.h
 *  Crawl
 *
 *  Created by Peter Berger on 4/15/07.
 *  $Id:$
 */


#ifndef DATABASE_H
#define DATABASE_H

#undef DEBUG // hack
#define NDEBUG
#include "externs.h"

#ifdef __cplusplus
extern "C" {
#endif

#include <ndbm.h>

// For convenience during shutdown.
typedef struct dbList_s dbList_t;
#ifdef __cplusplus
}
#endif
extern dbList_t *openDBList;

void databaseSystemInit();
void databaseSystemShutdown();
DBM  *openDB(const char *dbFilename);
datum *database_fetch(DBM *database, char *key);


std::string getLongDescription(const char *key);

#endif