[comp.lang.c] Generic sort routine for linked lists

pricked@vax1.acs.udel.EDU (Jenn-Ming Yang) (03/13/90)

I am in need of a generic sort routine written in C for linked lists(of structs)
(single links, no back links)
I need it to me the following requirements:
 1)sort in place, or place ptrs in an array(and keep the linked list intact!)
 2)be able to sort on ANY field(even dynamically allocated) in the struct.
 3)be able to sort in ascending OR descending
 4)take key value into account such that 2 structs with equal key values
   will retain the same order that they have before the sort. 

if anyone has such a program, then send me e-mail.
thanks


-- 
pricked@vax1.acs.udel.edu (or pricked@192.5.57.1, pricked@192.5.57.129)