2N/A/*
2N/A * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
2N/A * Copyright (c) 1997,1999 by Internet Software Consortium.
2N/A *
2N/A * Permission to use, copy, modify, and distribute this software for any
2N/A * purpose with or without fee is hereby granted, provided that the above
2N/A * copyright notice and this permission notice appear in all copies.
2N/A *
2N/A * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
2N/A * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2N/A * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
2N/A * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2N/A * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
2N/A * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2N/A */
2N/A
2N/Atypedef int (*heap_higher_priority_func)(void *, void *);
2N/Atypedef void (*heap_index_func)(void *, int);
2N/Atypedef void (*heap_for_each_func)(void *, void *);
2N/A
2N/Atypedef struct heap_context {
2N/A int array_size;
2N/A int array_size_increment;
2N/A int heap_size;
2N/A void **heap;
2N/A heap_higher_priority_func higher_priority;
2N/A heap_index_func index;
2N/A} *heap_context;
2N/A
2N/A#define heap_new __heap_new
2N/A#define heap_free __heap_free
2N/A#define heap_insert __heap_insert
2N/A#define heap_delete __heap_delete
2N/A#define heap_increased __heap_increased
2N/A#define heap_decreased __heap_decreased
2N/A#define heap_element __heap_element
2N/A#define heap_for_each __heap_for_each
2N/A
2N/Aheap_context heap_new(heap_higher_priority_func, heap_index_func, int);
2N/Aint heap_free(heap_context);
2N/Aint heap_insert(heap_context, void *);
2N/Aint heap_delete(heap_context, int);
2N/Aint heap_increased(heap_context, int);
2N/Aint heap_decreased(heap_context, int);
2N/Avoid * heap_element(heap_context, int);
2N/Aint heap_for_each(heap_context, heap_for_each_func, void *);
2N/A
2N/A/*! \file */