HP C/iX Library Reference Manual (30026-90004)
42 Chapter4
HP C/iX Library Header Descriptions
Header File Contents
NOTE
This header file is not defined by the ANSI C standard. Programs using this
header are likely to be less portable. Use <string.h> for ANSI compliance.
MPE Aids <mpe.h>
The mpe.h> header file declares several types, constants, and functions that allow you to
more easily interface with the MPE/iX operating system. Refer to chapter 3, "Interfacing
With MPE/iX," for additional information.
NOTE
This header file is not defined by the POSIX or ANSI C standards. Programs
using this header are likely to be less portable.
Searching Utilities <search.h>
The header <search.h> contains identifiers used for creating and searching binary trees
and hash tables. The following identifiers are declared:
memcpy() function Copies a specified number of characters from one object to another.
memset() function Initializes an object with a supplied character value.
Table 4-8. Search Utilities <search.h>
Name Type Description
ACTION type definition An enumerated type with the enumerated constants FIND and
ENTER.
ENTRY type definition A structured type defining a record with a search key and data.
hcreate() function Allocates sufficient space for a hash table used by hsearch().
hdestroy() function Destroys a search table created by hcreate().
lsearch() function Performs a linear search and update.
tdelete() function Deletes a specified node from a binary search tree.
tfind() function Searches for a specified entry in a binary search tree.
tsearch() function Returns a pointer into a hash table indicating the location of a
specified entry.
twalk() function Traverses a binary search tree and returns the value at the
specified node.
VISIT type definition An enumerated type with the enumerated constants preorder,
postorder, endorder, and leaf.
Table 4-7. Memory Handling <memory.h>
Name Type Description