summaryrefslogtreecommitdiffstats
path: root/tools/src/h5jam
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-28 11:42:41 (GMT)
committerGitHub <noreply@github.com>2023-07-28 11:42:41 (GMT)
commitf563c2b926445f7a975553bc7742a38f42d3b6f4 (patch)
treefd21684ce4e86bd32d945ba1bd3d8065dbcf194f /tools/src/h5jam
parentfe4b1c572841fff38a6b9422ea63d345ccfa96bf (diff)
downloadhdf5-f563c2b926445f7a975553bc7742a38f42d3b6f4.zip
hdf5-f563c2b926445f7a975553bc7742a38f42d3b6f4.tar.gz
hdf5-f563c2b926445f7a975553bc7742a38f42d3b6f4.tar.bz2
Sync tools with develop (#3301)
Diffstat (limited to 'tools/src/h5jam')
-rw-r--r--tools/src/h5jam/h5jam.c8
-rw-r--r--tools/src/h5jam/h5unjam.c11
2 files changed, 9 insertions, 10 deletions
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index 4043c73..6f318a4 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -23,10 +23,10 @@ hsize_t compute_user_block_size(hsize_t);
hsize_t copy_some_to_file(int, int, hsize_t, hsize_t, ssize_t);
void parse_command_line(int, const char *const *);
-int do_clobber = FALSE;
-char *output_file = NULL;
-char *input_file = NULL;
-char *ub_file = NULL;
+static int do_clobber = FALSE;
+static char *output_file = NULL;
+static char *input_file = NULL;
+static char *ub_file = NULL;
/*
* Command-line options: The user can specify short or long-named
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index d606e94..d752014 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -108,7 +108,6 @@ parse_command_line(int argc, const char *const *argv)
if (input_file)
h5tools_set_input_file(input_file, 1);
break;
- ;
case 'u':
ub_file = HDstrdup(H5_optarg);
@@ -335,12 +334,12 @@ copy_to_file(FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much)
HDfseek(infid, from, SEEK_SET);
/* Read data to buffer */
- bytes_read = HDfread(buf, (size_t)1, bytes_in, infid);
- if (0 == bytes_read && HDferror(infid)) {
+ bytes_read = fread(buf, (size_t)1, bytes_in, infid);
+ if (0 == bytes_read && ferror(infid)) {
ret_value = -1;
goto done;
} /* end if */
- if (0 == bytes_read && HDfeof(infid)) {
+ if (0 == bytes_read && feof(infid)) {
goto done;
} /* end if */
@@ -353,8 +352,8 @@ copy_to_file(FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much)
to += (off_t)bytes_read;
/* Write nchars bytes to output file */
- bytes_wrote = HDfwrite(buf, (size_t)1, bytes_read, ofid);
- if (bytes_wrote != bytes_read || (0 == bytes_wrote && HDferror(ofid))) { /* error */
+ bytes_wrote = fwrite(buf, (size_t)1, bytes_read, ofid);
+ if (bytes_wrote != bytes_read || (0 == bytes_wrote && ferror(ofid))) { /* error */
ret_value = -1;
goto done;
} /* end if */