summaryrefslogtreecommitdiffstats
path: root/hl/tools/h5watch
diff options
context:
space:
mode:
authorjrmainzer <72230804+jrmainzer@users.noreply.github.com>2021-11-23 01:20:56 (GMT)
committerGitHub <noreply@github.com>2021-11-23 01:20:56 (GMT)
commit28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4 (patch)
tree0ac1b135f2c8a8bd9dbb980ebdbeb36dcf89f2c2 /hl/tools/h5watch
parent65d6d256cf9d04dbeb275025cc2b01d0f36ed3f1 (diff)
parent68c00b3fa1c0f4ba9b8e9724beb1d0b0b31f69ad (diff)
downloadhdf5-28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4.zip
hdf5-28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4.tar.gz
hdf5-28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4.tar.bz2
Merge pull request #1217 from jrmainzer/selection_io_with_subfiling_vfd
Selection io with subfiling vfd
Diffstat (limited to 'hl/tools/h5watch')
-rw-r--r--hl/tools/h5watch/h5watch.c64
-rw-r--r--hl/tools/h5watch/h5watchgentest.c4
-rw-r--r--hl/tools/h5watch/swmr_check_compat_vfd.c2
3 files changed, 35 insertions, 35 deletions
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index 8d7f4ec..afbc31d 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -43,7 +43,7 @@ static unsigned g_retry = DEFAULT_RETRY; /* # of times to try opening the file
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 herr_t doprint(hid_t did, hsize_t *start, hsize_t *block, int rank);
+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,
int rank, int subrank);
static herr_t monitor_dataset(hid_t fid, char *dsetname);
@@ -58,27 +58,27 @@ static void parse_command_line(int argc, const char *argv[]);
* The long-named ones can be partially spelled. When
* adding more, make sure that they don't clash with each other.
*/
-static const char * s_opts = "?";
-static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, 'h'},
- {"dim", no_arg, 'd'}, {"di", no_arg, 'd'},
- {"label", no_arg, 'l'}, {"labe", no_arg, 'l'},
- {"lab", no_arg, 'l'}, {"la", no_arg, 'l'},
- {"simple", no_arg, 'S'}, {"simpl", no_arg, 'S'},
- {"simp", no_arg, 'S'}, {"sim", no_arg, 'S'},
- {"si", no_arg, 'S'}, {"hexdump", no_arg, 'x'},
- {"hexdum", no_arg, 'x'}, {"hexdu", no_arg, 'x'},
- {"hexd", no_arg, 'x'}, {"hex", no_arg, 'x'},
- {"width", require_arg, 'w'}, {"widt", require_arg, 'w'},
- {"wid", require_arg, 'w'}, {"wi", require_arg, 'w'},
- {"polling", require_arg, 'p'}, {"pollin", require_arg, 'p'},
- {"polli", require_arg, 'p'}, {"poll", require_arg, 'p'},
- {"pol", require_arg, 'p'}, {"po", require_arg, 'p'},
- {"fields", require_arg, 'f'}, {"field", require_arg, 'f'},
- {"fiel", require_arg, 'f'}, {"fie", require_arg, 'f'},
- {"fi", require_arg, 'f'}, {"version", no_arg, 'V'},
- {"versio", no_arg, 'V'}, {"versi", no_arg, 'V'},
- {"vers", no_arg, 'V'}, {"ver", no_arg, 'V'},
- {"ve", no_arg, 'V'}, {NULL, 0, '\0'}};
+static const char * s_opts = "?";
+static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, 'h'},
+ {"dim", no_arg, 'd'}, {"di", no_arg, 'd'},
+ {"label", no_arg, 'l'}, {"labe", no_arg, 'l'},
+ {"lab", no_arg, 'l'}, {"la", no_arg, 'l'},
+ {"simple", no_arg, 'S'}, {"simpl", no_arg, 'S'},
+ {"simp", no_arg, 'S'}, {"sim", no_arg, 'S'},
+ {"si", no_arg, 'S'}, {"hexdump", no_arg, 'x'},
+ {"hexdum", no_arg, 'x'}, {"hexdu", no_arg, 'x'},
+ {"hexd", no_arg, 'x'}, {"hex", no_arg, 'x'},
+ {"width", require_arg, 'w'}, {"widt", require_arg, 'w'},
+ {"wid", require_arg, 'w'}, {"wi", require_arg, 'w'},
+ {"polling", require_arg, 'p'}, {"pollin", require_arg, 'p'},
+ {"polli", require_arg, 'p'}, {"poll", require_arg, 'p'},
+ {"pol", require_arg, 'p'}, {"po", require_arg, 'p'},
+ {"fields", require_arg, 'f'}, {"field", require_arg, 'f'},
+ {"fiel", require_arg, 'f'}, {"fie", require_arg, 'f'},
+ {"fi", require_arg, 'f'}, {"version", no_arg, 'V'},
+ {"versio", no_arg, 'V'}, {"versi", no_arg, 'V'},
+ {"vers", no_arg, 'V'}, {"ver", no_arg, 'V'},
+ {"ve", no_arg, 'V'}, {NULL, 0, '\0'}};
/*-------------------------------------------------------------------------
* Function: doprint()
@@ -95,7 +95,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no
*-------------------------------------------------------------------------
*/
static herr_t
-doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
+doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank)
{
h5tools_context_t ctx; /* print context */
h5tool_format_t info; /* Format info for the tools library */
@@ -677,7 +677,7 @@ parse_command_line(int argc, const char *argv[])
}
/* parse command line options */
- while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
+ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case '?':
case 'h': /* --help */
@@ -691,7 +691,7 @@ parse_command_line(int argc, const char *argv[])
break;
case 'w': /* --width=N */
- g_display_width = (int)HDstrtol(opt_arg, NULL, 0);
+ g_display_width = (int)HDstrtol(H5_optarg, NULL, 0);
if (g_display_width < 0) {
usage(h5tools_getprogname());
leave(EXIT_FAILURE);
@@ -711,8 +711,8 @@ parse_command_line(int argc, const char *argv[])
break;
case 'p': /* --polling=N */
- /* g_polling_interval = HDstrtod(opt_arg, NULL); */
- if ((tmp = (int)HDstrtol(opt_arg, NULL, 10)) <= 0) {
+ /* g_polling_interval = HDstrtod(H5_optarg, NULL); */
+ if ((tmp = (int)HDstrtol(H5_optarg, NULL, 10)) <= 0) {
usage(h5tools_getprogname());
leave(EXIT_FAILURE);
}
@@ -721,7 +721,7 @@ parse_command_line(int argc, const char *argv[])
case 'f': /* --fields=<list_of_fields> */
if (g_list_of_fields == NULL) {
- if ((g_list_of_fields = HDstrdup(opt_arg)) == NULL) {
+ if ((g_list_of_fields = HDstrdup(H5_optarg)) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
leave(EXIT_FAILURE);
}
@@ -729,7 +729,7 @@ parse_command_line(int argc, const char *argv[])
else {
char *str;
- if ((str = HDstrdup(opt_arg)) == NULL) {
+ if ((str = HDstrdup(H5_optarg)) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
leave(EXIT_FAILURE);
}
@@ -751,7 +751,7 @@ parse_command_line(int argc, const char *argv[])
}
/* check for object to be processed */
- if (argc <= opt_ind) {
+ if (argc <= H5_optind) {
error_msg("missing dataset name\n");
usage(h5tools_getprogname());
leave(EXIT_FAILURE);
@@ -821,7 +821,7 @@ main(int argc, const char *argv[])
/* parse command line options */
parse_command_line(argc, argv);
- if (argc <= opt_ind) {
+ if (argc <= H5_optind) {
error_msg("missing dataset name\n");
usage(h5tools_getprogname());
leave(EXIT_FAILURE);
@@ -845,7 +845,7 @@ main(int argc, const char *argv[])
* then there must have been something wrong with the file (perhaps it
* doesn't exist).
*/
- if ((fname = HDstrdup(argv[opt_ind])) == NULL) {
+ if ((fname = HDstrdup(argv[H5_optind])) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c
index c83e485..44cb0cb 100644
--- a/hl/tools/h5watch/h5watchgentest.c
+++ b/hl/tools/h5watch/h5watchgentest.c
@@ -224,7 +224,7 @@ main(void)
one_cbuf[i].field2.b.a = 20;
one_cbuf[i].field2.b.b = 40;
one_cbuf[i].field2.b.c = 80;
- one_cbuf[i].field3 = 3.0F;
+ one_cbuf[i].field3 = 3.0;
one_cbuf[i].field4.a = 4;
one_cbuf[i].field4.b = 8;
} /* end for */
@@ -313,7 +313,7 @@ main(void)
two_cbuf[i].field2.b.a = 20;
two_cbuf[i].field2.b.b = 40;
two_cbuf[i].field2.b.c = 80;
- two_cbuf[i].field3 = 3.0F;
+ two_cbuf[i].field3 = 3.0;
two_cbuf[i].field4.a = 4;
two_cbuf[i].field4.b = 8;
} /* end for */
diff --git a/hl/tools/h5watch/swmr_check_compat_vfd.c b/hl/tools/h5watch/swmr_check_compat_vfd.c
index a2340bf..b4021e4 100644
--- a/hl/tools/h5watch/swmr_check_compat_vfd.c
+++ b/hl/tools/h5watch/swmr_check_compat_vfd.c
@@ -45,7 +45,7 @@ main(void)
{
char *driver = NULL;
- driver = HDgetenv("HDF5_DRIVER");
+ driver = HDgetenv(HDF5_DRIVER);
if (H5FD__supports_swmr_test(driver))
return EXIT_SUCCESS;