summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-08-03 20:11:36 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-08-03 20:11:36 (GMT)
commit28943c415b7e6ad11a412e7a88d500622886bffe (patch)
tree6b112cad4a3c050694ed7bdf78b4664815d32b57 /tools/lib/h5trav.c
parentc9cd62c1b55f96a45f3180e7ac73712340f479a1 (diff)
downloadhdf5-28943c415b7e6ad11a412e7a88d500622886bffe.zip
hdf5-28943c415b7e6ad11a412e7a88d500622886bffe.tar.gz
hdf5-28943c415b7e6ad11a412e7a88d500622886bffe.tar.bz2
[svn-r22625] HDFFV-8111: h5diff compare file to itself - removed path shortcut
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