diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-29 15:19:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 15:19:31 (GMT) |
commit | fd56a593b7928da636b2494b25cd7478fed78c29 (patch) | |
tree | b815098d8bcf67f4290d3ca74132ce793503b94e /tools/src/h5jam | |
parent | 8aef67f0ae3e037df22c5319eb2eac8b95521b19 (diff) | |
download | hdf5-fd56a593b7928da636b2494b25cd7478fed78c29.zip hdf5-fd56a593b7928da636b2494b25cd7478fed78c29.tar.gz hdf5-fd56a593b7928da636b2494b25cd7478fed78c29.tar.bz2 |
Remove HD from C std lib file ops (#3206)
* HDfclose
* HDferror
* HDfeof
* HDfflush
* HDfopen
* HDfread
* HDfwrite
Diffstat (limited to 'tools/src/h5jam')
-rw-r--r-- | tools/src/h5jam/h5jam.c | 2 | ||||
-rw-r--r-- | tools/src/h5jam/h5unjam.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index 04b29ea..6f318a4 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -49,7 +49,7 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", requir static void usage(const char *prog) { - HDfflush(stdout); + fflush(stdout); fprintf(stdout, "usage: %s -i <in_file.h5> -u <in_user_file> [-o <out_file.h5>] [--clobber]\n", prog); fprintf(stdout, "\n"); fprintf(stdout, "Adds user block to front of an HDF5 file and creates a new concatenated file.\n"); diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index 077f128..d752014 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/h5jam/h5unjam.c @@ -50,7 +50,7 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", require static void usage(const char *prog) { - HDfflush(stdout); + fflush(stdout); fprintf(stdout, "usage: %s -i <in_file.h5> [-o <out_file.h5> ] [-u <out_user_file> | --delete]\n", prog); fprintf(stdout, "\n"); fprintf(stdout, "Splits user file and HDF5 file into two files: user block data and HDF5 data.\n"); @@ -334,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 */ @@ -352,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 */ |