P99
Macros | Functions
p99_qsort.h File Reference

An implementation of a sorting routine. More...

#include "p99_rand.h"
#include "p99_arith.h"
+ Include dependency graph for p99_qsort.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define P99_ALIGNOF(B)
 
#define qsort_s(B, N, S, CMP, CTX)
 A generic sorting routine. More...
 

Functions

bool p99_is_sorted (void *p00_base, rsize_t p00_n, rsize_t p00_s, int(*p00_comp)(const void *, const void *, void *), void *p00_ctx)
 Check if the array passed in as p00_base is sorted. More...
 
rsize_t p99_mismatch (void *p00_base, rsize_t p00_n, rsize_t p00_s, int(*p00_comp)(const void *, const void *, void *), void *p00_ctx)
 Check if the array passed in as p00_base is sorted and return the first mismatch if it is not. More...
 

Detailed Description

An implementation of a sorting routine.

Definition in file p99_qsort.h.

rsize_t
size_t rsize_t
Definition: p99_libc.h:164
P99_GENERIC
#define P99_GENERIC(...)
Type generic expression in anticipation of C11 _Generic.
Definition: p99_generic.h:707
ulong
unsigned long ulong
a ‘one token’ abreviation for unsigned long
Definition: p99_typenames.h:38
schar
signed char schar
a ‘one token’ abreviation for signed char
Definition: p99_typenames.h:45
ldouble
long double ldouble
a ‘one token’ abreviation for long double
Definition: p99_typenames.h:49
cfloat
float _Complex cfloat
a ‘one token’ abreviation for float _Complex
Definition: p99_typenames.h:51
cdouble
double _Complex cdouble
a ‘one token’ abreviation for double _Complex
Definition: p99_typenames.h:52
ullong
unsigned long long ullong
a ‘one token’ abreviation for unsigned long long
Definition: p99_typenames.h:48
llong
long long llong
a ‘one token’ abreviation for long long
Definition: p99_typenames.h:46
qsort_s
#define qsort_s(B, N, S, CMP, CTX)
A generic sorting routine.
Definition: p99_qsort.h:496
ushort
unsigned short ushort
a ‘one token’ abreviation for unsigned short
Definition: p99_typenames.h:42
cldouble
long double _Complex cldouble
a ‘one token’ abreviation for long double _Complex
Definition: p99_typenames.h:53
errno_t
int errno_t
Definition: p99_type.h:38
uchar
unsigned char uchar
a ‘one token’ abreviation for unsigned char
Definition: p99_typenames.h:44
void_ptr
void * void_ptr
a pointer to void
Definition: p99_typenames.h:70