summaryrefslogtreecommitdiffstats
path: root/innbbsd/dbz.h
blob: bef0512f99e5b658f83f86a9340d302e50e659b0 (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
/* for dbm and dbz */
#ifndef _DBZ_H
#define _DBZ_H
typedef struct {
    char           *dptr;
    int             dsize;
}               datum;

/* standard dbm functions */
extern int      dbminit();
extern datum    fetch();
extern int      store();
extern int      delete();   /* not in dbz */
extern datum    firstkey(); /* not in dbz */
extern datum    nextkey();  /* not in dbz */
extern int      dbmclose(); /* in dbz, but not in old dbm */

/* new stuff for dbz */
extern int      dbzfresh();
extern int      dbzagain();
extern datum    dbzfetch();
extern int      dbzstore();
extern int      dbzsync();
extern long     dbzsize();
extern int      dbzincore();
extern int      dbzcancel();
extern int      dbzdebug();
extern int      dbzwritethrough();

/*
 * In principle we could handle unlimited-length keys by operating a chunk at
 * a time, but it's not worth it in practice.  Setting a nice large bound on
 * them simplifies the code and doesn't hurt anything.
 */
#define DBZMAXKEY   255

#endif /* _DBZ_H */