From 22bb267000716e0e78d0faad274d874d41c31e51 Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Mon, 7 Apr 2025 03:20:37 +0200 Subject: [PATCH] bughunt in meanqs --- qsort.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qsort.h b/qsort.h index 118b9ae..0850b7a 100644 --- a/qsort.h +++ b/qsort.h @@ -4,6 +4,9 @@ #include +/* Uncomment for debugging with if(someevent) raise(SIGINT); */ +#include + /* Structure: * * - BASICS: Basic quicksort @@ -368,6 +371,10 @@ static inline int partition_with_pivotval(uint32_t array[], int low, int high, u } } + // TODO: Remove debug stuff + printf("array[%d]: %d <---> %d :array[%d] @ pivotval: %u\n", i, array[i], array[pivoti], pivoti, pivotval); + if(pivotval == 2147494598u) raise(SIGINT); + /* swap the pivot element into its place */ swapit(&array[i], &array[pivoti]);