diff options
Diffstat (limited to 'hl/tools/h5watch')
-rw-r--r-- | hl/tools/h5watch/extend_dset.c | 12 | ||||
-rw-r--r-- | hl/tools/h5watch/h5watch.c | 46 | ||||
-rw-r--r-- | hl/tools/h5watch/h5watchgentest.c | 6 |
3 files changed, 32 insertions, 32 deletions
diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c index 59c5eb7..443a759 100644 --- a/hl/tools/h5watch/extend_dset.c +++ b/hl/tools/h5watch/extend_dset.c @@ -146,7 +146,7 @@ extend_dset_two(const char *file, char *dname, int action1, int action2) num_elmts *= (unsigned)ext_dims[i]; /* Compound type */ - if (!HDstrcmp(dname, DSET_CMPD_TWO)) { + if (!strcmp(dname, DSET_CMPD_TWO)) { memset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); for (i = 0; i < num_elmts; i++) { @@ -305,7 +305,7 @@ extend_dset_one(const char *file, char *dname, int action) /* Initialize data for the extended region of the dataset */ /* Compound type */ - if (!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { + if (!strcmp(dname, DSET_CMPD) || !strcmp(dname, DSET_CMPD_ESC)) { memset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); for (i = 0; i < action; i++) { @@ -408,16 +408,16 @@ main(int argc, char *argv[]) action1 = atoi(argv[3]); action2 = atoi(argv[4]); - if (!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { + if (!strcmp(dname, DSET_CMPD) || !strcmp(dname, DSET_CMPD_ESC)) { if (extend_dset_one(fname, dname, action1) < 0) goto error; } - else if (!HDstrcmp(dname, DSET_ONE) || !HDstrcmp(dname, DSET_ALLOC_LATE) || - !HDstrcmp(dname, DSET_ALLOC_EARLY)) { + else if (!strcmp(dname, DSET_ONE) || !strcmp(dname, DSET_ALLOC_LATE) || + !strcmp(dname, DSET_ALLOC_EARLY)) { if (extend_dset_one(fname, dname, action1) < 0) goto error; } - else if (!HDstrcmp(dname, DSET_TWO) || !HDstrcmp(dname, DSET_CMPD_TWO)) { + else if (!strcmp(dname, DSET_TWO) || !strcmp(dname, DSET_CMPD_TWO)) { if (extend_dset_two(fname, dname, action1, action2) < 0) goto error; } diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index 1b6bfba..876b5d5 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -27,20 +27,20 @@ * This tool uses H5LD_memb_t data structure declared in H5LDprivate.h */ -const char *progname = "h5watch"; /* tool name */ +static const char *progname = "h5watch"; /* tool name */ static char *g_list_of_fields = NULL; /* command line input for "list_of_fields" */ static char *g_dup_fields = NULL; /* copy of "list_of_fields" */ static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */ -static hbool_t g_monitor_size_only = FALSE; /* monitor changes in dataset dimension sizes */ +static bool g_monitor_size_only = false; /* monitor changes in dataset dimension sizes */ static unsigned g_polling_interval = 1; /* polling interval to check appended data */ -static hbool_t g_label = FALSE; /* label compound values */ +static bool g_label = false; /* label compound values */ static int g_display_width = 80; /* output width in characters */ -static hbool_t g_simple_output = FALSE; /* make output more machine-readable */ +static bool g_simple_output = false; /* make output more machine-readable */ static unsigned g_retry = DEFAULT_RETRY; /* # of times to try opening the file if somehow file is unstable */ -static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */ -static hbool_t g_user_interrupt = FALSE; /* Flag to indicate that user interrupted execution */ +static bool g_display_hex = false; /* display data in hexadecimal format : LATER */ +static bool g_user_interrupt = false; /* Flag to indicate that user interrupted execution */ static herr_t doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank); static herr_t slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims, hsize_t *start, hsize_t *block, @@ -190,7 +190,7 @@ doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank) if (g_display_hex) { /* Print all data in hexadecimal format if the `-x' or `--hexdump' * command line switch was given. */ - info.raw = TRUE; + info.raw = true; } /* end if */ /* Print the values. */ @@ -437,7 +437,7 @@ process_cmpd_fields(hid_t fid, char *dsetname) } /* Estimate the number of comma-separated fields in "g_list of_fields" */ - len = HDstrlen(g_list_of_fields) / 2 + 2; + len = strlen(g_list_of_fields) / 2 + 2; /* Allocate memory for a list vector of H5LD_memb_t structures to store "g_list_of_fields" info */ if ((g_listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *))) == NULL) { @@ -485,7 +485,7 @@ check_dataset(hid_t fid, char *dsetname) unsigned u; /* Local index variable */ hsize_t cur_dims[H5S_MAX_RANK]; /* size of dataspace dimensions */ hsize_t max_dims[H5S_MAX_RANK]; /* maximum size of dataspace dimensions */ - hbool_t unlim_max_dims = FALSE; /* whether dataset has unlimited or max. dimension setting */ + bool unlim_max_dims = false; /* whether dataset has unlimited or max. dimension setting */ void *edata; H5E_auto2_t func; H5D_layout_t layout; @@ -541,7 +541,7 @@ check_dataset(hid_t fid, char *dsetname) /* Check whether dataset has unlimited dimension or max. dimension setting */ for (u = 0; u < (unsigned)ndims; u++) if (max_dims[u] == H5S_UNLIMITED || cur_dims[u] != max_dims[u]) { - unlim_max_dims = TRUE; + unlim_max_dims = true; break; } @@ -673,7 +673,7 @@ parse_command_line(int argc, const char *const *argv) break; case 'w': /* --width=N */ - g_display_width = (int)HDstrtol(H5_optarg, NULL, 0); + g_display_width = (int)strtol(H5_optarg, NULL, 0); if (g_display_width < 0) { usage(h5tools_getprogname()); leave(EXIT_FAILURE); @@ -681,20 +681,20 @@ parse_command_line(int argc, const char *const *argv) break; case 'd': /* --dim */ - g_monitor_size_only = TRUE; + g_monitor_size_only = true; break; case 'S': /* --simple */ - g_simple_output = TRUE; + g_simple_output = true; break; case 'l': /* --label */ - g_label = TRUE; + g_label = true; break; case 'p': /* --polling=N */ - /* g_polling_interval = HDstrtod(H5_optarg, NULL); */ - if ((tmp = (int)HDstrtol(H5_optarg, NULL, 10)) <= 0) { + /* g_polling_interval = strtod(H5_optarg, NULL); */ + if ((tmp = (int)strtol(H5_optarg, NULL, 10)) <= 0) { usage(h5tools_getprogname()); leave(EXIT_FAILURE); } @@ -715,13 +715,13 @@ parse_command_line(int argc, const char *const *argv) error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__); leave(EXIT_FAILURE); } - if ((g_list_of_fields = (char *)realloc( - g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) { + if ((g_list_of_fields = (char *)realloc(g_list_of_fields, strlen(g_list_of_fields) + + strlen(str) + 2)) == NULL) { error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__); leave(EXIT_FAILURE); } - HDstrcat(g_list_of_fields, FIELD_SEP); - HDstrcat(g_list_of_fields, str); + strcat(g_list_of_fields, FIELD_SEP); + strcat(g_list_of_fields, str); } break; @@ -754,7 +754,7 @@ static void catch_signal(int H5_ATTR_UNUSED signo) { /* Set the flag to get out of the main loop */ - g_user_interrupt = TRUE; + g_user_interrupt = true; } /* catch_signal() */ /*------------------------------------------------------------------------- @@ -843,7 +843,7 @@ main(int argc, char *argv[]) do { while (fname && *fname) { - fid = h5tools_fopen(fname, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl, FALSE, drivername, + fid = h5tools_fopen(fname, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl, false, drivername, sizeof drivername); if (fid >= 0) { @@ -853,7 +853,7 @@ main(int argc, char *argv[]) /* Shorten the file name; lengthen the object name */ x = dname; - dname = HDstrrchr(fname, '/'); + dname = strrchr(fname, '/'); if (x) *x = '/'; if (!dname) diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c index 9fda9be..ef47926 100644 --- a/hl/tools/h5watch/h5watchgentest.c +++ b/hl/tools/h5watch/h5watchgentest.c @@ -103,7 +103,7 @@ generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *m goto done; /* Set up dataset's creation properties */ - if (!HDstrcmp(dname, DSET_NONE)) + if (!strcmp(dname, DSET_NONE)) dcpl = H5P_DEFAULT; else { if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -114,11 +114,11 @@ generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *m goto done; } /* end else */ - if (!HDstrcmp(dname, DSET_ALLOC_LATE)) { + if (!strcmp(dname, DSET_ALLOC_LATE)) { if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0) goto done; } - else if (!HDstrcmp(dname, DSET_ALLOC_EARLY)) { + else if (!strcmp(dname, DSET_ALLOC_EARLY)) { if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) goto done; } /* end if-else */ |