summaryrefslogtreecommitdiffstats
path: root/tools/src/misc
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-05 18:50:06 (GMT)
committerGitHub <noreply@github.com>2023-09-05 18:50:06 (GMT)
commitae1379094b71c51342772397af5caca088862a61 (patch)
treee79cb67a1227bfdec099f62e9df22917213b8a7d /tools/src/misc
parentd24f5d5223731d507b51d112ba564d764d6d6c18 (diff)
downloadhdf5-ae1379094b71c51342772397af5caca088862a61.zip
hdf5-ae1379094b71c51342772397af5caca088862a61.tar.gz
hdf5-ae1379094b71c51342772397af5caca088862a61.tar.bz2
hbool_t/TRUE/FALSE --> bool/true/false in tools (#3491)
Diffstat (limited to 'tools/src/misc')
-rw-r--r--tools/src/misc/h5clear.c18
-rw-r--r--tools/src/misc/h5debug.c6
-rw-r--r--tools/src/misc/h5delete.c4
-rw-r--r--tools/src/misc/h5mkgrp.c34
-rw-r--r--tools/src/misc/h5repart.c22
5 files changed, 42 insertions, 42 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 2272626..d1ea0c3 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -34,10 +34,10 @@
#define DEFAULT_INCREMENT (1024 * 1024)
static char *fname_g = NULL;
-static hbool_t clear_status_flags = FALSE;
-static hbool_t remove_cache_image = FALSE;
-static hbool_t print_filesize = FALSE;
-static hbool_t increment_eoa_eof = FALSE;
+static bool clear_status_flags = false;
+static bool remove_cache_image = false;
+static bool print_filesize = false;
+static bool increment_eoa_eof = false;
static hsize_t increment = DEFAULT_INCREMENT;
/*
@@ -130,19 +130,19 @@ parse_command_line(int argc, const char *const *argv)
goto done;
case 's':
- clear_status_flags = TRUE;
+ clear_status_flags = true;
break;
case 'm':
- remove_cache_image = TRUE;
+ remove_cache_image = true;
break;
case 'z':
- print_filesize = TRUE;
+ print_filesize = true;
break;
case 'i':
- increment_eoa_eof = TRUE;
+ increment_eoa_eof = true;
if (H5_optarg != NULL) {
if (atoi(H5_optarg) < 0) {
usage(h5tools_getprogname());
@@ -308,7 +308,7 @@ main(int argc, char *argv[])
}
/* Open the file */
- if ((fid = h5tools_fopen(fname, flags, fapl, FALSE, NULL, (size_t)0)) < 0) {
+ if ((fid = h5tools_fopen(fname, flags, fapl, false, NULL, (size_t)0)) < 0) {
error_msg("h5tools_fopen\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index fa93244..c93d9c6 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -233,7 +233,7 @@ main(int argc, char *argv[])
size_t u;
H5E_auto2_t func = NULL;
void *edata = NULL;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t status = SUCCEED;
int exit_value = 0;
@@ -280,7 +280,7 @@ main(int argc, char *argv[])
exit_value = 1;
goto done;
}
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(fid))) {
fprintf(stderr, "cannot obtain vol_obj pointer\n");
@@ -807,7 +807,7 @@ done:
/* Pop API context */
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
H5Eset_auto2(H5E_DEFAULT, func, edata);
diff --git a/tools/src/misc/h5delete.c b/tools/src/misc/h5delete.c
index f996d8d..c3c8bf0 100644
--- a/tools/src/misc/h5delete.c
+++ b/tools/src/misc/h5delete.c
@@ -31,7 +31,7 @@ usage(void)
int
main(int argc, char *argv[])
{
- hbool_t quiet = FALSE;
+ bool quiet = false;
const char *name = NULL;
int ret = 0;
@@ -41,7 +41,7 @@ main(int argc, char *argv[])
usage();
return EXIT_FAILURE;
}
- quiet = TRUE;
+ quiet = true;
name = argv[2];
break;
case 2:
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index 31deb8b..baf3b9b 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -30,13 +30,13 @@ static struct h5_long_options l_opts[] = {
/* Command line parameter settings */
typedef struct mkgrp_opt_t {
- char *fname; /* File name to operate on */
- hbool_t latest; /* Whether file should use latest format versions */
- hbool_t verbose; /* Whether output should be verbose */
- hbool_t parents; /* Whether to create intermediate groups */
- size_t ngroups; /* Number of groups to create */
- char **groups; /* Pointer to array of group names */
- hid_t fapl_id; /* fapl to use when opening the file */
+ char *fname; /* File name to operate on */
+ bool latest; /* Whether file should use latest format versions */
+ bool verbose; /* Whether output should be verbose */
+ bool parents; /* Whether to create intermediate groups */
+ size_t ngroups; /* Number of groups to create */
+ char **groups; /* Pointer to array of group names */
+ hid_t fapl_id; /* fapl to use when opening the file */
} mkgrp_opt_t;
static mkgrp_opt_t params_g; /* Command line parameter settings */
@@ -135,8 +135,8 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
{
int opt; /* Option from command line */
size_t curr_group; /* Current group name to copy */
- hbool_t custom_vol = FALSE;
- hbool_t custom_vfd = FALSE;
+ bool custom_vol = false;
+ bool custom_vfd = false;
h5tools_vol_info_t vol_info;
h5tools_vfd_info_t vfd_info;
hid_t tmp_fapl_id = H5I_INVALID_HID;
@@ -162,17 +162,17 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
/* Create objects with the latest version of the format */
case 'l':
- options->latest = TRUE;
+ options->latest = true;
break;
/* Create parent groups */
case 'p':
- options->parents = TRUE;
+ options->parents = true;
break;
/* Verbose output */
case 'v':
- options->verbose = TRUE;
+ options->verbose = true;
break;
/* Display version */
@@ -184,13 +184,13 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '1':
vol_info.type = VOL_BY_VALUE;
vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- custom_vol = TRUE;
+ custom_vol = true;
break;
case '2':
vol_info.type = VOL_BY_NAME;
vol_info.u.name = H5_optarg;
- custom_vol = TRUE;
+ custom_vol = true;
break;
case '3':
@@ -200,13 +200,13 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '4':
vfd_info.type = VFD_BY_VALUE;
vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- custom_vfd = TRUE;
+ custom_vfd = true;
break;
case '5':
vfd_info.type = VFD_BY_NAME;
vfd_info.u.name = H5_optarg;
- custom_vfd = TRUE;
+ custom_vfd = true;
break;
case '6':
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
/* Check for creating intermediate groups */
if (params_g.parents) {
/* Set the intermediate group creation property */
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0) {
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0) {
error_msg("Could not set property for creating parent groups\n");
leave(EXIT_FAILURE);
}
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index e7bf055..818a489 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -146,11 +146,11 @@ main(int argc, char *argv[])
ssize_t nio; /*I/O return value */
int argno = 1; /*program argument number */
int src, dst = -1; /*source & destination files */
- int need_seek = FALSE; /*destination needs to seek? */
+ int need_seek = false; /*destination needs to seek? */
int need_write; /*data needs to be written? */
h5_stat_t sb; /*temporary file stat buffer */
- int verbose = FALSE; /*display file names? */
+ int verbose = false; /*display file names? */
const char *src_gen_name; /*general source name */
char *src_name = NULL; /*source member name */
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
hid_t fapl; /*file access property list */
hid_t file;
hsize_t hdsize; /*destination logical memb size */
- hbool_t family_to_single = FALSE; /*change family to single file driver? */
+ bool family_to_single = false; /*change family to single file driver? */
/*
* Get the program name from argv[0]. Use only the last component.
@@ -187,7 +187,7 @@ main(int argc, char *argv[])
*/
while (argno < argc && '-' == argv[argno][0]) {
if (!HDstrcmp(argv[argno], "-v")) {
- verbose = TRUE;
+ verbose = true;
argno++;
}
else if (!HDstrcmp(argv[argno], "-V")) {
@@ -196,11 +196,11 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
else if (!HDstrcmp(argv[argno], "-family_to_sec2")) {
- family_to_single = TRUE;
+ family_to_single = true;
argno++;
}
else if (!HDstrcmp(argv[argno], "-family_to_single")) {
- family_to_single = TRUE;
+ family_to_single = true;
argno++;
}
else if ('b' == argv[argno][1]) {
@@ -278,7 +278,7 @@ main(int argc, char *argv[])
if (left_overs) {
n = (size_t)MIN((off_t)n, left_overs);
left_overs = left_overs - (off_t)n;
- need_write = FALSE;
+ need_write = false;
}
else if (src_offset < src_act_size) {
n = (size_t)MIN((off_t)n, src_act_size - src_offset);
@@ -299,7 +299,7 @@ main(int argc, char *argv[])
else {
n = 0;
left_overs = src_size - src_act_size;
- need_write = FALSE;
+ need_write = false;
}
/*
@@ -320,10 +320,10 @@ main(int argc, char *argv[])
fprintf(stderr, "%s: short write\n", dst_name);
exit(EXIT_FAILURE);
}
- need_seek = FALSE;
+ need_seek = false;
}
else {
- need_seek = TRUE;
+ need_seek = true;
}
/*
@@ -395,7 +395,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
dst_offset = 0;
- need_seek = FALSE;
+ need_seek = false;
if (verbose)
fprintf(stderr, "> %s\n", dst_name);
}