DS_COPY_UNIQUE_NAMED_ELEMENT(3)

FUNCTION
ds_copy_unique_named_element - Copy a unique named element from one packet to another.

SYNOPSIS
#include <karma_ds.h>

flag ds_copy_unique_named_element

(packet_desc *out_desc, char **out_packet, CONST packet_desc *in_desc, CONST char *in_packet, CONST char *name, flag fail_if_not_found, flag fail_on_duplicate, flag replace)

DESCRIPTION
Copy a unique named element from one packet to another.

out_desc
    The packet descriptor to add the name to. This descriptor will be modified.

out_packet
    The pointer to the unique packet. Note that the existing packet data is copied to a new packet, and a pointer to this packet is written back here.

in_desc
    The input packet descriptor.

in_packet
    The input packet.

name
    The name of the element to copy.

fail_if_not_found
    If TRUE, the routine will fail if the element does not exist in the input packet.

fail_on_duplicate
    If TRUE, the routine will fail if the element already exists in the output packet.

replace
    If TRUE and the element already exists in the output packet, it is replaced.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

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/