From 32c96afc3c2c78e15c0e05560b4e08f8cdc2437e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 5 Feb 2023 01:49:25 +0100 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- sorting.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sorting.c (limited to 'sorting.c') diff --git a/sorting.c b/sorting.c new file mode 100644 index 0000000..e4bfdaf --- /dev/null +++ b/sorting.c @@ -0,0 +1,25 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" +#ifndef TEST + + +int +doublepcmp(const void *avp, const void *bvp) +{ + const double *ap = avp; + const double *bp = bvp; + return (*ap > *bp) - (*ap < *bp); +} + + +#else + + +int +main(void) +{ + return 0; /* TODO add test */ +} + + +#endif -- cgit v1.2.3-70-g09d2