diff options
Diffstat (limited to 'numsort.c')
-rw-r--r-- | numsort.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,6 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdint.h> +#include <stdbool.h> #include <string.h> #include <math.h> #include <limits.h> @@ -21,7 +22,7 @@ ** The following constant NUMARRAYSIZE determines the ** default # of elements in each numeric array */ -#define ARRAY_SIZE 8111L +#define ARRAY_SIZE 8111 static clock_t DoNumSortIteration(long *array, unsigned int num_arrays); static void LoadNumArrayWithRand(long *array, unsigned int num_arrays); @@ -44,10 +45,10 @@ DoNumSort (void) clock_t total_time = 0; int iterations = 0; static int num_arrays = 1; - static int is_adjusted = FALSE; + static bool is_adjusted = false; - if (is_adjusted == FALSE) { - is_adjusted = TRUE; + if (is_adjusted == false) { + is_adjusted = true; /* ** Self-is_adjustedment code. The system begins by sorting 1 ** array. If it does that in no time, then two arrays |