Context-free sorting function. More...
#include <stddef.h>
Go to the source code of this file.
Typedefs | |
typedef int(* | qsort_r_compar_t) (const void *a, const void *b, void *arg) |
Prototype for generic comparison function, compatible with qsort_r() More... | |
Functions | |
void | mutt_qsort_r (void *base, size_t nmemb, size_t size, qsort_r_compar_t compar, void *arg) |
Sort an array, where the comparator has access to opaque data rather than requiring global variables. More... | |
Context-free sorting function.
This program 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.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file qsort_r.h.
typedef int(* qsort_r_compar_t) (const void *a, const void *b, void *arg) |
void mutt_qsort_r | ( | void * | base, |
size_t | nmemb, | ||
size_t | size, | ||
qsort_r_compar_t | compar, | ||
void * | arg | ||
) |
Sort an array, where the comparator has access to opaque data rather than requiring global variables.
base | Start of the array to be sorted |
nmemb | Number of elements in the array |
size | Size of each array element |
compar | Comparison function, return <0/0/>0 to compare two elements |
arg | Opaque argument to pass to compar |
Definition at line 76 of file qsort_r.c.