summaryrefslogtreecommitdiffstats
path: root/hl/tools
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
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')
-rw-r--r--hl/tools/COPYING13
-rw-r--r--hl/tools/gif2h5/gif.h6
-rw-r--r--hl/tools/gif2h5/gifread.c7
-rw-r--r--hl/tools/gif2h5/hdfgifwr.c4
-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
7 files changed, 45 insertions, 55 deletions
diff --git a/hl/tools/COPYING b/hl/tools/COPYING
deleted file mode 100644
index 97969da..0000000
--- a/hl/tools/COPYING
+++ /dev/null
@@ -1,13 +0,0 @@
-
- Copyright by The HDF Group and
- The Board of Trustees of the University of Illinois.
- All rights reserved.
-
- The files and subdirectories in this directory are part of HDF5.
- The full HDF5 copyright notice, including terms governing use,
- modification, and redistribution, is contained in the COPYING file
- which can be found at the root of the source code distribution tree
- or in https://www.hdfgroup.org/licenses. If you do
- not have access to either file, you may request a copy from
- help@hdfgroup.org.
-
diff --git a/hl/tools/gif2h5/gif.h b/hl/tools/gif2h5/gif.h
index 2b4a344..1a8cfe4 100644
--- a/hl/tools/gif2h5/gif.h
+++ b/hl/tools/gif2h5/gif.h
@@ -157,8 +157,8 @@ int ReadGifApplication(GIFAPPLICATION *, GIFBYTE **);
int ReadGifComment(GIFCOMMENT *, GIFBYTE **);
/* HDFGIFWR.C */
-int hdfWriteGIF(FILE *fp, GIFBYTE *pic, int ptype, int w, int h, GIFBYTE *rmap, GIFBYTE *gmap, GIFBYTE *bmap,
- GIFBYTE *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel);
+int hdfWriteGIF(FILE *fp, GIFBYTE *pic, int ptype, int w, int h, const GIFBYTE *rmap, const GIFBYTE *gmap,
+ const GIFBYTE *bmap, const GIFBYTE *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel);
/* WRITEHDF.C */
int WriteHDF(GIFTOMEM, GIFCHAR *);
@@ -176,7 +176,7 @@ int ReadHDF(GIFBYTE **data, GIFBYTE palette[256][3], hsize_t *image_size, GIFCHA
GIFCHAR *dset_name, GIFCHAR *pal_name);
GIFBYTE *Decompress(GIFIMAGEDESC *, GIFHEAD *);
-GIFBYTE GetByte(GIFBYTE *);
+GIFBYTE GetByte(const GIFBYTE *);
GIFWORD GetWord(GIFBYTE *);
void cleanup(GIFBYTE *);
diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c
index b88264b..dd9e5be 100644
--- a/hl/tools/gif2h5/gifread.c
+++ b/hl/tools/gif2h5/gifread.c
@@ -38,7 +38,10 @@ GetWord(GIFBYTE *MemGif)
}
GIFBYTE
-GetByte(GIFBYTE *MemGif) { return *MemGif; }
+GetByte(const GIFBYTE *MemGif)
+{
+ return *MemGif;
+}
/*
* Read a GIF image GIFBYTE Header.
@@ -62,7 +65,7 @@ ReadGifHeader(GIFHEAD * GifHead, /* Pointer to GIF header structure */
GifHead->HeaderDump[i] = *(*MemGif2)++;
}
- if (strncmp((const char *)GifHead->HeaderDump, "GIF", (size_t)3)) {
+ if (strncmp((const char *)GifHead->HeaderDump, "GIF", (size_t)3) != 0) {
printf("The file does not appear to be a valid GIF file.\n");
exit(EXIT_FAILURE);
}
diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c
index 8068829..21b14d1 100644
--- a/hl/tools/gif2h5/hdfgifwr.c
+++ b/hl/tools/gif2h5/hdfgifwr.c
@@ -135,8 +135,8 @@ static int EOFCode;
/*************************************************************/
int
-hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap, byte *bmap, byte *pc2ncmap,
- int numcols, int colorstyle, int BitsPerPixel)
+hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, const byte *rmap, const byte *gmap,
+ const byte *bmap, const byte *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel)
{
int InitCodeSize;
int i;
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;