summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-12-10 14:38:40 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-12-10 14:38:40 (GMT)
commit0a3b102ae8d228447d93ec8f26168e6774ad2d41 (patch)
tree09e0333f976388c8c2202798446ffffc88813548 /tools
parentfdf2c445ad6d22e55f9e3ecbb4e5d3225de89201 (diff)
downloadhdf5-0a3b102ae8d228447d93ec8f26168e6774ad2d41.zip
hdf5-0a3b102ae8d228447d93ec8f26168e6774ad2d41.tar.gz
hdf5-0a3b102ae8d228447d93ec8f26168e6774ad2d41.tar.bz2
[svn-r1864] fixed the committed type error.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump.c54
1 files changed, 11 insertions, 43 deletions
diff --git a/tools/h5dump.c b/tools/h5dump.c
index c1cf511..08bb2c5 100644
--- a/tools/h5dump.c
+++ b/tools/h5dump.c
@@ -737,14 +737,14 @@ int i;
break;
case H5G_TYPE:
- if ((obj=H5Topen (group, name)) >= 0) {
- dump_named_datatype (obj, name);
- H5Tclose(obj);
- } else {
- printf ("h5dump error: unable to dump data type %s\n",name);
- status = 1;
- }
- break;
+ if ((obj=H5Topen (group, name)) >= 0) {
+ dump_named_datatype (obj, name);
+ H5Tclose(obj);
+ } else {
+ printf ("h5dump error: unable to dump data type %s\n",name);
+ status = 1;
+ }
+ break;
default:
printf ("h5dump error: unknown object %s\n", name);
@@ -774,44 +774,12 @@ done:
*-----------------------------------------------------------------------*/
static void
dump_named_datatype (hid_t type, const char *name) {
-char *fname ;
-hid_t nmembers, mtype;
-int i, j, ndims, perm[H5DUMP_MAX_RANK];
-size_t dims[H5DUMP_MAX_RANK];
indentation (indent);
begin_obj(DATATYPE, name);
-
- nmembers = H5Tget_nmembers(type);
-
- for (i = 0; i < nmembers; i++) {
-
- fname = H5Tget_member_name(type, i);
-
- mtype = H5Tget_member_type(type, i);
-
- ndims = H5Tget_member_dims(type, i, dims, perm);
-
- indentation (indent+COL);
- if (H5T_ENUM == H5Tget_class(type)) {
- print_datatype(type);
- break;
- }
- else {
- print_datatype(mtype);
- }
- printf (" \"%s\"", fname);
-
- if (ndims != 1 || dims[0] != 1) {
- for (j = 0; j < ndims; j++)
- printf("[%d]",(int)dims[j]);
- }
-
- printf (";\n");
-
- free (fname);
- }
-
+ indentation (indent+COL);
+ print_datatype(type);
+ printf("\n");
indentation (indent);
end_obj();
}