SDL_qsort.c: change private function compare args to SDL_CompareCallback
fixes watcom os/2 and win32 builds after commit b2b2369414
This commit is contained in:
1 parent
b2b2369414
commit
ce6d3c5cc1
1 file changed
+4
-4
@@ -368,7 +368,7 @@ typedef struct { char * first; char * last; } stack_entry;
|
|||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
static char * pivot_big(char *first, char *mid, char *last, size_t size,
|
static char * pivot_big(char *first, char *mid, char *last, size_t size,
|
||||||
int compare(const void *, const void *)) {
|
SDL_CompareCallback compare) {
|
||||||
size_t d=(((last-first)/size)>>3)*size;
|
size_t d=(((last-first)/size)>>3)*size;
|
||||||
#ifdef DEBUG_QSORT
|
#ifdef DEBUG_QSORT
|
||||||
fprintf(stderr, "pivot_big: first=%p last=%p size=%lu n=%lu\n", first, (unsigned long)last, size, (unsigned long)((last-first+1)/size));
|
fprintf(stderr, "pivot_big: first=%p last=%p size=%lu n=%lu\n", first, (unsigned long)last, size, (unsigned long)((last-first+1)/size));
|
||||||
@@ -409,7 +409,7 @@ fprintf(stderr,"-> %d %d %d @ %p %p %p\n",*(int*)m1,*(int*)m2,*(int*)m3, m1,m2,m
|
|||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
static void qsort_nonaligned(void *base, size_t nmemb, size_t size,
|
static void qsort_nonaligned(void *base, size_t nmemb, size_t size,
|
||||||
int (*compare)(const void *, const void *)) {
|
SDL_CompareCallback compare) {
|
||||||
|
|
||||||
stack_entry stack[STACK_SIZE];
|
stack_entry stack[STACK_SIZE];
|
||||||
int stacktop=0;
|
int stacktop=0;
|
||||||
@@ -440,7 +440,7 @@ static void qsort_nonaligned(void *base, size_t nmemb, size_t size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void qsort_aligned(void *base, size_t nmemb, size_t size,
|
static void qsort_aligned(void *base, size_t nmemb, size_t size,
|
||||||
int (*compare)(const void *, const void *)) {
|
SDL_CompareCallback compare) {
|
||||||
|
|
||||||
stack_entry stack[STACK_SIZE];
|
stack_entry stack[STACK_SIZE];
|
||||||
int stacktop=0;
|
int stacktop=0;
|
||||||
@@ -471,7 +471,7 @@ static void qsort_aligned(void *base, size_t nmemb, size_t size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void qsort_words(void *base, size_t nmemb,
|
static void qsort_words(void *base, size_t nmemb,
|
||||||
int (*compare)(const void *, const void *)) {
|
SDL_CompareCallback compare) {
|
||||||
|
|
||||||
stack_entry stack[STACK_SIZE];
|
stack_entry stack[STACK_SIZE];
|
||||||
int stacktop=0;
|
int stacktop=0;
|
||||||
|
|||||||
Reference in new issue
Block a user