|
nsz |
d7c151 |
#include <ndbm.h>
|
|
nsz |
d7c151 |
#define T(t) (t*)0;
|
|
nsz |
d7c151 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
d7c151 |
#define C(n) switch(n){case n:;}
|
|
nsz |
d7c151 |
static void f()
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
T(size_t)
|
|
nsz |
d7c151 |
T(DBM)
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
datum x;
|
|
nsz |
d7c151 |
F(void*, dptr)
|
|
nsz |
d7c151 |
F(size_t, dsize)
|
|
nsz |
d7c151 |
}
|
|
nsz |
d7c151 |
C(DBM_INSERT)
|
|
nsz |
d7c151 |
C(DBM_REPLACE)
|
|
nsz |
d7c151 |
int(*p_dbm_clearerr)(DBM*) = dbm_clearerr;
|
|
nsz |
d7c151 |
void(*p_dbm_close)(DBM*) = dbm_close;
|
|
nsz |
d7c151 |
int(*p_dbm_delete)(DBM*,datum) = dbm_delete;
|
|
nsz |
d7c151 |
int(*p_dbm_error)(DBM*) = dbm_error;
|
|
nsz |
d7c151 |
datum(*p_dbm_fetch)(DBM*,datum) = dbm_fetch;
|
|
nsz |
d7c151 |
datum(*p_dbm_firstkey)(DBM*) = dbm_firstkey;
|
|
nsz |
d7c151 |
datum(*p_dbm_nextkey)(DBM*) = dbm_nextkey;
|
|
nsz |
d7c151 |
DBM*(*p_dbm_open)(const char*,int,mode_t) = dbm_open;
|
|
nsz |
d7c151 |
int(*p_dbm_store)(DBM*,datum,datum,int) = dbm_store;
|
|
nsz |
d7c151 |
}
|