diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-06-30 18:57:23 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-06-30 18:57:23 (GMT) |
commit | 822af258c70d179058b402e9955d07eee3527f5a (patch) | |
tree | f5669f102d911710e99ed27796d8acbb9581fae4 /tools/h5dump | |
parent | ddb825f2a8f19708a43118216c3b68e7196652ef (diff) | |
download | hdf5-822af258c70d179058b402e9955d07eee3527f5a.zip hdf5-822af258c70d179058b402e9955d07eee3527f5a.tar.gz hdf5-822af258c70d179058b402e9955d07eee3527f5a.tar.bz2 |
[svn-r8774] Purpose:
bug fix
Description:
the indentation was not made properly for nested objects when printing array indices
Solution:
added the indentation to h5tools_simpple_prefix
Platforms tested:
linux
AIX
solaris
Misc. update:
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index cc1b4cc..234e9ad 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -1075,7 +1075,7 @@ dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) dump_oid(attr_id); if (display_data || display_attr_data) - dump_data(attr_id, ATTRIBUTE_DATA, NULL, 0); + dump_data(attr_id, ATTRIBUTE_DATA, NULL, display_ai); H5Tclose(type); H5Sclose(space); @@ -1853,6 +1853,15 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int pindex) outputformat->line_ncols = nCols; outputformat->do_escape=display_escape; + /* print the matrix indices */ + outputformat->pindex=pindex; + if (outputformat->pindex) + { + outputformat->idx_fmt = "(%s): "; + outputformat->idx_n_fmt = "%lu"; + outputformat->idx_sep = ","; + outputformat->line_pre = "%s"; + } indent += COL; @@ -1911,20 +1920,9 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int pindex) outputformat = &string_dataformat; } - /* print the matrix indices */ - outputformat->pindex=pindex; - if (outputformat->pindex) - { - outputformat->idx_fmt = "(%s):"; - outputformat->idx_n_fmt = "%lu"; - outputformat->idx_sep = ","; - outputformat->line_pre = " %s "; - outputformat->line_1st = " %s "; - outputformat->line_cont = " %s "; - depth=0; - } + - status = h5tools_dump_dset(stdout, outputformat, obj_id, -1, sset, depth); + status = h5tools_dump_dset(stdout, outputformat, obj_id, -1, sset, depth); H5Tclose(f_type); } else { /* need to call h5tools_dump_mem for the attribute data */ |