DS_GET_HANDLE_IN_PACKET(3)

FUNCTION
ds_get_handle_in_packet - Find sub-structure in a general data structure.

SYNOPSIS
#include <karma_ds.h>

unsigned int ds_get_handle_in_packet

(packet_desc *pack_desc, char *packet, CONST char *item_name, CONST char *restr_names[], double *restr_values, unsigned int num_restr, char **parent_desc, char **parent, unsigned int *parent_type, unsigned int *index)

DESCRIPTION
This routine will find a unique occurrence of an object (sub-structure) within a specified general data structure.

pack_desc
    The general data structure packet descriptor.

packet
    The general data structure packet.

item_name
    The name of the object that the handle is desired for.

restr_names
    The array of pointers to restrictions names.

restr_values
    The array of restriction values.

num_restr
    The number of restriction values.

parent_desc
    A pointer to the item's parent descriptor is written here.

parent
    A pointer to the item's parent is written here.

parent_type
    The type of the parent is written here. See <-ds_HANDLE_TYPES-> for a list of possible values.

index
    The index number of the item in its parent descriptor is written here.

RETURN VALUE
A code based on the type of the sub-structure found. See <-ds_IDENT_TABLE-> for a list of possible values.

Multi-threading Level
Unsafe.

NOTE
The following rules apply to items: If the item is an atomic element, the parent is a packet. If the item is a dimension, the parent is an array. If the item is an atomic element in a linked list, the parent is a list header.

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/