Create a hash search table
#include <search.h> int hcreate( size_t nel );
libc
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.
See hsearch().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | No |