summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 65c2a80..1e9ad28 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1607,26 +1607,33 @@ done:
*
* Programmer: Ruey-Hsia Li
*
- * Modifications: Comments: not yet implemented.
+ * Modifications: pvn March 27, 2006
+ * add printing of attributes
*
*-------------------------------------------------------------------------
*/
static void
dump_named_datatype(hid_t type, const char *name)
{
- indentation(indent);
- printf("%s \"%s\" %s", dump_header_format->datatypebegin, name,
- dump_header_format->datatypeblockbegin);
-
- if (H5Tget_class(type) == H5T_COMPOUND) {
- print_datatype(type,1);
- } else {
- indentation(indent + COL);
- print_datatype(type,1);
- printf(";\n");
- }
- end_obj(dump_header_format->datatypeend,
- dump_header_format->datatypeblockend);
+ indentation(indent);
+ printf("%s \"%s\" %s", dump_header_format->datatypebegin, name,
+ dump_header_format->datatypeblockbegin);
+
+ if (H5Tget_class(type) == H5T_COMPOUND) {
+ print_datatype(type,1);
+ } else {
+ indentation(indent + COL);
+ print_datatype(type,1);
+ printf(";\n");
+ }
+
+ /* print attributes */
+ indent += COL;
+ H5Aiterate(type, NULL, dump_attr, NULL);
+ indent -= COL;
+
+ end_obj(dump_header_format->datatypeend,
+ dump_header_format->datatypeblockend);
}
/*-------------------------------------------------------------------------