DS_TRAVERSE_LIST(3)

FUNCTION
ds_traverse_list - Recursively traverse a pair of linked lists.

SYNOPSIS
#include <karma_ds.h>

flag ds_traverse_list

( packet_desc *desc1, list_header *head1, packet_desc *desc2, list_header *head2, flag as_whole, flag (*func) () )

DESCRIPTION
This routine will traverse a pair of linked lists and will process a sub structure for every occurence wherever there is a difference in the two data structures' descriptors.

desc1
    One of lists descriptor.

data1
    One of the lists header.

desc2
    The other lists descriptor.

data2
    The other lists header.

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/