summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-06-30 18:45:14 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-06-30 18:45:14 (GMT)
commit265a1d020947e829c570c051a02761779f37a706 (patch)
treebc575a3ddbbdbec67d41bdd2bc28d9132b96cb1a /tools/h5dump
parentcedec275523c73e98bc556ff0e77cbfed36b33f8 (diff)
downloadhdf5-265a1d020947e829c570c051a02761779f37a706.zip
hdf5-265a1d020947e829c570c051a02761779f37a706.tar.gz
hdf5-265a1d020947e829c570c051a02761779f37a706.tar.bz2
[svn-r8773] Purpose:
bug fix Description: the indentation was not made properly for nested objects when printing array indices Solution: added the indentation to h5tools_simple_prefix function Platforms tested: linux AIX solaris Misc. update:
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/h5dump.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 06c6b95..2f31dde 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1122,7 +1122,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);
@@ -1888,8 +1888,18 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int pindex)
int depth;
int stdindent = COL; /* should be 3 */
+
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;
@@ -1949,19 +1959,6 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int pindex)
}
- /* 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);
H5Tclose(f_type);
} else {