DS_COPY_DATA(3)

FUNCTION
ds_copy_data - Copy data between Karma data structures.

SYNOPSIS
#include <karma_ds.h>

flag ds_copy_data

(CONST packet_desc *inp_desc, CONST char *inp_data, packet_desc *out_desc, char *out_data)

DESCRIPTION
This routine will copy data from one data structure to another, provided the two data structures have the same format. If there are any variations in the two formats, the copying process is stopped at that level If one or more elements are different, they are not copied, however, the other elements are copied. This also applies to array and linked list pointer elements. This condition only holds for packets with the same number of elements, otherwise no elements are copied. The ordering of elements must also be the same. The names of elements and dimensions must be the same, as well as the data types. For information on array and linked list copying, see The routine recursively copies data in arrays and linked lists. <-ds_copy_array-> and <-ds_copy_list->.

inp_desc
    The input data structure descriptor.

inp_data
    The input data.

out_desc
    The output data structure descriptor.

out_data
    The output data memory allocation.

RETURN VALUE
TRUE if the two packet descriptors are identical, 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/