#ifndef _SORT_H #define _SORT_H #include #include #include #include /*********************************************************** *This header provides variable sorting functions.Use them carefully. *Author: Cong Wang *Date: 2005-05-10 *Last Update: 2005-11-16 *Version: 1.1 *Notice that it 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. *Report bugs to xiyou.wangcong@gmail.com . ***********************************************************/ extern int errno; extern int bubble_sort(void* ,size_t ,int ,int (*)(void*,void*)); extern int linear_insertion_sort(void* ,size_t ,int ,int (*)(void*,void*)); extern int select_sort(void* ,size_t ,int ,int (*)(void*,void*)); extern int binary_insertion_sort(void* ,size_t ,int ,int (*)(void*,void*)); extern int shell_sort(void* ,size_t ,int ,int (*)(void*,void*)); extern int quick_sort(void*,size_t,int,int,int (*)(void*,void*));/*This one has FIVE arguments*/ extern int heap_sort(void* ,size_t ,int ,int (*)(void*,void*)); extern int merge_sort(void* ,size_t ,int ,int (*)(void*,void*)); #endif