diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-16 15:55:19 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-16 15:55:19 -0400 |
commit | e223e635cc53fa11e473cdbc864eb69a3da5f290 (patch) | |
tree | d481ca6fb0b7f4184f3ec259a6f9c37d76e56a26 /src/stdlib/qsort_s.c | |
parent | 700fbd205a1a428677876d322606b9a354221892 (diff) |
add skeleton of symbols from C11 LIB_EXT1
Diffstat (limited to 'src/stdlib/qsort_s.c')
-rw-r--r-- | src/stdlib/qsort_s.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/stdlib/qsort_s.c b/src/stdlib/qsort_s.c new file mode 100644 index 00000000..da12d505 --- /dev/null +++ b/src/stdlib/qsort_s.c @@ -0,0 +1,29 @@ +#include "stdlib.h" + +/** sort an array **/ +errno_t qsort_s(void *base, rsize_t nmemb, rsize_t size, + int (*compar)(const void * x, const void * y, void *context), + void * context) +{ + __C_EXT(1, 201112L); + /* TODO */ +} + +/*** +The fn(qsort) function sorts the array at arg(base), which consists of +arg(nmemb) elements of arg(size) bytes each. + +The sorting is performed by calling arg(compar) with two elements of the array. +The function must return less than 0 if the first argument is less than the +second, 0 if they are equal, and greater than 0 if the first argument is +greater than the second. +***/ + +/* UNSPECIFIED: the order of equal elements */ +/* UNDEFINED: - */ +/* IMPLEMENTATION: - */ +/* LOCALE: - */ + +/* +CEXT1(201112) +*/ |