summaryrefslogtreecommitdiffstats
path: root/src/list_sort.h
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-09-23 20:38:31 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-09-23 20:38:31 +0200
commit351670b5729a0f421338c4fee62faed6e8e20c63 (patch)
tree290b455201f05930ab8a03d695c12827a69a5794 /src/list_sort.h
parentfa3e5583346ff55b9253c9d59b9c69798dff2226 (diff)
Speedup file sorting in NTFS undelete and local file listing by using merge sort instead of insertion sort
Diffstat (limited to 'src/list_sort.h')
-rw-r--r--src/list_sort.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/list_sort.h b/src/list_sort.h
new file mode 100644
index 0000000..24913dd
--- /dev/null
+++ b/src/list_sort.h
@@ -0,0 +1,22 @@
+/*
+ File: list_sort.h
+
+ Copyright (C) 2011 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+void td_list_sort(struct td_list_head *head,
+ int (*cmp)(const struct td_list_head *a, const struct td_list_head *b));