summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-04 15:06:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-04 15:06:28 (GMT)
commit59b51a2ea72ff98586372a454adfd8c790a62734 (patch)
tree74173cf2dab79097c9dc8f116a22ad0138d310a2 /tools/h5dump/h5dump.c
parent302830e60108513d9ff2e710444dc0d0188c92ee (diff)
downloadhdf5-59b51a2ea72ff98586372a454adfd8c790a62734.zip
hdf5-59b51a2ea72ff98586372a454adfd8c790a62734.tar.gz
hdf5-59b51a2ea72ff98586372a454adfd8c790a62734.tar.bz2
[svn-r14180] Description:
Make H5Aiterate() versioned and change all internal use to H5Aiterate2() Leave some regression tests that exercise H5Aiterate1() Fix attribute display in h5dump & h5ls to be "by name" by default Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index bceb4be..7a924de 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -501,7 +501,7 @@ static void dump_named_datatype(hid_t, const char *);
static void dump_dataset(hid_t, const char *, struct subset_t *);
static void dump_dataspace(hid_t space);
static void dump_datatype(hid_t type);
-static herr_t dump_attr(hid_t, const char *, void *);
+static herr_t dump_attr(hid_t, const char *, const H5A_info_t *, void *);
static void dump_data(hid_t, int, struct subset_t *, int);
static void dump_dcpl(hid_t dcpl, hid_t type_id, hid_t obj_id);
static void dump_comment(hid_t obj_id);
@@ -515,7 +515,7 @@ static void xml_dump_named_datatype(hid_t, const char *);
static void xml_dump_dataset(hid_t, const char *, struct subset_t *);
static void xml_dump_dataspace(hid_t space);
static void xml_dump_datatype(hid_t type);
-static herr_t xml_dump_attr(hid_t, const char *, void *);
+static herr_t xml_dump_attr(hid_t, const char *, const H5A_info_t *, void *);
static void xml_dump_data(hid_t, int, struct subset_t *, int);
/**
@@ -1223,7 +1223,8 @@ dump_dataspace(hid_t space)
*-------------------------------------------------------------------------
*/
static herr_t
-dump_attr(hid_t oid, const char *attr_name, void UNUSED * op_data)
+dump_attr(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info,
+ void UNUSED *op_data)
{
hid_t attr_id;
herr_t ret = SUCCEED;
@@ -1817,7 +1818,7 @@ dump_named_datatype(hid_t type, const char *name)
/* print attributes */
indent += COL;
- H5Aiterate(type, NULL, dump_attr, NULL);
+ H5Aiterate2(type, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, dump_attr, NULL, H5P_DEFAULT);
indent -= COL;
end_obj(dump_header_format->datatypeend,
@@ -1894,11 +1895,11 @@ dump_group(hid_t gid, const char *name, H5_index_t idx_type, H5_iter_order_t ite
printf("%s \"%s\"\n", HARDLINK, found_obj->objname);
} else {
found_obj->displayed = TRUE;
- H5Aiterate(gid, NULL, dump_attr, NULL);
+ H5Aiterate2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, dump_attr, NULL, H5P_DEFAULT);
H5Literate(gid, ".", idx_type, iter_order, NULL, dump_all, NULL, H5P_DEFAULT);
}
} else {
- H5Aiterate(gid, NULL, dump_attr, NULL);
+ H5Aiterate2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, dump_attr, NULL, H5P_DEFAULT);
H5Literate(gid, ".", idx_type, iter_order, NULL, dump_all, NULL, H5P_DEFAULT);
}
@@ -1973,7 +1974,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
} /* end switch */
indent += COL;
- H5Aiterate(did, NULL, dump_attr, NULL);
+ H5Aiterate2(did, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, dump_attr, NULL, H5P_DEFAULT);
indent -= COL;
H5Tclose(type);
@@ -5074,7 +5075,8 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU
*-------------------------------------------------------------------------
*/
static herr_t
-xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data)
+xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t UNUSED *info,
+ void UNUSED * op_data)
{
hid_t attr_id, type, space;
H5S_class_t space_type;
@@ -5384,8 +5386,8 @@ xml_dump_group(hid_t gid, const char *name, H5_index_t UNUSED idx_type, H5_iter_
found_obj->displayed = TRUE;
/* 1. do all the attributes of the group */
- H5Aiterate(gid, NULL,
- dump_function_table->dump_attribute_function, NULL);
+ H5Aiterate2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, NULL,
+ dump_function_table->dump_attribute_function, NULL, H5P_DEFAULT);
if(isRoot && unamedtype) {
unsigned u;
@@ -5439,7 +5441,7 @@ xml_dump_group(hid_t gid, const char *name, H5_index_t UNUSED idx_type, H5_iter_
free(parentxid);
/* 1. do all the attributes of the group */
- H5Aiterate(gid, NULL, dump_function_table->dump_attribute_function, NULL);
+ H5Aiterate2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, dump_function_table->dump_attribute_function, NULL, H5P_DEFAULT);
if(isRoot && unamedtype) {
unsigned u;
@@ -6088,7 +6090,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
dump_function_table->dump_datatype_function(type);
indent += COL;
- H5Aiterate(did, NULL, dump_function_table->dump_attribute_function, NULL);
+ H5Aiterate2(did, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, dump_function_table->dump_attribute_function, NULL, H5P_DEFAULT);
indent -= COL;
tempi = H5Dget_storage_size(did);