Back to index

lightning-sunbird  0.9+nobinonly
extern.h
Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1991, 1993, 1994
00003  *     The Regents of the University of California.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. ***REMOVED*** - see 
00014  *    ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
00015  * 4. Neither the name of the University nor the names of its contributors
00016  *    may be used to endorse or promote products derived from this software
00017  *    without specific prior written permission.
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00020  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00021  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00022  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00023  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00024  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00025  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00026  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00027  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00028  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00029  * SUCH DAMAGE.
00030  *
00031  *     @(#)extern.h  8.4 (Berkeley) 6/16/94
00032  */
00033 
00034 BUFHEAD       *__add_ovflpage (HTAB *, BUFHEAD *);
00035 int     __addel (HTAB *, BUFHEAD *, const DBT *, const DBT *);
00036 int     __big_delete (HTAB *, BUFHEAD *);
00037 int     __big_insert (HTAB *, BUFHEAD *, const DBT *, const DBT *);
00038 int     __big_keydata (HTAB *, BUFHEAD *, DBT *, DBT *, int);
00039 int     __big_return (HTAB *, BUFHEAD *, int, DBT *, int);
00040 int     __big_split (HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *,
00041               uint32, uint32, SPLIT_RETURN *);
00042 int     __buf_free (HTAB *, int, int);
00043 void    __buf_init (HTAB *, int);
00044 uint32  __call_hash (HTAB *, char *, size_t);
00045 int     __delpair (HTAB *, BUFHEAD *, int);
00046 int     __expand_table (HTAB *);
00047 int     __find_bigpair (HTAB *, BUFHEAD *, int, char *, int);
00048 uint16  __find_last_page (HTAB *, BUFHEAD **);
00049 void    __free_ovflpage (HTAB *, BUFHEAD *);
00050 BUFHEAD       *__get_buf (HTAB *, uint32, BUFHEAD *, int);
00051 int     __get_page (HTAB *, char *, uint32, int, int, int);
00052 int     __ibitmap (HTAB *, int, int, int);
00053 uint32  __log2 (uint32);
00054 int     __put_page (HTAB *, char *, uint32, int, int);
00055 void    __reclaim_buf (HTAB *, BUFHEAD *);
00056 int     __split_page (HTAB *, uint32, uint32);
00057 
00058 /* Default hash routine. */
00059 extern uint32 (*__default_hash) (const void *, size_t);
00060 
00061 #ifdef HASH_STATISTICS
00062 extern int hash_accesses, hash_collisions, hash_expansions, hash_overflows;
00063 #endif