|
Graphviz 14.0.3~dev.20251104.0241
|
qsort with carried along context
More...
#include <assert.h>#include <stdlib.h>Go to the source code of this file.
Functions | |
| static int | gv_sort_compar_wrapper (const void *a, const void *b) |
| static void | gv_sort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *, void *), void *arg) |
qsort with an extra state parameter, ala qsort_r | |
Variables | |
| static _Thread_local int(* | gv_sort_compar )(const void *, const void *, void *) |
| static _Thread_local void * | gv_sort_arg |
The non-standard qsort_r, Windows’ qsort_s, and C11’s qsort_s provide a qsort alternative with an extra state parameter. Unfortunately none of these are easily usable portably in Graphviz. This header implements an alternative that hopefully is.
Definition in file sort.h.
|
inlinestatic |
Definition at line 24 of file sort.h.
References gv_sort_arg, gv_sort_compar, gv_sort_compar_wrapper(), and NULL.
Referenced by arrayRects(), find_closest_pairs(), quicksort_place(), quicksort_place(), and quicksort_placef().
|
inlinestatic |
Definition at line 18 of file sort.h.
References gv_sort_arg, gv_sort_compar, and NULL.
Referenced by gv_sort().
|
static |
Definition at line 16 of file sort.h.
Referenced by gv_sort(), and gv_sort_compar_wrapper().
|
static |
Definition at line 15 of file sort.h.
Referenced by gv_sort(), and gv_sort_compar_wrapper().