J(3)

PACKAGE
j - Routines to manipulate associative arrays of joined pairs

PURPOSE
These routines are meant to provide general purpose associative array support (also know as lists of joined pairs). This can save a lot of code when you maintain lists of pairs of items (e.g. pairs of names and objects) $NOTE THIS PACKAGE IS WORK IN PROGRESS. THE INTERFACE MAY CHANGE IN THE NEXT RELEASE, POSSIBLY WITHOUT NOTICE.

LIBRARY
karma

LINK WITH
-lkarma

FUNCTIONS

j_create
    Create a general purpose associative array of key-value pairs.

j_destroy
    Destroy an associative array.

j_get_info
    Get information attached to associative array.

j_put_pair
    Add a key-value pair to an associative array.

j_get_pair
    Find a key-value pair in an associative array.

j_destroy_pair
    Remove a key-value pair from an associative array.

j_get_all_pairs
    Get all the key-value pairs on an associative array.

j_get_pair_info
    Get key and value information for a key-value pair.

j_PROTO_key_compare_func
    This routine will compare two keys.

j_PROTO_key_copy_func
    This routine will copy a key.

j_PROTO_key_destroy_func
    This routine will destroy keys.

j_PROTO_value_copy_func
    This routine will copy a value.

j_PROTO_value_destroy_func
    This routine will destroy values.

TABLE j_REPLACEMENT_POLICIES
List of replacement policies when adding keys
Policy Name Meaning
KJ_REPLACEMENT_POLICY_NEW Fail if existing key found
KJ_REPLACEMENT_POLICY_UPDATE Fail if no existing key found
KJ_REPLACEMENT_POLICY_PUT Add pair, remove old key if exists

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/