BRL-CAD

Platform-independent re-entrant version of qsort. More...

Collaboration diagram for Sorting Algorithms:

Files

file  sort.h
 

Functions

void bu_sort (void *array, size_t nummemb, size_t sizememb, int(*compare)(const void *, const void *, void *), void *context)
 

Detailed Description

Platform-independent re-entrant version of qsort.

The first argument is the array to sort, the second the number of elements inside the array, the third the size of one element, the fourth the comparison-function and the fifth a variable which is handed as a third argument to the comparison-function.

Function Documentation

◆ bu_sort()

void bu_sort ( void *  array,
size_t  nummemb,
size_t  sizememb,
int(*)(const void *, const void *, void *)  compare,
void *  context 
)