summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-04-05 22:35:03 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-04-05 22:35:03 (GMT)
commit4402e696e43e4428a37953edbfd67c448ba93ac1 (patch)
treeb2cffca0aa461b4e0440d18cfc16cab9258e98d7 /hl/tools
parent4d459e1cebb8b4ba3e74054ac5501603dc2698c2 (diff)
downloadhdf5-4402e696e43e4428a37953edbfd67c448ba93ac1.zip
hdf5-4402e696e43e4428a37953edbfd67c448ba93ac1.tar.gz
hdf5-4402e696e43e4428a37953edbfd67c448ba93ac1.tar.bz2
Normalized high-level library with develop
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/gif2h5/gif.h6
-rw-r--r--hl/tools/gif2h5/gifread.c4
-rw-r--r--hl/tools/gif2h5/h52gifgentst.c2
-rw-r--r--hl/tools/gif2h5/hdfgifwr.c16
-rw-r--r--hl/tools/h5watch/h5watch.c7
5 files changed, 18 insertions, 17 deletions
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 6cfcdea..dd9e5be 100644
--- a/hl/tools/gif2h5/gifread.c
+++ b/hl/tools/gif2h5/gifread.c
@@ -38,7 +38,7 @@ GetWord(GIFBYTE *MemGif)
}
GIFBYTE
-GetByte(GIFBYTE *MemGif)
+GetByte(const GIFBYTE *MemGif)
{
return *MemGif;
}
@@ -65,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/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c
index 62dbd71..ba2e4f5 100644
--- a/hl/tools/gif2h5/h52gifgentst.c
+++ b/hl/tools/gif2h5/h52gifgentst.c
@@ -22,7 +22,7 @@
*
* Purpose: generate files for h52gif testing
*
- * Programmer: Pedro Vicente, pvn@hdfgroup.org
+ * Programmer: Pedro Vicente
*
* Date: March 15, 2007
*
diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c
index 333c808..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;
@@ -152,12 +152,12 @@ hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap
}
/* Shut compiler up... */
- ptype = ptype;
- rmap = rmap;
- gmap = gmap;
- bmap = bmap;
- numcols = numcols;
- colorstyle = colorstyle;
+ (void)ptype;
+ (void)rmap;
+ (void)gmap;
+ (void)bmap;
+ (void)numcols;
+ (void)colorstyle;
for (i = 0; i < 256; i++) {
pc2nc[i] = pc2ncmap[i];
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index d5aa878..a5e82ca 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);
@@ -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 */
@@ -340,7 +340,8 @@ monitor_dataset(hid_t fid, char *dsetname)
if (i != ndims) {
/* Printing changes in dimension sizes */
for (u = 0; u < ndims; u++) {
- HDfprintf(stdout, "dimension %u: %Hu->%Hu", (unsigned)u, prev_dims[u], cur_dims[u]);
+ HDfprintf(stdout, "dimension %d: %" PRIuHSIZE "->%" PRIuHSIZE "", u, prev_dims[u],
+ cur_dims[u]);
if (cur_dims[u] > prev_dims[u])
HDfprintf(stdout, " (increases)\n");
else if (cur_dims[u] < prev_dims[u])