![]() * A hash function for null-terminated strings. */Įxtern htab_t htab_try_create PARAMS ((size_t, htab_hash,Įxtern void htab_delete PARAMS ((htab_t)) Įxtern void htab_empty PARAMS ((htab_t)) Įxtern PTR htab_find PARAMS ((htab_t, const void *)) Įxtern PTR *htab_find_slot PARAMS ((htab_t, const void *,Įxtern PTR htab_find_with_hash PARAMS ((htab_t, const void *,Įxtern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *,Įxtern void htab_clear_slot PARAMS ((htab_t, void **)) Įxtern void htab_remove_elt PARAMS ((htab_t, void *)) Įxtern void htab_traverse PARAMS ((htab_t, htab_trav, void *)) Įxtern size_t htab_size PARAMS ((htab_t)) Įxtern size_t htab_elements PARAMS ((htab_t)) Įxtern double htab_collisions PARAMS ((htab_t)) Htab_find_slot are allowed to return NULL when inserting. * This function is like htab_create, but may return NULL if memoryĪllocation fails, and also signals that htab_find_slot_with_hash and */Įxtern htab_t htab_create PARAMS ((size_t, htab_hash, * The prototypes of the package functions. * An enum saying whether we insert into the hash table or not. * This is non-zero if we are allowed to return NULL for function calls Of collisions fixed for time of work with the hash table. links: PTS area: main in suites: woody size: 74,284 kB ctags: 106,539 sloc: ansic: 908,403 exp: 48,309 sh: 15,889 makefile: 11,937 asm. Of all calls of `htab_find_slot' for the hash table. * The following member is used for debugging. * Current number of deleted elements in the table */ * Current number of elements including also deleted elements */ * Current size (in entries) of the hash table */ All work with hash table should be executed only through (implementation) of this type is not needed for using the hash * Hash tables are of the following type. Typedef int (*htab_trav) PARAMS ((void **, void *)) If desired), the second arg is the auxiliary pointer handed to The firstĪrg is the slot of the element (which can be passed to htab_clear_slot * Function called by htab_traverse for each live element. Typedef void (*htab_del) PARAMS ((void *)) * Cleanup function called whenever a live element is removed from Typedef int (*htab_eq) PARAMS ((const void *, const void *)) The table always comes first, so the second element can be of aĭifferent type (but in this case htab_find and htab_find_slotĬannot be used instead the variants that accept a hash value * Compare a table entry with a possible entry. Typedef hashval_t (*htab_hash) PARAMS ((const void *)) Hash table isĮxpanded by creation of new hash table and transferring elements from The abstract data implementation is based on generalized Algorithm Dįrom Knuth's book "The art of computer programming". Grows too high the hash table will be expanded. The size of the table is not fixed if the occupancy of the table To search for an entry, create an entry and destroy an entry.Įlements in the table are generic pointers. ![]() * This package implements basic hash table functionality. You should have received a copy of the GNU General Public LicenseĪlong with this program if not, write to the Free Softwareįoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. GNU General Public License for more details. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is distributed in the hope that it will be useful,īut WITHOUT ANY WARRANTY without even the implied warranty of ![]() The Free Software Foundation either version 2 of the License, or It under the terms of the GNU General Public License as published by Copyright (C) 1999, 2000 Free Software Foundation, Inc.Ĭontributed by Vladimir Makarov program is free software you can redistribute it and/or modify
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |