X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/03d53b73fc6663cef4493cfda7193c958557c240..419895bb703f5cba6fc86d56277abdc4e6b28330:/man/hash.3 diff --git a/man/hash.3 b/man/hash.3 index 9df4670..d74edd4 100644 --- a/man/hash.3 +++ b/man/hash.3 @@ -19,7 +19,7 @@ .. .ie t .ds o \(bu .el .ds o o -.TH hash 3 "2 August 1999" mLib +.TH hash 3 "2 August 1999" "Straylight/Edgeware" "mLib utilities library" .SH "NAME" hash \- low-level hashtable implementation .\" @hash_create @@ -57,11 +57,11 @@ functions provide the basis for an extensible hashtable implementation. The implementation is not complete. Many decisions have been left to the user, including: .hP \*o -How keys should be represented, hashed and compared. +how keys should be represented, hashed and compared; .hP \*o -How objects contained within the table should be allocated. +how objects contained within the table should be allocated; and .hP \*o -When the hashtable should be extended. +when the hashtable should be extended. .PP A complete hashtable implementation will need to take the above decisions. If you just want a prepackaged solution, see @@ -90,12 +90,12 @@ A low-level hashtable is represented by a .B hash_table structure. It contains two members: .TP -.B mask +.B "uint32 mask" The current bitmask to be applied to hashes. This is one less than the current number of bins in the hashtable, and is applied to hash values in order to decide which bin an item should be in. .TP -.B v +.B "hash_base **v" The bin vector. It is an array of pointers to hashtable items. .PP A hashtable item consists of a @@ -106,13 +106,13 @@ structure by adding keying information and other data; the only contains the bare minimum of information needed to maintain the hashtable at a low level. It contains the following members: .TP -.B next +.B "hash_base *next" Pointer to the next item in the bin list. The final item has a null .B next pointer. The entry in the bin vector is null if the bin list is empty. It is up to the high-level implementation to insert items into the list. .TP -.B hash +.B "uint32 hash" The hash for this item. This must be the full 32-bit hash for the current item. It is used during hashtable expansion to determine which bin an item should be moved to.