Blame src/api/ndbm.c

Szabolcs Nagy 88de36
#ifdef X_NDBM
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)
Szabolcs Nagy 7ab89d
T(mode_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 0ef264
{int(*p)(DBM*) = dbm_clearerr;}
nsz 0ef264
{void(*p)(DBM*) = dbm_close;}
nsz 0ef264
{int(*p)(DBM*,datum) = dbm_delete;}
nsz 0ef264
{int(*p)(DBM*) = dbm_error;}
nsz 0ef264
{datum(*p)(DBM*,datum) = dbm_fetch;}
nsz 0ef264
{datum(*p)(DBM*) = dbm_firstkey;}
nsz 0ef264
{datum(*p)(DBM*) = dbm_nextkey;}
nsz edcdab
{DBM*(*p)(const char*,int,mode_t) = dbm_open;}
nsz 0ef264
{int(*p)(DBM*,datum,datum,int) = dbm_store;}
nsz d7c151
}
Szabolcs Nagy 88de36
#else
Szabolcs Nagy 88de36
static void f(){}
nsz 522e48
#endif