summaryrefslogtreecommitdiffstats
path: root/test/titerate.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
commit37232bd4f0f8199f956c823cdff72ece2ca9aa16 (patch)
tree38e37f7208355500b7f223e90bf014424c63300b /test/titerate.c
parent20146575aaeead9e05af73977dee863de63bf50f (diff)
downloadhdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.zip
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.gz
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.bz2
[svn-r9729] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
Diffstat (limited to 'test/titerate.c')
-rw-r--r--test/titerate.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/test/titerate.c b/test/titerate.c
index 18a7246..4f9d15c 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -197,11 +197,17 @@ static void test_iter_group(void)
VERIFY(num_membs,NDATASETS+2,"H5Gget_num_objs");
for(i=0; i< (int)num_membs; i++) {
+#ifdef H5_WANT_H5_V1_4_COMPAT
+ int obj_type; /* Type of object in file */
+#else /*H5_WANT_H5_V1_4_COMPAT*/
+ H5G_obj_t obj_type; /* Type of object in file */
+#endif /*H5_WANT_H5_V1_4_COMPAT*/
+
ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, NAMELEN);
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
- ret = (herr_t)H5Gget_objtype_by_idx(root_group, (hsize_t)i);
- CHECK(ret, FAIL, "H5Gget_objtype_by_idx");
+ obj_type = H5Gget_objtype_by_idx(root_group, (hsize_t)i);
+ CHECK(obj_type, H5G_UNKNOWN, "H5Gget_objtype_by_idx");
}
H5E_BEGIN_TRY {
@@ -775,11 +781,17 @@ static void test_grp_memb_funcs(void)
VERIFY(num_membs,NDATASETS+2,"H5Gget_num_objs");
for(i=0; i< (int)num_membs; i++) {
+#ifdef H5_WANT_H5_V1_4_COMPAT
+ int obj_type; /* Type of object in file */
+#else /*H5_WANT_H5_V1_4_COMPAT*/
+ H5G_obj_t obj_type; /* Type of object in file */
+#endif /*H5_WANT_H5_V1_4_COMPAT*/
+
/* Test with NULL for name, to query length */
name_len = H5Gget_objname_by_idx(root_group, (hsize_t)i, NULL, NAMELEN);
CHECK(name_len, FAIL, "H5Gget_objname_by_idx");
- ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, name_len+1);
+ ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, (size_t)(name_len+1));
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
/* Double-check that the length is the same */
@@ -787,17 +799,17 @@ static void test_grp_memb_funcs(void)
/* Keep a copy of the dataset names around for later */
obj_names[i]=HDstrdup(dataset_name);
- CHECK(obj_names[i], NULL, "strdup");
+ CHECK(obj_names[i], NULL, "strdup");
- ret = (herr_t)H5Gget_objtype_by_idx(root_group, (hsize_t)i);
- CHECK(ret, FAIL, "H5Gget_objtype_by_idx");
+ obj_type = H5Gget_objtype_by_idx(root_group, (hsize_t)i);
+ CHECK(obj_type, H5G_UNKNOWN, "H5Gget_objtype_by_idx");
if(!HDstrcmp(dataset_name, "grp"))
- VERIFY(ret, H5G_GROUP, "H5Gget_objname_by_idx");
+ VERIFY(obj_type, H5G_GROUP, "H5Gget_objname_by_idx");
if(!HDstrcmp(dataset_name, "dtype"))
- VERIFY(ret, H5G_TYPE, "H5Gget_objname_by_idx");
+ VERIFY(obj_type, H5G_TYPE, "H5Gget_objname_by_idx");
if(!HDstrncmp(dataset_name, "Dataset", 7))
- VERIFY(ret, H5G_DATASET, "H5Gget_objname_by_idx");
+ VERIFY(obj_type, H5G_DATASET, "H5Gget_objname_by_idx");
}
H5E_BEGIN_TRY {
@@ -841,7 +853,7 @@ static void test_links(void)
ssize_t name_len; /* Length of object's name */
herr_t ret; /* Generic return value */
hid_t gid, gid1;
- int i;
+ hsize_t i;
#ifdef H5_WANT_H5_V1_4_COMPAT
int obj_type; /* Type of object */
#else /*H5_WANT_H5_V1_4_COMPAT*/
@@ -877,10 +889,10 @@ static void test_links(void)
/* Test these two functions, H5Gget_num_objs and H5Gget_objname_by_idx */
for(i=0; i<nobjs; i++) {
/* Get object name */
- name_len = H5Gget_objname_by_idx(gid, (hsize_t)i, obj_name, NAMELEN);
+ name_len = H5Gget_objname_by_idx(gid, i, obj_name, NAMELEN);
CHECK(name_len, FAIL, "H5Gget_objname_by_idx");
- obj_type = H5Gget_objtype_by_idx(gid, (hsize_t)i);
+ obj_type = H5Gget_objtype_by_idx(gid, i);
CHECK(obj_type, H5G_UNKNOWN, "H5Gget_objtype_by_idx");
if(!HDstrcmp(obj_name, "g1.1"))