diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-12-04 22:36:32 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-12-04 22:36:32 (GMT) |
commit | d552e97eae59408f210d7d7909b8b71811fbd930 (patch) | |
tree | 0a1269e15fdf7ba08126917d6236d53493202a9e /tools/src/h5dump | |
parent | cc2407257af31cca253e2c42c1d69c0f205e271b (diff) | |
download | hdf5-d552e97eae59408f210d7d7909b8b71811fbd930.zip hdf5-d552e97eae59408f210d7d7909b8b71811fbd930.tar.gz hdf5-d552e97eae59408f210d7d7909b8b71811fbd930.tar.bz2 |
Update h5ls help and rework dump_mem routines for attrs
Diffstat (limited to 'tools/src/h5dump')
-rw-r--r-- | tools/src/h5dump/h5dump.c | 2 | ||||
-rw-r--r-- | tools/src/h5dump/h5dump_xml.c | 42 |
2 files changed, 8 insertions, 36 deletions
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 507a62f..0222c8b 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -1703,6 +1703,8 @@ main(int argc, const char *argv[]) /* To Do: clean up XML table */ + H5Eset_auto2(H5E_DEFAULT, func, edata); + leave(h5tools_getstatus()); done: diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 0868467..b78cf00 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -1880,47 +1880,17 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, status = xml_print_strs(obj_id, ATTRIBUTE_DATA); } else { /* all other data */ - /* VL data special information */ - unsigned int vl_data = 0; /* contains VL datatypes */ - - p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); - - /* Check if we have VL data in the dataset's datatype */ - if (h5tools_detect_vlen(p_type) == TRUE) - vl_data = TRUE; - - H5Tclose(type); - space = H5Aget_space(obj_id); if(space == H5S_NULL || space == H5S_NO_CLASS) { status = SUCCEED; } else { - ndims = H5Sget_simple_extent_dims(space, size, NULL); - - for (i = 0; i < ndims; i++) - nelmts *= size[i]; - - if((buf = HDmalloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type))))) == NULL) { - error_msg("unable to allocate buffer\n"); - h5tools_setstatus(EXIT_FAILURE); - status = FAIL; - } - else { - if (H5Aread(obj_id, p_type, buf) >= 0) { - h5tools_context_t datactx; - HDmemset(&datactx, 0, sizeof(datactx)); - datactx.need_prefix = TRUE; - datactx.indent_level = ctx.indent_level; - datactx.cur_column = ctx.cur_column; - status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id, p_type, space, buf); - } - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Treclaim(p_type, space, H5P_DEFAULT, buf); - - HDfree(buf); - } + h5tools_context_t datactx; + HDmemset(&datactx, 0, sizeof(datactx)); + datactx.need_prefix = TRUE; + datactx.indent_level = ctx.indent_level; + datactx.cur_column = ctx.cur_column; + status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id); } H5Tclose(p_type); H5Sclose(space); |