/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
/*
* tsearch() for systems that have <search.h> but no tsearch()
* why would such a system provide the interface but not the
* implementation? that's what happens when one slimes their
* way through standards compliance
*
* NOTE: please excuse the crude feature test
*/
#if !_UWIN
void _STUB_tsearch(){}
#else
#if _PACKAGE_ast
#include <ast.h>
#endif
#include <search.h>
#include "dthdr.h"
/* POSIX tsearch library based on libcdt
** Written by Kiem-Phong Vo (AT&T Research, 07/19/95)
*/
typedef struct _tree_s
} Tree_t;
typedef struct _treedisc_s
} Treedisc_t;
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
/* compare function */
#if __STD_C
#else
char* one;
char* two;
#endif
{
}
0,
},
0
};
extern
#if __STD_C
#else
int(* comparf)();
#endif
{
if(!rootp ||
/* dangerous to set comparf on each call but that's tsearch */
}
if(o)
}
extern
#if __STD_C
#else
int(* comparf)();
#endif
{
}
/* the original tdelete() specifies that it will return the parent pointer
** in the tree if there is one. Since we are using a splay tree, a deleted
** node is always rotated to the root first. So this implementation always
** returns the key of the new root.
*/
extern
#if __STD_C
#else
int(* comparf)();
#endif
{
}
}
/* the below routine assumes a particular layout of Dtlink_t.
** If this ever gets changed, this routine should be redone.
*/
#if __STD_C
#else
void(* action)();
int level;
#endif
else
}
}
/* the original twalk allows specifying arbitrary node to start traversal.
** Since our root is a dictionary structure, the search here will start
** at whichever node happens to be current root.
*/
extern
#if __STD_C
#else
void(* action)();
#endif
{
}
#endif