summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.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 /tools/lib/h5trav.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 'tools/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 7ba2cc3..37fa9a1 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -371,19 +371,19 @@ static hssize_t get_nnames( hid_t loc_id, const char *group_name )
*-------------------------------------------------------------------------
*/
-static herr_t opget_info( hid_t loc_id, const char *name, void *op_data)
+static herr_t
+opget_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_data)
{
+ H5G_stat_t statbuf;
- H5G_stat_t statbuf;
+ if(H5Gget_objinfo(loc_id, name, FALSE, &statbuf) < 0)
+ return -1;
- if (H5Gget_objinfo( loc_id, name, FALSE, &statbuf) < 0 )
- return -1;
-
- ((trav_info_t *)op_data)->type = statbuf.type;
- ((trav_info_t *)op_data)->name = (char *)HDstrdup(name);
+ ((trav_info_t *)op_data)->type = statbuf.type;
+ ((trav_info_t *)op_data)->name = (char *)HDstrdup(name);
- /* Define 1 for return. This will cause the iterator to stop */
- return 1;
+ /* Define 1 for return. This will cause the iterator to stop */
+ return 1;
}
@@ -410,20 +410,20 @@ static herr_t opget_info( hid_t loc_id, const char *name, void *op_data)
static herr_t get_name_type( hid_t loc_id,
const char *group_name,
- int idx,
+ int _idx,
char **name,
H5G_obj_t *type )
{
+ trav_info_t info;
+ hsize_t idx = (hsize_t)_idx;
- trav_info_t info;
+ if(H5Literate(loc_id, group_name, H5_INDEX_NAME, H5_ITER_INC, &idx, opget_info, (void *)&info, H5P_DEFAULT) < 0)
+ return -1;
- if (H5Giterate( loc_id, group_name, &idx, opget_info, (void *)&info) < 0 )
- return -1;
-
- *name = info.name;
- *type = info.type;
+ *name = info.name;
+ *type = info.type;
- return 0;
+ return 0;
}
/*-------------------------------------------------------------------------