summaryrefslogtreecommitdiffstats
path: root/tools/h5ls.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-07-20 21:01:32 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-07-20 21:01:32 (GMT)
commit2423411a647cff2bc2c37789fc9973ed4a683348 (patch)
tree562aba5c2f3d8aabf164d81122b8531947dd4b68 /tools/h5ls.c
parent00aa39c66f9e6a7cdf594533eadfaac74896898b (diff)
downloadhdf5-2423411a647cff2bc2c37789fc9973ed4a683348.zip
hdf5-2423411a647cff2bc2c37789fc9973ed4a683348.tar.gz
hdf5-2423411a647cff2bc2c37789fc9973ed4a683348.tar.bz2
[svn-r522] Changes since 19980720
---------------------- ./src/H5Gpublic.h ./src/H5Gprivate.h ./src/H5G.c ./test/dsets.c ./doc/html/Groups.html Added the H5Gset_comment() and H5Gget_comment() functions described in an earlier e-mail. ./src/H5.c Fixed a bug in the tracing code that caused certain data space enum types to not be printed. Nested case statements can get confusing to the eyes! ./tools/h5ls.c Prints the first 50 bytes or so of object comments.
Diffstat (limited to 'tools/h5ls.c')
-rw-r--r--tools/h5ls.c7
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;