summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-05-21 15:58:53 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-05-21 15:58:53 (GMT)
commit9e9bdad5e9b2e182264b3df446cc9534a87f783c (patch)
tree580edf31dd1b1616e73cbf53d3ed462a1ccb742f /tools/lib
parentd77fc6af739944c0ebbc362d4710da4696dccad0 (diff)
downloadhdf5-9e9bdad5e9b2e182264b3df446cc9534a87f783c.zip
hdf5-9e9bdad5e9b2e182264b3df446cc9534a87f783c.tar.gz
hdf5-9e9bdad5e9b2e182264b3df446cc9534a87f783c.tar.bz2
[svn-r8563] *** empty log message ***
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.c8
-rw-r--r--tools/lib/h5tools.h5
2 files changed, 9 insertions, 4 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 3a5b68a..6941c43 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1098,6 +1098,7 @@ h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type,
hid_t f_space;
hid_t p_type = _p_type;
hid_t f_type;
+ H5S_class_t space_type;
int status = FAIL;
h5dump_t info_dflt;
@@ -1127,15 +1128,18 @@ h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type,
/* Check the data space */
f_space = H5Dget_space(dset);
+ space_type = H5Sget_simple_extent_type(f_space);
+
/* Print the data */
- if (H5Sis_simple(f_space) > 0) {
+ if (space_type == H5S_SIMPLE || space_type == H5S_SCALAR) {
if (!sset)
status = h5tools_dump_simple_dset(rawdatastream, info, dset, p_type,
indentlevel);
else
status = h5tools_dump_simple_subset(rawdatastream, info, dset, p_type,
sset, indentlevel);
- }
+ } else /* space is H5S_NULL */
+ status = SUCCEED;
/* Close the dataspace */
H5Sclose(f_space);
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 143685f..ce4b6f6 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -455,8 +455,9 @@ extern FILE *rawdatastream; /*output stream for raw data */
#define NLINK "NLINK"
#define OBJID "OBJECTID"
#define OBJNO "OBJNO"
-#define SCALAR "SCALAR"
-#define SIMPLE "SIMPLE"
+#define S_SCALAR "SCALAR"
+#define S_SIMPLE "SIMPLE"
+#define S_NULL "NULL"
#define SOFTLINK "SOFTLINK"
#define STORAGELAYOUT "STORAGELAYOUT"
#define START "START"