summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 5398d76..fb1d0c2 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -27,6 +27,9 @@
#include "h5tools.h" /*for h5dump_t structure */
#include "h5tools_str.h" /*function prototypes */
+extern char* lookup_ref_path(hobj_ref_t ref);
+
+
/*
* If REPEAT_VERBOSE is defined then character strings will be printed so
* that repeated character sequences like "AAAAAAAAAA" are displayed as
@@ -452,8 +455,13 @@ h5tools_print_char(h5tools_str_t *str, const h5dump_t *info, unsigned char ch)
h5tools_str_append(str, "\\f");
break;
case '\n':
- h5tools_str_append(str, "\\n");
- break;
+ if (info->do_lf) {
+ h5tools_str_append(str, "\n");
+ h5tools_str_append(str, " ");
+ }
+ else
+ h5tools_str_append(str, "\\n");
+ break;
case '\r':
h5tools_str_append(str, "\\r");
break;
@@ -794,6 +802,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
if (h5tools_is_zero(vp, H5Tget_size(type))) {
h5tools_str_append(str, "NULL");
} else {
+ char *path=NULL;
otype = H5Rget_obj_type(container, H5R_OBJECT, vp);
obj = H5Rdereference(container, H5R_OBJECT, vp);
H5Gget_objinfo(obj, ".", FALSE, &sb);
@@ -822,6 +831,14 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
h5tools_str_append(str, info->obj_format, sb.objno);
else
h5tools_str_append(str, info->obj_format, sb.fileno,sb.objno);
+
+ /* Print name */
+ path = lookup_ref_path(*(hobj_ref_t *)vp);
+ if (path) {
+ h5tools_str_append(str, " ");
+ h5tools_str_append(str, path);
+ h5tools_str_append(str, " ");
+ }
}
} else if (H5Tget_class(type) == H5T_ARRAY) {
int k, ndims;