DS_TRAVERSE_ARRAY(3)

FUNCTION
ds_traverse_array - Recursively traverse a pair of arrays.

SYNOPSIS
#include <karma_ds.h>

flag ds_traverse_array

( array_desc *desc1, char *data1, array_desc *desc2, char *data2, flag as_whole, flag (*func) () )

DESCRIPTION
This routine will traverse a pair of multi-dimensional arrays will process a sub structure for every occurence wherever there is a difference in the two data structures' descriptors.

desc1
    One of the array descriptors.

data1
    One of the arrays.

desc2
    The other array descriptor.

data2
    The other array.

as_whole
    If FALSE: If the type or name of any element in the two packet descriptors are different, the packets are deemed divergent and they are passed to <<func>>. If any aspect of the two array's dimension descriptors are different, then the arrays are deemed divergent and their descriptors are passed to <<func>>. If TRUE: If the type or name of any element in the two packet descriptors are different, the packets are deemed divergent and they are passed to <<func>>. If any aspect of the two array's dimension descriptors are different, or their packet descriptors are divergent, then the arrays are deemed divergent and the array descriptors are passed to <<func>>. If the packet descriptors for linked lists are divergent, then the two lists are deemed divergent and their descriptors and headers are passed to <<func>>.

func
    The function to call for each divergence. The prototype function is <-ds_PROTO_traverse_func->. If this returns FALSE, iterations are stopped.

RETURN VALUE
TRUE if all iterations completed successfully, 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/