diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5ls.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/h5ls.c b/tools/h5ls.c index f7e9b76..7a88ac4 100644 --- a/tools/h5ls.c +++ b/tools/h5ls.c @@ -119,7 +119,7 @@ list (hid_t group, const char *name, void __unused__ *op_data) hid_t (*func)(void*); void *edata; int i; - char buf[512]; + char buf[512], comment[50]; H5G_stat_t statbuf; /* Disable error reporting */ @@ -171,6 +171,11 @@ list (hid_t group, const char *name, void __unused__ *op_data) printf ("Unknown Type\n"); } + /* Display the comment if the object has one */ + H5Gget_comment(group, name, sizeof(comment), comment); + strcpy(comment+sizeof(comment)-4, "..."); + if (comment[0]) printf("%26s%s\n", "", comment); + /* Restore error reporting */ H5Eset_auto (func, edata); return 0; |