BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

klist_sort - sort the linked list

LIBRARY CALL

klist *klist_sort(
   klist *list,
   kfunc_int compare,
   int   duplicate_entries)

INPUT

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.