|
nsz |
056b01 |
#include <search.h>
|
|
nsz |
056b01 |
#define T(t) (t*)0;
|
|
nsz |
056b01 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
056b01 |
#define C(n) switch(n){case n:;}
|
|
nsz |
056b01 |
static void f()
|
|
nsz |
056b01 |
{
|
|
nsz |
056b01 |
T(size_t)
|
|
nsz |
056b01 |
T(ACTION)
|
|
nsz |
056b01 |
T(VISIT)
|
|
Szabolcs Nagy |
7ab89d |
T(ENTRY)
|
|
nsz |
056b01 |
{
|
|
Szabolcs Nagy |
7ab89d |
struct entry x;
|
|
nsz |
056b01 |
F(char*,key)
|
|
nsz |
056b01 |
F(void*,data)
|
|
nsz |
056b01 |
}
|
|
nsz |
056b01 |
switch((ACTION)0){
|
|
nsz |
056b01 |
case FIND:
|
|
nsz |
056b01 |
case ENTER:;
|
|
nsz |
056b01 |
}
|
|
nsz |
056b01 |
switch((VISIT)0){
|
|
nsz |
056b01 |
case preorder:
|
|
nsz |
056b01 |
case postorder:
|
|
nsz |
056b01 |
case endorder:
|
|
nsz |
056b01 |
case leaf:;
|
|
nsz |
056b01 |
}
|
|
nsz |
0ef264 |
{int(*p)(size_t) = hcreate;}
|
|
nsz |
0ef264 |
{void(*p)(void) = hdestroy;}
|
|
nsz |
edcdab |
{ENTRY*(*p)(ENTRY,ACTION) = hsearch;}
|
|
nsz |
0ef264 |
{void(*p)(void*,void*) = insque;}
|
|
nsz |
0ef264 |
{void*(*p)(const void*,const void*,size_t*,size_t,int(*)(const void*,const void*)) = lfind;}
|
|
nsz |
0ef264 |
{void*(*p)(const void*,void*,size_t*,size_t,int(*)(const void*,const void*)) = lsearch;}
|
|
nsz |
0ef264 |
{void(*p)(void*) = remque;}
|
|
nsz |
0ef264 |
{void*(*p)(const void*restrict,void**restrict,int(*)(const void*,const void*)) = tdelete;}
|
|
nsz |
0ef264 |
{void*(*p)(const void*,void*const*,int(*)(const void*,const void*)) = tfind;}
|
|
nsz |
0ef264 |
{void*(*p)(const void*,void**,int(*)(const void*,const void*)) = tsearch;}
|
|
nsz |
0ef264 |
{void(*p)(const void*,void(*)(const void*,VISIT,int)) = twalk;}
|
|
nsz |
056b01 |
}
|