Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
hcreate(3) Guardian Native C Library Calls Reference Manual
NAME
hcreate - Initializes a hash table
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <search.h>
int hcreate(
size_t nel);
PARAMETERS
nel Specifies an estimate of the maximum number of entries that the hash table will
contain. Under some circumstances, the hcreate() function may make the hash
table larger than specified in order to obtain mathematically favorable conditions
for access to the hash table.
DESCRIPTION
The hcreate() function initializes the hash table. You must call the hcreate() function before
calling the hsearch() function.
RETURN VALUES
Upon successful completion, the hcreate() function returns a nonzero value. Otherwise, when
sufficient space for the table cannot be allocated, the hcreate() function returns a value of 0
(zero).
ERRORS
None. This function does not set errno.
RELATED INFORMATION
Functions: bsearch(3), hdestroy(3), hsearch(3), lsearch(3), tsearch(3), qsort(3).
3−80 Hewlett-Packard Company 527192-018