diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2008-10-16 03:52:16 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2008-10-16 03:52:16 (GMT) |
commit | ad28fa5b0c1384fe70397fb2eaa83e2a6e62699d (patch) | |
tree | a71c5b86d440ffdb059864d75e35e3c41102a01b /tools/lib/h5tools_utils.c | |
parent | 273f31211ed4725fde9e7b5b35a884d3f2359246 (diff) | |
download | hdf5-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.c | 28 |
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; |