Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <search.h>
int hcreate(
size_t nel);
PARAMETERS
nel Species 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 specied 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
sufcient 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).
348 Hewlett-Packard Company 527192-005