Modular C
C◼int◼qsort◼qsort: symbols inserted from C◼tmpl◼qsort.
+ Collaboration diagram for C◼int◼qsort◼qsort: symbols inserted from C◼tmpl◼qsort.:
void C◼int◼qsort (C◼size nmemb, C◼int base[nmemb])
 A type safe sorting interface. More...
 
#define C◼int◼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◼int*: _Generic((A)+0ULL, C◼int*: C◼int◼qsort((C◼uintptr)(B), (void*)(A)), unsigned long long: C◼int◼qsort((C◼uintptr)(A), (void*)(B)), float: C◼int◼qsort((C◼uintptr)(A), (void*)(B)), double: C◼int◼qsort((C◼uintptr)(A), (void*)(B)), long double: C◼int◼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◼int
C◼tmpl◼qsort◼funcC◼int◼qsort
C◼tmpl◼qsort◼comparC◼int◼compar

Macro Definition Documentation

§ C◼int◼qsort

#define C◼int◼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◼int*: _Generic((A)+0ULL, C◼int*: C◼int◼qsort((C◼uintptr)(B), (void*)(A)), unsigned long long: C◼int◼qsort((C◼uintptr)(A), (void*)(B)), float: C◼int◼qsort((C◼uintptr)(A), (void*)(B)), double: C◼int◼qsort((C◼uintptr)(A), (void*)(B)), long double: C◼int◼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 153 of file C-int-qsort.c.

Function Documentation

§ C◼int◼qsort()

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

A type safe sorting interface.

Definition at line 141 of file C-int-qsort.c.

References C◼int◼compar(), and C◼lib◼qsort().

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