Skip to content

Commit

Permalink
hbool_t/TRUE/FALSE --> bool/true/false in tools (#3491)
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins authored Sep 5, 2023
1 parent d24f5d5 commit ae13790
Show file tree
Hide file tree
Showing 57 changed files with 1,405 additions and 1,409 deletions.
24 changes: 12 additions & 12 deletions tools/lib/h5diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
}
else if (ret_value == 0) {
/* no dangling link option given and detect dangling link */
tinfo->symlink_visited.dangle_link = TRUE;
tinfo->symlink_visited.dangle_link = true;
trav_info_visit_lnk(path, linfo, tinfo);
if (opts->no_dangle_links)
opts->err_stat = H5DIFF_ERR; /* make dangling link is error */
Expand All @@ -523,7 +523,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
if (symlink_visit_add(&(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path) < 0)
H5TOOLS_GOTO_DONE(SUCCEED);

if (h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, tinfo,
if (h5trav_visit(tinfo->fid, path, true, true, trav_grp_objs, trav_grp_symlinks, tinfo,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = H5DIFF_ERR;
Expand All @@ -537,7 +537,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
}
else if (ret_value == 0) {
/* no dangling link option given and detect dangling link */
tinfo->symlink_visited.dangle_link = TRUE;
tinfo->symlink_visited.dangle_link = true;
trav_info_visit_lnk(path, linfo, tinfo);
if (opts->no_dangle_links)
opts->err_stat = H5DIFF_ERR; /* make dangling link is error */
Expand All @@ -555,7 +555,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
if (symlink_visit_add(&(tinfo->symlink_visited), linfo->type, ext_fname, ext_path) < 0)
H5TOOLS_GOTO_DONE(SUCCEED);

if (h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, tinfo,
if (h5trav_visit(tinfo->fid, path, true, true, trav_grp_objs, trav_grp_symlinks, tinfo,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = H5DIFF_ERR;
Expand Down Expand Up @@ -961,15 +961,15 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char

both_objs_grp = (obj1type == H5TRAV_TYPE_GROUP && obj2type == H5TRAV_TYPE_GROUP);
if (both_objs_grp) {
H5TOOLS_DEBUG("h5diff both_objs_grp TRUE");
H5TOOLS_DEBUG("h5diff both_objs_grp true");
/*
* traverse group1
*/
trav_info_init(fname1, file1_id, &info1_grp);
/* optional data pass */
info1_grp->opts = (diff_opt_t *)opts;

if (h5trav_visit(file1_id, obj1fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info1_grp,
if (h5trav_visit(file1_id, obj1fullname, true, true, trav_grp_objs, trav_grp_symlinks, info1_grp,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not get file contents");
Expand All @@ -983,7 +983,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
/* optional data pass */
info2_grp->opts = (diff_opt_t *)opts;

if (h5trav_visit(file2_id, obj2fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info2_grp,
if (h5trav_visit(file2_id, obj2fullname, true, true, trav_grp_objs, trav_grp_symlinks, info2_grp,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not get file contents");
Expand Down Expand Up @@ -1534,9 +1534,9 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
hid_t type2_id = H5I_INVALID_HID;
hid_t grp1_id = H5I_INVALID_HID;
hid_t grp2_id = H5I_INVALID_HID;
hbool_t is_dangle_link1 = FALSE;
hbool_t is_dangle_link2 = FALSE;
hbool_t is_hard_link = FALSE;
bool is_dangle_link1 = false;
bool is_dangle_link2 = false;
bool is_hard_link = false;
hsize_t nfound = 0;
h5trav_type_t object_type;
diff_err_t ret_value = opts->err_stat;
Expand Down Expand Up @@ -1577,7 +1577,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "dangling link is error");
}
else
is_dangle_link1 = TRUE;
is_dangle_link1 = true;
}

/* target object2 - get type and name */
Expand All @@ -1592,7 +1592,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "dangling link is error");
}
else
is_dangle_link2 = TRUE;
is_dangle_link2 = true;
}

/* found dangling link */
Expand Down
8 changes: 4 additions & 4 deletions tools/lib/h5diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*------------------------------------------------------------------------*/
typedef struct {
h5trav_type_t type[2];
hbool_t is_same_trgobj;
bool is_same_trgobj;
} diff_args_t;
/*-------------------------------------------------------------------------
* command line options
Expand Down Expand Up @@ -61,7 +61,7 @@ typedef struct {
int use_system_epsilon; /* flag to use system epsilon (1 or 0) */
int percent_bool; /* relative error to compare*/
double percent; /* relative error value */
hbool_t follow_links; /* follow symbolic links */
bool follow_links; /* follow symbolic links */
int no_dangle_links; /* return error when find dangling link */
int cmn_objs; /* do we have common objects */
int not_cmp; /* are the objects comparable */
Expand Down Expand Up @@ -90,8 +90,8 @@ typedef struct {
struct subset_t *sset[2]; /* subsetting parameters */
h5tools_vol_info_t vol_info[2]; /* VOL information for input file, output file */
h5tools_vfd_info_t vfd_info[2]; /* VFD information for input file, output file */
hbool_t custom_vol[2]; /* Using a custom input, output VOL? */
hbool_t custom_vfd[2]; /* Using a custom input, output VFD? */
bool custom_vol[2]; /* Using a custom input, output VOL? */
bool custom_vfd[2]; /* Using a custom input, output VFD? */
} diff_opt_t;

/*-------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit ae13790

Please sign in to comment.