klist *klist_sort(
klist *list,
kfunc_int compare,
int duplicate_entries)
INPUT
list - The current linked list to be sorted.
compare - An integer function which performs the comparision
of whether the first identifier is less than (-1),
equal to (0), or greater than (1) the second
identifier.
duplicate_entries - toggle where TRUE allows duplicate entries
and FALSE removes duplicate entries.
OUTPUT
none
RETURN VALUE
The sorted linked list
DESCRIPTION
Tries to sort the linked list into ascending order.
This is done by simply racing thru the list swapping
each set of entries depending if the entry's identifier.
If the compare routine is not NULL then the routine
is called with the two identifier and the routine is
expected to return whether the first identifier is less
than, equal to, or greater than the second. This is
done by returning -1, 0, 1 respectively.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/list.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.