summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2008-10-16 03:52:16 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2008-10-16 03:52:16 (GMT)
commitad28fa5b0c1384fe70397fb2eaa83e2a6e62699d (patch)
treea71c5b86d440ffdb059864d75e35e3c41102a01b /tools/lib/h5tools_utils.c
parent273f31211ed4725fde9e7b5b35a884d3f2359246 (diff)
downloadhdf5-ad28fa5b0c1384fe70397fb2eaa83e2a6e62699d.zip
hdf5-ad28fa5b0c1384fe70397fb2eaa83e2a6e62699d.tar.gz
hdf5-ad28fa5b0c1384fe70397fb2eaa83e2a6e62699d.tar.bz2
[svn-r15886] Purpose: Close bug 1332
Description: Improved external link traversal of h5dump. h5dump will now properly avoid all cycles, even those spanning multiple files. Improvement to the output of committed datatypes. Committed datatypes are now checked for uniqueness (like other objects). Tests added for these cases. Tested: kagiso, linew, smirom (h5committest)
Diffstat (limited to 'tools/lib/h5tools_utils.c')
-rw-r--r--tools/lib/h5tools_utils.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 0be3a91..a221465 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -485,21 +485,21 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
break;
case H5O_TYPE_NAMED_DATATYPE:
- {
- obj_t *found_obj;
-
- if((found_obj = search_obj(info->type_table, oinfo->addr)) == NULL)
- add_obj(info->type_table, oinfo->addr, name, TRUE);
- else {
- /* Use latest version of name */
- HDfree(found_obj->objname);
- found_obj->objname = HDstrdup(name);
-
- /* Mark named datatype as having valid name */
- found_obj->recorded = TRUE;
- } /* end else */
+ if(NULL == already_seen) {
+ obj_t *found_obj;
+
+ if((found_obj = search_obj(info->type_table, oinfo->addr)) == NULL)
+ add_obj(info->type_table, oinfo->addr, name, TRUE);
+ else {
+ /* Use latest version of name */
+ HDfree(found_obj->objname);
+ found_obj->objname = HDstrdup(name);
+
+ /* Mark named datatype as having valid name */
+ found_obj->recorded = TRUE;
+ } /* end else */
+ } /* end if */
break;
- }
default:
break;