mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
An abstract mergesort function.
This commit is contained in:
@@ -64,6 +64,16 @@ extern KeywordExt_List * copy_list (KeywordExt_List *list);
|
||||
/* Deletes a linear list, keeping the list elements in memory. */
|
||||
extern void delete_list (Keyword_List *list);
|
||||
|
||||
/* Sorts a linear list, given a comparison function.
|
||||
Note: This uses a variant of mergesort that is *not* a stable sorting
|
||||
algorithm. */
|
||||
extern Keyword_List * mergesort_list (Keyword_List *list,
|
||||
bool (*less) (Keyword *keyword1,
|
||||
Keyword *keyword2));
|
||||
extern KeywordExt_List * mergesort_list (KeywordExt_List *list,
|
||||
bool (*less) (KeywordExt *keyword1,
|
||||
KeywordExt *keyword2));
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
Reference in New Issue
Block a user