summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.h3
-rw-r--r--tools/lib/h5tools_str.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index c1d231a..5e47f10 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -320,6 +320,9 @@ typedef struct h5dump_t {
const char *dset_ptformat_pre;
const char *dset_ptformat;
+ /*print array indices in output matrix */
+ int pindex;
+
} h5dump_t;
typedef struct dump_header{
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 3d9aaf7..80ad868 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -856,8 +856,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
h5tools_str_append(str, "%s", "\n");
/*need to indent some more here*/
- if (ctx->indent_level >= 0)
- h5tools_str_append(str, "%s", OPT(info->line_pre, ""));
+ if (ctx->indent_level >= 0 )
+ {
+ if (info->pindex)
+ h5tools_str_append(str, "%s", " ");
+ else
+ h5tools_str_append(str, "%s", OPT(info->line_pre, ""));
+ }
for (x = 0; x < ctx->indent_level + 1; x++)
h5tools_str_append(str,"%s",OPT(info->line_indent,""));