1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-09 23:06:09 +02:00
git/mergesort.h
René Scharfe 0db71e0fa9 add mergesort() for linked lists
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>
2012-04-11 08:50:53 -07:00

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