bughunt in meanqs
This commit is contained in:
parent
04705b5790
commit
22bb267000
7
qsort.h
7
qsort.h
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/* Uncomment for debugging with if(someevent) raise(SIGINT); */
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
/* Structure:
|
/* Structure:
|
||||||
*
|
*
|
||||||
* - BASICS: Basic quicksort
|
* - 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 */
|
/* swap the pivot element into its place */
|
||||||
swapit(&array[i], &array[pivoti]);
|
swapit(&array[i], &array[pivoti]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user