diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-08-27 16:48:50 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-08-27 16:48:50 (GMT) |
commit | eb5e01d37ca2570afc50756c9ed6a0be214502ec (patch) | |
tree | 08281269dc5b2eeef48286fb991bd6a05f71f6a3 /tools | |
parent | 11f1b67c878b17abc225d09fb2a2019f338f92b2 (diff) | |
download | hdf5-eb5e01d37ca2570afc50756c9ed6a0be214502ec.zip hdf5-eb5e01d37ca2570afc50756c9ed6a0be214502ec.tar.gz hdf5-eb5e01d37ca2570afc50756c9ed6a0be214502ec.tar.bz2 |
[svn-r620] Changes since 19980825
----------------------
./MANIFEST
./src/H5R.c [NEW]
./src/H5Rprivate.h [NEW]
./src/H5Rpublic.h [NEW]
./src/Makefile.in
./src/hdf5.h
./test/ragged.c [NEW]
Preliminary support for 2d ragged arrays for Mark Miller and
Jim Reus. Not fully implemented yet. The test is not actually
part of `make test' because we still have some memory problems.
./src/H5E.c
./src/H5Epublic.h
Added H5E_RAGGED as a major error number.
./bin/release
Checks the MANIFEST file against `svf ls' on systems that have
it.
./bin/trace
Fixed a bug that caused arguments of type `void *x[]' to not
be handled.
./src/H5.c
Removed unused variables and changed a couple types to
fix compiler warnings.
Added tracing support for ragged array object ID's and arrays
of pointers.
./src/H5D.c
H5Dcreate() will complain if either of the property lists are
invalid (instead of using the default).
./src/H5D.c
./src/H5Dprivate.h
Split H5Dget_space() into an API and internal function so it
can be called from the new ragged array layer.
./src/H5Fistore.c
Fixed warnings about unsigned vs. signed comparisons.
./src/H5Flow.c
Fixed a warning about a variable being shadowed in the MPI-IO
stuff.
./src/H5Iprivate.h
./src/H5Ipublic.h
Added the H5_RAGGED atom group.
./src/H5Shyper.c
Fixed some freeing-free-memory errors that resulted when
certain arrays were freed but the pointers were left in the
data structures. I simply set the pointers to null after they
were freed.
./src/H5Sprivate.h
./src/H5Sselect.c
Split the H5Sselect_hyperslab() function into an API and a
private function so it could be called from the ragged array
layer.
Added H5S_SEL_ERROR and H5S_SEL_N to the switch statements to
get rid or compiler warnings.
./src/H5Tconv.c
Removed a misleading comment.
./test/bittests.c
Fixed a warning about a printf().
./test/cmpd_dset.c
Fixed warnings about unused variables because of test #11
being commented out.
./bin/trace
Shortened the right margin for the output to allow room for
the `);' at the end of the TRACE() macros.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5import.c | 12 | ||||
-rw-r--r-- | tools/h5tools.c | 20 |
2 files changed, 29 insertions, 3 deletions
diff --git a/tools/h5import.c b/tools/h5import.c index de1af53..dd88ba6 100644 --- a/tools/h5import.c +++ b/tools/h5import.c @@ -56,7 +56,7 @@ usage (const char *argv0) int main (int argc, char *argv[]) { - hid_t file, space, dset; + hid_t file, space=-1, dset=-1; const char *output_name, *dset_name; int argno, fd=-1; hsize_t size[1]; @@ -108,8 +108,14 @@ main (int argc, char *argv[]) if (fd>=0) close (fd); fd = -1; H5E_BEGIN_TRY { - H5Sclose (space); - H5Dclose (dset); + if (space>=0) { + H5Sclose (space); + space = -1; + } + if (dset>=0) { + H5Dclose (dset); + dset = -1; + } } H5E_END_TRY; } diff --git a/tools/h5tools.c b/tools/h5tools.c index bfb46a3..f6b7c24 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -157,6 +157,26 @@ h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp) sprintf(temp, "%ld", *((long*)vp)); } else if (H5Tequal(type, H5T_NATIVE_ULONG)) { sprintf(temp, "%lu", *((unsigned long*)vp)); + } else if (H5Tequal(type, H5T_NATIVE_HSSIZE)) { + if (sizeof(hssize_t)==sizeof(long)) { + sprintf(temp, "%ld", *((long*)vp)); + } else { + char fmt[8]; + strcpy(fmt, "%"); + strcat(fmt, PRINTF_LL_WIDTH); + strcat(fmt, "d"); + sprintf(temp, fmt, *((long long*)vp)); + } + } else if (H5Tequal(type, H5T_NATIVE_HSIZE)) { + if (sizeof(hsize_t)==sizeof(long)) { + sprintf(temp, "%lu", *((unsigned long*)vp)); + } else { + char fmt[8]; + strcpy(fmt, "%"); + strcat(fmt, PRINTF_LL_WIDTH); + strcat(fmt, "u"); + sprintf(temp, fmt, *((unsigned long long*)vp)); + } } else if (H5T_COMPOUND==H5Tget_class(type)) { nmembs = H5Tget_nmembers(type); strcpy(temp, OPT(info->cmpd_pre, "{")); |