BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

khash_add - adds an entry into the hash array

LIBRARY CALL

int khash_add(
  khash *hash,
  <type>  entry,
  kaddr client_data)

INPUT

OUTPUT

none

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise.

DESCRIPTION

Inserts an entry into the hash array, and an associated piece of data.

The hash utilities, including khash_add(), support hash arrays of a variety of data types. The data type of the array being used is specified with the 'type' parameter; supported data types include:

KBYTE - hash array of characters KUBYTE - hash array of unsigned characters KSHORT - hash array of short integers KUSHORT - hash array of unsigned short integers KINT - hash array of integers KUINT - hash array of unsigned integers KLONG - hash array of long integers KULONG - hash array of unsigned long integers KFLOAT - hash array of floating point numbers KDOUBLE - hash array of double precision numbers KSTRING - hash array of strings KSTRUCT - hash array of pointers to structures KLOGICAL - hash array of TRUE/FALSE values

Note that the hash array and the entry passed in MUST both be of the type specified by the type parameter, originally used in creating the hash array or the results of this routine are unpredictable.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/objects/library/kutils/src/hash.c

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.