#ifndef COMMON_H #define COMMON_H #include #include typedef int (*cmpfun)(const void *, const void *); typedef void (*sorterfn)(void *, size_t, size_t, cmpfun); size_t binary_search(const char *, char *, size_t, size_t, cmpfun); void distribute_buffer(char *, size_t, size_t, size_t, cmpfun); void swap(char *, char *, size_t); void rotate(char *, size_t, size_t); #define MAX_SORTNET 8 void sorting_network(char *, size_t, size_t, cmpfun); #endif