diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2018-09-24 19:23:41 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2018-09-24 19:23:41 (GMT) |
commit | a56b4db4ae25d30e6e7eb96f27d7b91e35148591 (patch) | |
tree | 7738d08a9734103fd12242eb5ff0244dd74c214d /src/H5Gtraverse.c | |
parent | 37309c1bd98b3d810f09569c72ac375e75117a91 (diff) | |
download | hdf5-a56b4db4ae25d30e6e7eb96f27d7b91e35148591.zip hdf5-a56b4db4ae25d30e6e7eb96f27d7b91e35148591.tar.gz hdf5-a56b4db4ae25d30e6e7eb96f27d7b91e35148591.tar.bz2 |
Remainder of vol_normalization changes (dataset, attribute, files, objects).
Diffstat (limited to 'src/H5Gtraverse.c')
-rw-r--r-- | src/H5Gtraverse.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 37b6292..e412e7c 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -32,18 +32,17 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ -#include "H5Gpkg.h" /* Groups */ -#include "H5HLprivate.h" /* Local Heaps */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Lprivate.h" /* Links */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Ppublic.h" /* Property Lists */ -#include "H5WBprivate.h" /* Wrapped Buffers */ +#include "H5private.h" /* Generic Functions */ +#include "H5CXprivate.h" /* API Contexts */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* File access */ +#include "H5Gpkg.h" /* Groups */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Lprivate.h" /* Links */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Ppublic.h" /* Property Lists */ +#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ @@ -324,7 +323,7 @@ H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, /* Traverse the link */ if(H5G__traverse_real(&tmp_grp_loc, lnk->u.soft.name, target, H5G__traverse_slink_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link") /* Pass back information about whether the object exists */ *obj_exists = udata.exists; @@ -359,8 +358,7 @@ done: */ herr_t H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, - unsigned target, hbool_t last_comp, H5G_loc_t *obj_loc, - hbool_t *obj_exists) + unsigned target, hbool_t last_comp, H5G_loc_t *obj_loc, hbool_t *obj_exists) { size_t nlinks; /* # of soft / UD links left to traverse */ herr_t ret_value = SUCCEED; /* Return value */ @@ -372,13 +370,13 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, HDassert(lnk); HDassert(obj_loc); - /* - * If we found a symbolic link then we should follow it. But if this + /* If we found a symbolic link then we should follow it. But if this * is the last component of the name and the H5G_TARGET_SLINK bit of * TARGET is set then we don't follow it. */ if(H5L_TYPE_SOFT == lnk->type && (0 == (target & H5G_TARGET_SLINK) || !last_comp)) { + /* Get the # of soft / UD links left to traverse */ if(H5CX_get_nlinks(&nlinks) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse") @@ -403,6 +401,7 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, */ if(lnk->type >= H5L_TYPE_UD_MIN && (0 == (target & H5G_TARGET_UDLINK) || !last_comp) ) { + /* Get the # of soft / UD links left to traverse */ if(H5CX_get_nlinks(&nlinks) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse") @@ -830,20 +829,21 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver if(!op) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no operation provided") - /* Retrieve the original # of soft / UD links that are able to be traversed */ - /* (So that multiple calls to H5G_traverse don't incorrectly look - * like they've traversed too many. Nested calls, like in H5L__move(), + /* Retrieve the original # of soft / UD links that are able to be traversed + * (So that multiple calls to H5G_traverse don't incorrectly look + * like they've traversed too many. Nested calls, like in H5L_move(), * may need their own mechanism to set & reset the # of links to traverse) */ if(H5CX_get_nlinks(&orig_nlinks) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse") /* Set up invalid tag. This is a precautionary step only. Setting an invalid - tag here will ensure that no metadata accessed while doing the traversal - is given an improper tag, unless another one is specifically set up - first. This will ensure we're not accidentally tagging something we - shouldn't be during the traversal. Note that for best tagging assertion - coverage, setting H5C_DO_TAGGING_SANITY_CHECKS is advised. */ + * tag here will ensure that no metadata accessed while doing the traversal + * is given an improper tag, unless another one is specifically set up + * first. This will ensure we're not accidentally tagging something we + * shouldn't be during the traversal. Note that for best tagging assertion + * coverage, setting H5C_DO_TAGGING_SANITY_CHECKS is advised. + */ H5_BEGIN_TAG(H5AC__INVALID_TAG); /* Go perform "real" traversal */ |