|
Packit |
cdaae3 |
/* Copyright (c) 2013-2014, David Anderson
|
|
Packit |
cdaae3 |
All rights reserved.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
Redistribution and use in source and binary forms, with
|
|
Packit |
cdaae3 |
or without modification, are permitted provided that the
|
|
Packit |
cdaae3 |
following conditions are met:
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
Redistributions of source code must retain the above
|
|
Packit |
cdaae3 |
copyright notice, this list of conditions and the following
|
|
Packit |
cdaae3 |
disclaimer.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
Redistributions in binary form must reproduce the above
|
|
Packit |
cdaae3 |
copyright notice, this list of conditions and the following
|
|
Packit |
cdaae3 |
disclaimer in the documentation and/or other materials
|
|
Packit |
cdaae3 |
provided with the distribution.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
|
Packit |
cdaae3 |
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
|
Packit |
cdaae3 |
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
Packit |
cdaae3 |
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
Packit |
cdaae3 |
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
Packit |
cdaae3 |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
Packit |
cdaae3 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
Packit |
cdaae3 |
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
Packit |
cdaae3 |
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
Packit |
cdaae3 |
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
Packit |
cdaae3 |
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
Packit |
cdaae3 |
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
Packit |
cdaae3 |
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
*/
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* The interfaces follow tsearch (See the Single
|
|
Packit |
cdaae3 |
Unix Specification) but the implementation is
|
|
Packit |
cdaae3 |
written without reference to the source of any
|
|
Packit |
cdaae3 |
version of tsearch.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
See http://www.prevanders.net/tsearch.html
|
|
Packit |
cdaae3 |
for information and an example of use.
|
|
Packit |
cdaae3 |
*/
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#ifdef HAVE_CONFIG_H
|
|
Packit |
cdaae3 |
#include "config.h"
|
|
Packit |
cdaae3 |
#endif
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#if defined(TSEARCH_USE_BAL)
|
|
Packit |
cdaae3 |
#include "dwarf_tsearchbal.c"
|
|
Packit |
cdaae3 |
#elif defined(TSEARCH_USE_BIN)
|
|
Packit |
cdaae3 |
#include "dwarf_tsearchbin.c"
|
|
Packit |
cdaae3 |
#elif defined(TSEARCH_USE_EPP)
|
|
Packit |
cdaae3 |
#include "dwarf_tsearchepp.c"
|
|
Packit |
cdaae3 |
#elif defined(TSEARCH_USE_HASH)
|
|
Packit |
cdaae3 |
#include "dwarf_tsearchhash.c"
|
|
Packit |
cdaae3 |
#elif defined(TSEARCH_USE_RED)
|
|
Packit |
cdaae3 |
#include "dwarf_tsearchred.c"
|
|
Packit |
cdaae3 |
#else
|
|
Packit |
cdaae3 |
#error Missing tsearch algorithm
|
|
Packit |
cdaae3 |
#endif
|