mirror of
https://github.com/git/git
synced 2024-10-01 06:05:20 +00:00
0db71e0fa9
This adds a generic bottom-up mergesort implementation for singly linked lists. It was inspired by Simon Tatham's webpage on the topic[1], but not so much by his implementation -- for no good reason, really, just a case of NIH. [1] http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 lines
204 B
C
10 lines
204 B
C
#ifndef MERGESORT_H
|
|
#define MERGESORT_H
|
|
|
|
void *mergesort(void *list,
|
|
void *(*get_next_fn)(const void *),
|
|
void (*set_next_fn)(void *, void *),
|
|
int (*compare_fn)(const void *, const void *));
|
|
|
|
#endif
|