Create a hash search table
#include <search.h> int hcreate( size_t nel );
- An estimate of the maximum number of entries that the table will contain. The algorithm might adjust this number upward in order to obtain certain mathematically favorable circumstances.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The hcreate() function allocates space for the hash search table. You must call this function before using hsearch().
The hsearch() and hcreate() functions use malloc() to allocate space.
Only one hash search table may be active at any given time. You can destroy the table by calling hdestroy().
See also The Art of Computer Programming, Volume 3, Sorting and Searching by Donald E. Knuth, published by Addison-Wesley Publishing Company, 1973.
0 if there isn't enough space available to allocate the table.
Last modified: 2014-06-24