summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-28 00:42:48 (GMT)
committerGitHub <noreply@github.com>2023-06-28 00:42:48 (GMT)
commitd278ce1f21903c33c6b28e8acb827e94275d4421 (patch)
treed52c322015ac8ce3b8fb992958ab8be1f13d4886 /hl/tools
parent942739e6fbea0ebf736c35f461e1386396b54e11 (diff)
downloadhdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.zip
hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.tar.gz
hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.tar.bz2
Remove HD/hbool_t from high-level lib (#3183)
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/gif2h5/hdf2gif.c2
-rw-r--r--hl/tools/h5watch/extend_dset.c60
-rw-r--r--hl/tools/h5watch/h5watch.c165
-rw-r--r--hl/tools/h5watch/h5watchgentest.c16
4 files changed, 121 insertions, 122 deletions
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c
index 8805c80..120e42e 100644
--- a/hl/tools/gif2h5/hdf2gif.c
+++ b/hl/tools/gif2h5/hdf2gif.c
@@ -46,7 +46,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
static FILE *fpGif = NULL;
diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c
index 97abbc6..443a759 100644
--- a/hl/tools/h5watch/extend_dset.c
+++ b/hl/tools/h5watch/extend_dset.c
@@ -85,9 +85,9 @@ extend_dset_two(const char *file, char *dname, int action1, int action2)
set_t *cbuf = NULL; /* buffer for storing retrieved elements (compound) */
/* Allocate memory */
- if (NULL == (ibuf = (int *)HDcalloc(TEST_BUF_SIZE, sizeof(int))))
+ if (NULL == (ibuf = (int *)calloc(TEST_BUF_SIZE, sizeof(int))))
goto error;
- if (NULL == (cbuf = (set_t *)HDcalloc(TEST_BUF_SIZE, sizeof(set_t))))
+ if (NULL == (cbuf = (set_t *)calloc(TEST_BUF_SIZE, sizeof(set_t))))
goto error;
/* Create a copy of file access property list */
@@ -146,9 +146,9 @@ 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)) {
- HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ memset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
for (i = 0; i < num_elmts; i++) {
cbuf[i].field1 = action1;
cbuf[i].field2.a = action1;
@@ -166,7 +166,7 @@ extend_dset_two(const char *file, char *dname, int action1, int action2)
goto error;
}
else { /* Integer type */
- HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ memset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
for (i = 0; i < num_elmts; i++)
ibuf[i] = action1;
@@ -189,9 +189,9 @@ extend_dset_two(const char *file, char *dname, int action1, int action2)
goto error;
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return SUCCEED;
@@ -204,9 +204,9 @@ error:
H5E_END_TRY
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return FAIL;
@@ -239,9 +239,9 @@ extend_dset_one(const char *file, char *dname, int action)
set_t *cbuf = NULL; /* buffer for storing retrieved elements (compound) */
/* Allocate memory */
- if (NULL == (ibuf = (int *)HDcalloc(TEST_BUF_SIZE, sizeof(int))))
+ if (NULL == (ibuf = (int *)calloc(TEST_BUF_SIZE, sizeof(int))))
goto error;
- if (NULL == (cbuf = (set_t *)HDcalloc(TEST_BUF_SIZE, sizeof(set_t))))
+ if (NULL == (cbuf = (set_t *)calloc(TEST_BUF_SIZE, sizeof(set_t))))
goto error;
/* Create a copy of file access property list */
@@ -305,9 +305,9 @@ 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)) {
- HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ memset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
for (i = 0; i < action; i++) {
cbuf[i].field1 = i + 1;
cbuf[i].field2.a = i + 2;
@@ -328,7 +328,7 @@ extend_dset_one(const char *file, char *dname, int action)
}
else { /* Integer type */
- HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ memset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
for (i = 0; i < action; i++)
ibuf[i] = (int)i;
@@ -358,9 +358,9 @@ extend_dset_one(const char *file, char *dname, int action)
goto error;
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return SUCCEED;
@@ -375,9 +375,9 @@ error:
H5E_END_TRY
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return FAIL;
} /* end extend_dset_one() */
@@ -398,40 +398,40 @@ main(int argc, char *argv[])
int action1, action2;
if (argc != 5) {
- HDfprintf(stderr, "Should have file name, dataset name, and the extended amount...\n");
+ fprintf(stderr, "Should have file name, dataset name, and the extended amount...\n");
goto error;
} /* end if */
/* Get the dataset name to be extended */
fname = HDstrdup(argv[1]);
dname = HDstrdup(argv[2]);
- action1 = HDatoi(argv[3]);
- action2 = HDatoi(argv[4]);
+ 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;
}
else {
- HDfprintf(stdout, "Dataset cannot be extended...\n");
+ fprintf(stdout, "Dataset cannot be extended...\n");
goto error;
} /* end if-else */
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
if (dname)
- HDfree(dname);
+ free(dname);
if (fname)
- HDfree(fname);
- HDexit(EXIT_FAILURE);
+ free(fname);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index 102ff93..d2c0d90 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -32,15 +32,15 @@ static char *g_list_of_fields = NULL; /* command line input for "li
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,
@@ -121,11 +121,11 @@ doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank)
subset.block.data[i] = block[i];
} /* end for */
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.sset = &subset;
/* Set to all default values and then override */
- HDmemset(&info, 0, sizeof info);
+ memset(&info, 0, sizeof info);
if (g_simple_output) {
info.idx_fmt = "";
@@ -192,14 +192,14 @@ 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. */
if ((ret_value = h5tools_dump_dset(stdout, &info, &ctx, did)) < 0)
error_msg("unable to print data\n");
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
return ret_value;
@@ -292,7 +292,7 @@ monitor_dataset(hid_t fid, char *dsetname)
hsize_t cur_dims[H5S_MAX_RANK]; /* previous dataspace dimensions */
herr_t ret_value = SUCCEED; /* return value */
- HDfprintf(stdout, "Monitoring dataset %s...\n", dsetname);
+ fprintf(stdout, "Monitoring dataset %s...\n", dsetname);
/* Open the dataset for minitoring */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
@@ -312,7 +312,7 @@ monitor_dataset(hid_t fid, char *dsetname)
ret_value = FAIL;
goto done;
}
- HDfflush(stdout);
+ fflush(stdout);
/* Loop until an error occurs or the user interrupts execution */
while (!g_user_interrupt) {
@@ -339,14 +339,13 @@ monitor_dataset(hid_t fid, char *dsetname)
if (i != ndims) {
/* Printing changes in dimension sizes */
for (u = 0; u < ndims; u++) {
- HDfprintf(stdout, "dimension %d: %" PRIuHSIZE "->%" PRIuHSIZE "", u, prev_dims[u],
- cur_dims[u]);
+ fprintf(stdout, "dimension %d: %" PRIuHSIZE "->%" PRIuHSIZE "", u, prev_dims[u], cur_dims[u]);
if (cur_dims[u] > prev_dims[u])
- HDfprintf(stdout, " (increases)\n");
+ fprintf(stdout, " (increases)\n");
else if (cur_dims[u] < prev_dims[u])
- HDfprintf(stdout, " (decreases)\n");
+ fprintf(stdout, " (decreases)\n");
else
- HDfprintf(stdout, " (unchanged)\n");
+ fprintf(stdout, " (unchanged)\n");
}
/* Printing elements appended to the dataset if there is */
@@ -360,7 +359,7 @@ monitor_dataset(hid_t fid, char *dsetname)
/* Print the new appended data to the dataset */
if (cur_dims[u] > prev_dims[u]) {
- HDfprintf(stdout, " Data:\n");
+ fprintf(stdout, " Data:\n");
for (j = 0; j < ndims; j++) {
start[j] = 0;
@@ -374,17 +373,17 @@ monitor_dataset(hid_t fid, char *dsetname)
}
} /* end for */
}
- HDfflush(stdout);
+ fflush(stdout);
}
/* Save the current dimension sizes */
- HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t));
+ memcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t));
/* Sleep before next monitor */
HDsleep(g_polling_interval);
} /* end while */
- HDfflush(stdout);
+ fflush(stdout);
done:
/* Closing */
@@ -415,7 +414,7 @@ process_cmpd_fields(hid_t fid, char *dsetname)
size_t len; /* number of comma-separated fields in "g_list_of_fields" */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(g_list_of_fields && *g_list_of_fields);
+ assert(g_list_of_fields && *g_list_of_fields);
/* Open the dataset */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
@@ -446,10 +445,10 @@ 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 **)HDcalloc(len, sizeof(H5LD_memb_t *))) == NULL) {
+ if ((g_listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *))) == NULL) {
error_msg("error in allocating memory for H5LD_memb_t\n");
ret_value = FAIL;
goto done;
@@ -496,7 +495,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;
@@ -532,8 +531,8 @@ check_dataset(hid_t fid, char *dsetname)
goto done;
}
- HDmemset(cur_dims, 0, sizeof cur_dims);
- HDmemset(max_dims, 0, sizeof max_dims);
+ memset(cur_dims, 0, sizeof cur_dims);
+ memset(max_dims, 0, sizeof max_dims);
/* Get dataset's dataspace */
if ((sid = H5Dget_space(did)) < 0) {
@@ -552,7 +551,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;
}
@@ -608,46 +607,46 @@ leave(int ret)
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "Usage: %s [OPTIONS] [OBJECT]\n", prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " --help Print a usage message and exit.\n");
- HDfprintf(stdout, " --version Print version number and exit.\n");
- HDfprintf(stdout, " --label Label members of compound typed dataset.\n");
- HDfprintf(stdout, " --simple Use a machine-readable output format.\n");
- HDfprintf(stdout, " --dim Monitor changes in size of dataset dimensions only.\n");
- HDfprintf(stdout, " --width=N Set the number of columns to N for output.\n");
- HDfprintf(stdout, " A value of 0 sets the number of columns to the\n");
- HDfprintf(stdout, " maximum (65535). The default width is 80 columns.\n");
- HDfprintf(stdout, " --polling=N Set the polling interval to N (in seconds) when the\n");
- HDfprintf(stdout,
- " dataset will be checked for appended data. The default\n");
- HDfprintf(stdout, " polling interval is 1.\n");
- HDfprintf(stdout, " --fields=<list_of_fields>\n");
- HDfprintf(stdout,
- " Display data for the fields specified in <list_of_fields>\n");
- HDfprintf(stdout, " for a compound data type. <list_of_fields> can be\n");
- HDfprintf(stdout, " specified as follows:\n");
- HDfprintf(stdout, " 1) A comma-separated list of field names in a\n");
- HDfprintf(stdout, " compound data type. \",\" is the separator\n");
- HDfprintf(stdout, " for field names while \".\" is the separator\n");
- HDfprintf(stdout, " for a nested field.\n");
- HDfprintf(stdout, " 2) A single field name in a compound data type.\n");
- HDfprintf(stdout, " Can use this option multiple times.\n");
- HDfprintf(stdout, " Note that backslash is the escape character to avoid\n");
- HDfprintf(stdout,
- " characters in field names that conflict with the tool's\n");
- HDfprintf(stdout, " separators.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]\n");
- HDfprintf(stdout, " <filename> Name of the HDF5 file. It may be preceded by path\n");
- HDfprintf(stdout, " separated by slashes to the specified HDF5 file.\n");
- HDfprintf(stdout, " <path_to_dataset> Path separated by slashes to the specified dataset\n");
- HDfprintf(stdout, " <dsetname> Name of the dataset\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout,
- " User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).\n");
+ fflush(stdout);
+ fprintf(stdout, "Usage: %s [OPTIONS] [OBJECT]\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, " OPTIONS\n");
+ fprintf(stdout, " --help Print a usage message and exit.\n");
+ fprintf(stdout, " --version Print version number and exit.\n");
+ fprintf(stdout, " --label Label members of compound typed dataset.\n");
+ fprintf(stdout, " --simple Use a machine-readable output format.\n");
+ fprintf(stdout, " --dim Monitor changes in size of dataset dimensions only.\n");
+ fprintf(stdout, " --width=N Set the number of columns to N for output.\n");
+ fprintf(stdout, " A value of 0 sets the number of columns to the\n");
+ fprintf(stdout, " maximum (65535). The default width is 80 columns.\n");
+ fprintf(stdout, " --polling=N Set the polling interval to N (in seconds) when the\n");
+ fprintf(stdout,
+ " dataset will be checked for appended data. The default\n");
+ fprintf(stdout, " polling interval is 1.\n");
+ fprintf(stdout, " --fields=<list_of_fields>\n");
+ fprintf(stdout,
+ " Display data for the fields specified in <list_of_fields>\n");
+ fprintf(stdout, " for a compound data type. <list_of_fields> can be\n");
+ fprintf(stdout, " specified as follows:\n");
+ fprintf(stdout, " 1) A comma-separated list of field names in a\n");
+ fprintf(stdout, " compound data type. \",\" is the separator\n");
+ fprintf(stdout, " for field names while \".\" is the separator\n");
+ fprintf(stdout, " for a nested field.\n");
+ fprintf(stdout, " 2) A single field name in a compound data type.\n");
+ fprintf(stdout, " Can use this option multiple times.\n");
+ fprintf(stdout, " Note that backslash is the escape character to avoid\n");
+ fprintf(stdout,
+ " characters in field names that conflict with the tool's\n");
+ fprintf(stdout, " separators.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]\n");
+ fprintf(stdout, " <filename> Name of the HDF5 file. It may be preceded by path\n");
+ fprintf(stdout, " separated by slashes to the specified HDF5 file.\n");
+ fprintf(stdout, " <path_to_dataset> Path separated by slashes to the specified dataset\n");
+ fprintf(stdout, " <dsetname> Name of the dataset\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout,
+ " User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).\n");
} /* usage() */
@@ -698,15 +697,15 @@ 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 */
@@ -732,13 +731,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 *)HDrealloc(
- 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;
@@ -773,7 +772,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() */
/*-------------------------------------------------------------------------
@@ -864,17 +863,17 @@ 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) {
- HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername);
+ fprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername);
break; /*success*/
} /* end if */
/* Shorten the file name; lengthen the object name */
x = dname;
- dname = HDstrrchr(fname, '/');
+ dname = strrchr(fname, '/');
if (x)
*x = '/';
if (!dname)
@@ -928,17 +927,17 @@ main(int argc, char *argv[])
done:
/* Free spaces */
if (fname)
- HDfree(fname);
+ free(fname);
if (dname)
- HDfree(dname);
+ free(dname);
if (g_list_of_fields)
- HDfree(g_list_of_fields);
+ free(g_list_of_fields);
if (g_listv) {
H5LD_clean_vector(g_listv);
- HDfree(g_listv);
+ free(g_listv);
}
if (g_dup_fields)
- HDfree(g_dup_fields);
+ free(g_dup_fields);
/* Close the file access property list */
if (fapl >= 0 && H5Pclose(fapl) < 0) {
diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c
index 5b8cf07..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 */
@@ -172,14 +172,14 @@ main(void)
/* Create a copy of file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Create a file with the latest format */
if ((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Initialization for one-dimensional dataset */
cur_dims[0] = ONE_DIMS0;
@@ -341,7 +341,7 @@ main(void)
if (H5Fclose(fid) < 0)
goto done;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
done:
H5E_BEGIN_TRY
@@ -356,5 +356,5 @@ done:
H5Fclose(fid);
H5E_END_TRY
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */