diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-01-05 16:33:50 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-01-05 16:33:50 (GMT) |
commit | 3c6be60da7927d3f5dd2486dc193cabe98f08276 (patch) | |
tree | 9a8850a518e66db6cf6411eba0247bfc51d1247f /tools/h5dump/h5dump.c | |
parent | cb7800feee85ec1dc62ceeb9ed1f8ac59a526c16 (diff) | |
download | hdf5-3c6be60da7927d3f5dd2486dc193cabe98f08276.zip hdf5-3c6be60da7927d3f5dd2486dc193cabe98f08276.tar.gz hdf5-3c6be60da7927d3f5dd2486dc193cabe98f08276.tar.bz2 |
[svn-r4782]
Purpose:
Feature Add
Description:
Added support for dumping Group Comments. This involved a
modification of the DDL as well.
Solution:
Steal code from h5ls and put it in the h5dump. The ddl.html file was
updated as normal. And a test was created...
Platforms tested:
Dangermouse, Modi4, Kelgia
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r-- | tools/h5dump/h5dump.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index efb0e42..767a604 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998, 1999, 2000, 2001 + * Copyright (C) 1998, 1999, 2000, 2001, 2002 * National Center for Supercomputing Applications * All rights reserved. * @@ -1541,7 +1541,7 @@ dump_group(hid_t gid, const char *name) { H5G_stat_t statbuf; hid_t dset, type; - char type_name[1024], *tmp; + char type_name[1024], *tmp, comment[50]; int i, xtype = H5G_UNKNOWN; /* dump all */ tmp = malloc(strlen(prefix) + strlen(name) + 2); @@ -1554,6 +1554,14 @@ dump_group(hid_t gid, const char *name) if (display_oid) dump_oid(gid); + comment[0] = '\0'; + H5Gget_comment(gid, ".", sizeof(comment), comment); + + if (comment[0]) { + indentation(indent); + printf("COMMENT \"%s\"\n", comment); + } + if (!strcmp(name, "/") && unamedtype) /* dump unamed type in root group */ for (i = 0; i < type_table->nobjs; i++) |