Modular C
C◼real◼float◼qsort◼qsort: symbols inserted from C◼tmpl◼qsort.
+ Collaboration diagram for C◼real◼float◼qsort◼qsort: symbols inserted from C◼tmpl◼qsort.:
void C◼real◼float◼qsort (C◼size nmemb, C◼real◼float base[nmemb])
 A type safe sorting interface. More...
 
#define C◼real◼float◼qsort(A, B)   /* The first _Generic is just for the type check. */ /* The one and only choice can only work when one of the arguments */ /* is a `T*` and the other an integer. */ _Generic((A)+(B), C◼real◼float*: _Generic((A)+0ULL, C◼real◼float*: C◼real◼float◼qsort((C◼uintptr)(B), (void*)(A)), unsigned long long: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)), float: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)), double: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)), long double: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)) ))
 A type safe sorting interface. More...
 

Detailed Description

See also
C◼tmpl◼qsort snippet: identifiers inserted directly to an importer for details
This import uses the following slot(s)
slotreplacement
C◼tmpl◼qsort◼TC◼real◼float
C◼tmpl◼qsort◼funcC◼real◼float◼qsort
C◼tmpl◼qsort◼comparC◼real◼float◼compar

Macro Definition Documentation

§ C◼real◼float◼qsort

#define C◼real◼float◼qsort (   A,
 
)    /* The first _Generic is just for the type check. */ /* The one and only choice can only work when one of the arguments */ /* is a `T*` and the other an integer. */ _Generic((A)+(B), C◼real◼float*: _Generic((A)+0ULL, C◼real◼float*: C◼real◼float◼qsort((C◼uintptr)(B), (void*)(A)), unsigned long long: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)), float: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)), double: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)), long double: C◼real◼float◼qsort((C◼uintptr)(A), (void*)(B)) ))

A type safe sorting interface.

This interface allows to have one of A and B to be a pointer to T and the other a number.

Definition at line 154 of file C-real-float-qsort.c.

Function Documentation

§ C◼real◼float◼qsort()

void C◼real◼float◼qsort ( C◼size  nmemb,
C◼real◼float  base[nmemb] 
)
inline

A type safe sorting interface.

Definition at line 142 of file C-real-float-qsort.c.

References C◼lib◼qsort(), and C◼real◼float◼compar().

142  {
143 #line 19 "/home/gustedt/build/cmod/C/C-tmpl-qsort.X"
144  C◼lib◼qsort(base, nmemb, sizeof(base[0]), C◼real◼float◼compar);
145 }
void C◼lib◼qsort(void *, C◼lib◼size, C◼lib◼size, int(*)(void const *, const void *))
int C◼real◼float◼compar(void const *av, void const *bv)
A comparison function as it is needed by C◼tmpl◼bsearch and C◼tmpl◼qsort.
+ Here is the call graph for this function: