diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-10-04 20:44:07 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-10-04 20:44:07 (GMT) |
commit | 041de441c5d7468812be8af1346b30db6ea94e3a (patch) | |
tree | f5d9463f663e2de4ce6060b1a6585f52f26b2547 /tools/h5dump/h5dumpgentest.c | |
parent | bb3afd50c2e94cf2db558218c6704dcc285c72e9 (diff) | |
download | hdf5-041de441c5d7468812be8af1346b30db6ea94e3a.zip hdf5-041de441c5d7468812be8af1346b30db6ea94e3a.tar.gz hdf5-041de441c5d7468812be8af1346b30db6ea94e3a.tar.bz2 |
[svn-r14186] Added support for displaying several iteration orders on group and named datatype attributes
tested: windows, linux
Diffstat (limited to 'tools/h5dump/h5dumpgentest.c')
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 4bf7061..862ae60 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -5925,11 +5925,14 @@ gent_attr_creation_order() if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto out; -#if 0 /* enable creation order tracking on attributes */ if(H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED) < 0) goto out; -#endif + + /* enable creation order tracking on groups */ + if(H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) + goto out; + /*------------------------------------------------------------------------- * create a dataset and atributes in it *------------------------------------------------------------------------- @@ -5954,13 +5957,38 @@ gent_attr_creation_order() goto out; } /* end for */ + + if (H5Dclose(did) < 0) + goto out; + +/*------------------------------------------------------------------------- + * create a group and atributes in it + *------------------------------------------------------------------------- + */ + + if ((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) + goto out; + + /* add attributes */ + for(i = 0; i < 3; i++) + { + if ((aid = H5Acreate(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT)) < 0) + goto out; + + /* close attribute */ + if (H5Aclose(aid) < 0) + goto out; + + } /* end for */ + + if (H5Gclose(gid) < 0) + goto out; + /* close */ if (H5Sclose(sid) < 0) goto out; - if (H5Dclose(did) < 0) - goto out; if (H5Pclose(dcpl_id) < 0) goto out; if (H5Pclose(gcpl_id) < 0) |