[svn-r12158] Purpose:

bug fix

Description:
h5dump was not printing attributes for the named datatype cases

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
This commit is contained in:
Pedro Vicente Nunes
2006-03-27 13:22:55 -05:00
parent 4c0b3c3d5a
commit 983e043587
6 changed files with 374 additions and 294 deletions

View File

@@ -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);
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;
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);
end_obj(dump_header_format->datatypeend,
dump_header_format->datatypeblockend);
}
/*-------------------------------------------------------------------------