#ifndef SORT_H #define SORT_H /* W pliku znjadują się deklaracje funkcji oraz struktury danych służące sortowaniu danych. We place public definitions of functions or structures for sorting in this file. */ #ifdef __cplusplus extern "C" { #endif /** Sorting function, algorithm heap sort. Parameters: - base - array, - nmemb - number of elements in base, - size - number of single element. - compar - comparison function. compar pointer to function which compares two elements. This function should return values: - >0 - when first is lower than second, - <0 - when second is lower than first, - 0 - where first is equal to second parameter. Funkcja nie zwraca żadnych wartości. */ void heapSort(void *base, size_t nmemb, const size_t size, int (*compar)(const void*, const void *)); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* SORT_H */