summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-08-06 19:42:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-08-06 19:42:49 (GMT)
commitcd3f42096b9a957e37c9df48aa0d31d9ed4bc537 (patch)
tree86a1672d114762d3aea872e44104e65d1bc09254 /tools/lib/h5trav.c
parent434643dd4d14a841abdcc73ad7b3a0a8e06e4438 (diff)
downloadhdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.zip
hdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.tar.gz
hdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.tar.bz2
[svn-r22636] Description:
Bring r22599:22634 from trunk to revise_chunks branch Tested on: Mac OSX/64 10.7.4 (amazon) w/gcc 4.7.x, C++ & FORTRAN (No need for h5committest yet on this branch)
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 0215c46..8455360 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -354,6 +354,31 @@ trav_info_add(trav_info_t *info, const char *path, h5trav_type_t obj_type)
info->paths[idx].objno = HADDR_UNDEF;
} /* end trav_info_add() */
+
+/*-------------------------------------------------------------------------
+ * Function: trav_fileinfo_add
+ *
+ * Purpose: Add a file addr & fileno to info struct
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+trav_fileinfo_add(trav_info_t *info, hid_t loc_id)
+{
+ H5O_info_t oinfo;
+ size_t idx = info->nused - 1;
+
+ if ( info->paths[idx].path && HDstrcmp(info->paths[idx].path, "."))
+ H5Oget_info_by_name(loc_id, info->paths[idx].path, &oinfo, H5P_DEFAULT);
+ else
+ H5Oget_info(loc_id, &oinfo);
+
+ info->paths[idx].objno = oinfo.addr;
+ info->paths[idx].fileno = oinfo.fileno;
+} /* end trav_fileinfo_add() */
+
/*-------------------------------------------------------------------------
* Function: trav_info_visit_obj