summaryrefslogtreecommitdiffstats
path: root/hl/src/H5LT.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-30 20:03:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-30 20:03:37 (GMT)
commita4069db8f48121ca11d0465b260d9cd81152581b (patch)
tree37348ad7d71058a6f449255073d631db8c33794a /hl/src/H5LT.c
parent1374654210854d005546459e48c482c5ea01cba2 (diff)
downloadhdf5-a4069db8f48121ca11d0465b260d9cd81152581b.zip
hdf5-a4069db8f48121ca11d0465b260d9cd81152581b.tar.gz
hdf5-a4069db8f48121ca11d0465b260d9cd81152581b.tar.bz2
[svn-r14131] Description:
Move H5Giterate() and H5G_iterate_t to deprecated symbols section, replacing them with H5Literate and H5L_iterate_t respectively. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'hl/src/H5LT.c')
-rw-r--r--hl/src/H5LT.c47
1 files changed, 19 insertions, 28 deletions
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 717352f..10977a7 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -1032,34 +1032,29 @@ out:
*-------------------------------------------------------------------------
*/
-static herr_t find_dataset( hid_t loc_id, const char *name, void *op_data)
+static herr_t
+find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_data)
{
+ /* Define a default zero value for return. This will cause the iterator to continue if
+ * the dataset is not found yet.
+ */
+ int ret = 0;
- /* Define a default zero value for return. This will cause the iterator to continue if
- * the dataset is not found yet.
- */
-
- int ret = 0;
-
- char *dset_name = (char*)op_data;
-
- /* Shut the compiler up */
- loc_id=loc_id;
-
- /* Define a positive value for return value if the dataset was found. This will
- * cause the iterator to immediately return that positive value,
- * indicating short-circuit success
- */
-
- if( strcmp( name, dset_name ) == 0 )
- ret = 1;
+ /* Shut the compiler up */
+ loc_id = loc_id;
+ linfo = linfo;
+ /* Define a positive value for return value if the dataset was found. This will
+ * cause the iterator to immediately return that positive value,
+ * indicating short-circuit success
+ */
+ if(strcmp(name, (char *)op_data) == 0)
+ ret = 1;
- return ret;
+ return ret;
}
-
/*-------------------------------------------------------------------------
* Function: H5LTfind_dataset
*
@@ -1082,14 +1077,10 @@ static herr_t find_dataset( hid_t loc_id, const char *name, void *op_data)
*-------------------------------------------------------------------------
*/
-herr_t H5LTfind_dataset( hid_t loc_id, const char *dset_name )
+herr_t
+H5LTfind_dataset( hid_t loc_id, const char *dset_name )
{
-
- herr_t ret;
-
- ret = H5Giterate( loc_id, ".", 0, find_dataset, (void *)dset_name );
-
- return ret;
+ return H5Literate(loc_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name, H5P_DEFAULT );
}