diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-06-26 21:04:20 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-06-26 21:04:20 (GMT) |
commit | 308106c0e96f3d991d804194a83c231f0a98ba2a (patch) | |
tree | 381cd204544d8c7c80db2996c6b4df12237e09e2 /tools/h5dump/h5dump_ddl.c | |
parent | c2750822ffd92d78e9c442e8ab046ac2dbf47d8e (diff) | |
download | hdf5-308106c0e96f3d991d804194a83c231f0a98ba2a.zip hdf5-308106c0e96f3d991d804194a83c231f0a98ba2a.tar.gz hdf5-308106c0e96f3d991d804194a83c231f0a98ba2a.tar.bz2 |
[svn-r23829] HDFFV-8134: allow exclusion of attributes. This implements the technique and creates a test. Help changes will be added after trunk tests pass the test cycle.
Tested: local linux
Diffstat (limited to 'tools/h5dump/h5dump_ddl.c')
-rw-r--r-- | tools/h5dump/h5dump_ddl.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index 10d4d32..a9a23a5 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -556,19 +556,20 @@ attr_iteration(hid_t gid, unsigned attr_crt_order_flags) { /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set in the group for attributes, then, sort by creation order, otherwise by name */ - - if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { - if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - } /* end if */ - else { - if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { - error_msg("error getting attribute information\n"); - h5tools_setstatus(EXIT_FAILURE); + if(include_attrs) { + if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) { + if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg("error getting attribute information\n"); + h5tools_setstatus(EXIT_FAILURE); + } /* end if */ } /* end if */ - } /* end else */ + else { + if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) { + error_msg("error getting attribute information\n"); + h5tools_setstatus(EXIT_FAILURE); + } /* end if */ + } /* end else */ + } } /*------------------------------------------------------------------------- |