diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 18:50:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 18:50:06 (GMT) |
commit | ae1379094b71c51342772397af5caca088862a61 (patch) | |
tree | e79cb67a1227bfdec099f62e9df22917213b8a7d /tools/test/perform | |
parent | d24f5d5223731d507b51d112ba564d764d6d6c18 (diff) | |
download | hdf5-ae1379094b71c51342772397af5caca088862a61.zip hdf5-ae1379094b71c51342772397af5caca088862a61.tar.gz hdf5-ae1379094b71c51342772397af5caca088862a61.tar.bz2 |
hbool_t/TRUE/FALSE --> bool/true/false in tools (#3491)
Diffstat (limited to 'tools/test/perform')
-rw-r--r-- | tools/test/perform/overhead.c | 38 | ||||
-rw-r--r-- | tools/test/perform/perf_meta.c | 18 | ||||
-rw-r--r-- | tools/test/perform/zip_perf.c | 16 |
3 files changed, 36 insertions, 36 deletions
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c index 90d5897..00a35bb 100644 --- a/tools/test/perform/overhead.c +++ b/tools/test/perform/overhead.c @@ -40,12 +40,12 @@ #endif #define FILE_NAME_1 "overhead.h5" -#ifndef FALSE -#define FALSE 0 -#endif /* FALSE */ -#ifndef TRUE -#define TRUE 1 -#endif /* TRUE */ +#ifndef false +#define false 0 +#endif /* false */ +#ifndef true +#define true 1 +#endif /* true */ typedef enum fill_t { FILL_ALL, FILL_FORWARD, FILL_REVERSE, FILL_INWARD, FILL_OUTWARD, FILL_RANDOM } fill_t; @@ -142,7 +142,7 @@ display_error_cb(hid_t estack, void H5_ATTR_UNUSED *client_data) *------------------------------------------------------------------------- */ static int -test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc) +test(fill_t fill_style, const double splits[], bool verbose, bool use_rdcc) { hid_t file = (-1), fapl = (-1), dcpl = (-1), xfer = (-1), mspace = (-1), fspace = (-1), dset = (-1); hsize_t ch_size[1] = {1}; /*chunk size */ @@ -312,11 +312,11 @@ error: int main(int argc, char *argv[]) { - hid_t xfer; - fill_t fill_style = FILL_ALL; - hbool_t use_cache = FALSE; - double splits[3]; - int i, j, nerrors = 0; + hid_t xfer; + fill_t fill_style = FILL_ALL; + bool use_cache = false; + double splits[3]; + int i, j, nerrors = 0; /* Default split ratios */ H5Eset_auto2(H5E_DEFAULT, display_error_cb, NULL); @@ -346,7 +346,7 @@ main(int argc, char *argv[]) fill_style = FILL_RANDOM; } else if (!strcmp(argv[i], "cache")) { - use_cache = TRUE; + use_cache = true; } else if (j < 3 && (isdigit(argv[i][0]) || '.' == argv[i][0])) { splits[j++] = strtod(argv[i], NULL); @@ -359,16 +359,16 @@ main(int argc, char *argv[]) if (FILL_ALL == fill_style) { printf("%-7s %8s\n", "Style", "Bytes/Chunk"); printf("%-7s %8s\n", "-----", "-----------"); - nerrors += test(FILL_FORWARD, splits, FALSE, use_cache); - nerrors += test(FILL_REVERSE, splits, FALSE, use_cache); - nerrors += test(FILL_INWARD, splits, FALSE, use_cache); - nerrors += test(FILL_OUTWARD, splits, FALSE, use_cache); - nerrors += test(FILL_RANDOM, splits, FALSE, use_cache); + nerrors += test(FILL_FORWARD, splits, false, use_cache); + nerrors += test(FILL_REVERSE, splits, false, use_cache); + nerrors += test(FILL_INWARD, splits, false, use_cache); + nerrors += test(FILL_OUTWARD, splits, false, use_cache); + nerrors += test(FILL_RANDOM, splits, false, use_cache); } else { if (use_cache) usage(argv[0]); - nerrors += test(fill_style, splits, TRUE, FALSE); + nerrors += test(fill_style, splits, true, false); } if (nerrors > 0) goto error; diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c index 16df60a..6762f7c 100644 --- a/tools/test/perform/perf_meta.c +++ b/tools/test/perform/perf_meta.c @@ -33,13 +33,13 @@ static int TEST_3 = 0x4; /* Test 3 */ static const char *FILENAME[] = {"meta_perf_1", "meta_perf_2", "meta_perf_3", NULL}; /* Default values for performance. Can be changed through command line options */ -static int NUM_DSETS = 16; -static int NUM_ATTRS = 8; -static int BATCH_ATTRS = 2; -static hbool_t flush_dset = FALSE; -static hbool_t flush_attr = FALSE; -static int nerrors = 0; /* errors count */ -static hid_t fapl; +static int NUM_DSETS = 16; +static int NUM_ATTRS = 8; +static int BATCH_ATTRS = 2; +static bool flush_dset = false; +static bool flush_attr = false; +static int nerrors = 0; /* errors count */ +static hid_t fapl; /* Data space IDs */ static hid_t space; @@ -117,9 +117,9 @@ parse_options(int argc, char **argv) case 'f': /* Call H5Fflush for each dataset or attribute */ if (!strcmp("a", (*argv + 2))) - flush_attr = TRUE; + flush_attr = true; else if (!strcmp("d", (*argv + 2))) - flush_dset = TRUE; + flush_dset = true; else { nerrors++; return (1); diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index b8b80e8..61bb6c0 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -36,13 +36,13 @@ /* report 0.0 in case t is zero too */ #define MB_PER_SEC(bytes, t) ((fabs(t) < 0.0000000001) ? 0.0 : ((((double)(bytes)) / (double)ONE_MB) / (t))) -#ifndef TRUE -#define TRUE 1 -#endif /* TRUE */ +#ifndef true +#define true 1 +#endif /* true */ -#ifndef FALSE -#define FALSE (!TRUE) -#endif /* FALSE */ +#ifndef false +#define false (!true) +#endif /* false */ #ifndef S_IRWXU #define S_IRWXU (_S_IREAD | _S_IWRITE) @@ -54,7 +54,7 @@ static const char *option_prefix = NULL; static char *filename = NULL; static int compress_percent = 0; static int compress_level = Z_DEFAULT_COMPRESSION; -static int output, random_test = FALSE; +static int output, random_test = false; static int report_once_flag; static double compression_time; @@ -500,7 +500,7 @@ main(int argc, char *argv[]) option_prefix = H5_optarg; break; case 'r': - random_test = TRUE; + random_test = true; break; case 's': file_size = parse_size_directive(H5_optarg); |