diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-09-08 14:51:59 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-09-08 14:51:59 (GMT) |
commit | 1cad9f47513a8819c82397371ebe25f83b9917e6 (patch) | |
tree | 7d61091dc99cf0dad6bce12362f6607e4e54f075 /tools/lib/h5tools_str.c | |
parent | eae58095d0abe3e50b6ca1e63a5924fab5de9714 (diff) | |
download | hdf5-1cad9f47513a8819c82397371ebe25f83b9917e6.zip hdf5-1cad9f47513a8819c82397371ebe25f83b9917e6.tar.gz hdf5-1cad9f47513a8819c82397371ebe25f83b9917e6.tar.bz2 |
[svn-r17456] Added dataspace type check for region, changed dimension_break processing to use boolean.
Tested:
local linux
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r-- | tools/lib/h5tools_str.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 200fa9e..1558df0 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1124,6 +1124,7 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, { hid_t obj, region; char ref_name[1024]; + H5S_sel_type region_type; obj = H5Rdereference(container, H5R_DATASET_REGION, vp); if (obj >= 0) { @@ -1132,8 +1133,11 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, H5Rget_name(obj, H5R_DATASET_REGION, vp, (char*) ref_name, 1024); h5tools_str_append(str, info->dset_format, ref_name); - h5tools_str_dump_region_blocks(str, region, info, ctx); - h5tools_str_dump_region_points(str, region, info, ctx); + region_type = H5Sget_select_type(region); + if(region_type==H5S_SEL_POINTS) + h5tools_str_dump_region_points(str, region, info, ctx); + else + h5tools_str_dump_region_blocks(str, region, info, ctx); H5Sclose(region); } /* end if (region >= 0) */ |