DS_LIST_UNFRAGMENT(3)

FUNCTION
ds_list_unfragment - Unfragment a linked list.

SYNOPSIS
#include <karma_ds.h>

flag ds_list_unfragment

(packet_desc *list_desc, list_header *list_head)

DESCRIPTION
This routine will unfragment a linked list (i.e. all the entries and data packets in the linked list will be made contiguous in memory). This increases the storage efficiency (no list_entry structures are needed to link the data packets) as well as arbitrary indexing. This routine, used with a sorting routine (in either order of execution), can be used to speed up searching algorithms. If the routine is not successful in allocating the required memory, then no change is effected (and the contiguous_length value in the list header is not changed). I.e. data is not lost.

list_desc
    The packet descriptor for the list.

list_head
    The linked list header.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

NOTE
The <<contiguous_length>> value in the linked list header will be set to the length of the list.

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/