Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 93115a168fb6d572ffc0bf54d69355a3c6ce4005 |
|---|---|
| Date: | 2009-06-08 20:35:01 |
| User: | stephan |
| Comment: | minor doc corrections |
Tags And Properties
- branch=trunk inherited from [2bd6172b61]
- sym-trunk inherited from [2bd6172b61]
Changes
Changes to whhash.h
| Old (b966a1a75384615d) | New (1930e77d0408c746) | |||
|---|---|---|---|---|
| 1 | /* Copyright (C) 2002 Christopher Clark <firstname.lastname@cl.cam.ac.uk> */ | 1 | /* Copyright (C) 2002 Christopher Clark <firstname.lastname@cl.cam.ac.uk> */ | |
| 2 | /* Copyright (C) 2008 Stephan Beal (http://wanderinghorse.net/home/stephan/) */ | 2 | /* Copyright (C) 2008 Stephan Beal (http://wanderinghorse.net/home/stephan/) */ | |
| 3 | /* Code originally taken from: http://www.cl.cam.ac.uk/~cwc22/hashtable/ */ | 3 | /* Code originally taken from: http://www.cl.cam.ac.uk/~cwc22/hashtable/ */ | |
| 4 | #ifndef WANDERINGHORSE_NET_WHHASH_H_INCLUDED | 4 | #ifndef WANDERINGHORSE_NET_WHHASH_H_INCLUDED | |
| 5 | #define WANDERINGHORSE_NET_WHHASH_H_INCLUDED | 5 | #define WANDERINGHORSE_NET_WHHASH_H_INCLUDED | |
| 14 hidden lines | ||||
| 20 | Maintainer: Stephan Beal (http://wanderinghorse.net/home/stephan) | 20 | Maintainer: Stephan Beal (http://wanderinghorse.net/home/stephan) | |
| 21 | 21 | |||
| 22 | The hashtables described here map (void*) to (void*) by using a | 22 | The hashtables described here map (void*) to (void*) by using a | |
| 23 | client-supplied hash algorithm on the key pointers. The hashtable | 23 | client-supplied hash algorithm on the key pointers. The hashtable | |
| 24 | can optionally take over ownership of its keys or values, via | 24 | can optionally take over ownership of its keys or values, via | |
| 25 | whhash_set_key_dtor() and whhash_set_key_dtor(). The ownership | | | 25 | whhash_set_key_dtor() and whhash_set_val_dtor(). The ownership |
| 26 | management option makes this type useful as a simple garbage | 26 | management option makes this type useful as a simple garbage | |
| 27 | collector. | 27 | collector. | |
| 28 | 28 | |||
| 29 | @section whhash_sec_example Example | 29 | @section whhash_sec_example Example | |
| 30 | 30 | |||
| 263 hidden lines | ||||
| 294 | 294 | |||
| 295 | /** | 295 | /** | |
| 296 | whhash_search() searches for the given key and returns the | 296 | whhash_search() searches for the given key and returns the | |
| 297 | associated value (if found) or 0 (if not found). Ownership of the | 297 | associated value (if found) or 0 (if not found). Ownership of the | |
| 298 | returned value is unchanged. | 298 | returned value is unchanged. | |
| > | 299 | |||
| > | 300 | Maintainer's note: the h parameter should be const, but its not | ||
| > | 301 | for internal reasons. | ||
| 299 | */ | 302 | */ | |
| 300 | void * | 303 | void * | |
| 301 | whhash_search(whhash_table *h, void const * k); | 304 | whhash_search(whhash_table *h, void const * k); | |
| 302 | 305 | |||
| 303 | /** | 306 | /** | |
| 100 hidden lines | ||||
| 404 | int whhash_cmp_long( void const * k1, void const * k2 ); | 407 | int whhash_cmp_long( void const * k1, void const * k2 ); | |
| 405 | 408 | |||
| 406 | /** | 409 | /** | |
| 407 | An int/long hashing function for use with whhash_create(). It | 410 | An int/long hashing function for use with whhash_create(). It | |
| 408 | requires that n point to a long integer, and it simply returns the | 411 | requires that n point to a long integer, and it simply returns the | |
| 409 | value of n, or whhash_hash_val_err on error (n is NULL). | | | 412 | value of *n, or whhash_hash_val_err on error (n is NULL). |
| 410 | */ | 413 | */ | |
| 411 | whhash_val_t whhash_hash_long( void const * n ); | 414 | whhash_val_t whhash_hash_long( void const * n ); | |
| 412 | 415 | |||
| 413 | /** | 416 | /** | |
| 414 | This is a hash routine for generic void pointers. To avoid clustering | 417 | This is a hash routine for generic void pointers. To avoid clustering | |
| 224 hidden lines | ||||
| 639 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | 642 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
| 640 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | 643 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
| 641 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 644 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
| 642 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 645 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 643 | */ | 646 | */ | |