summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-03-27 18:22:55 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-03-27 18:22:55 (GMT)
commit983e043587f221bc2d0ebc17e403f8f61f438dfd (patch)
treeb23ab77a81b4b59c6da05c58c17eb137e8b56897 /tools/h5dump/h5dump.c
parent4c0b3c3d5af667dc3bc165463bcc8a1ce382a599 (diff)
downloadhdf5-983e043587f221bc2d0ebc17e403f8f61f438dfd.zip
hdf5-983e043587f221bc2d0ebc17e403f8f61f438dfd.tar.gz
hdf5-983e043587f221bc2d0ebc17e403f8f61f438dfd.tar.bz2
[svn-r12158] Purpose:
bug fix Description: h5dump was not printing attributes for the named datatype cases Solution: Platforms tested: linux solaris AIX Misc. update:
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);
}
/*-------------------------------------------------------------------------