summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 4f4f42a..1ecd5c0 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -114,7 +114,7 @@ h5trav_set_verbose(int print_verbose)
*-------------------------------------------------------------------------
*/
-
+
/*-------------------------------------------------------------------------
* Function: trav_addr_add
*
@@ -140,7 +140,7 @@ trav_addr_add(trav_addr_t *visited, haddr_t addr, const char *path)
visited->objs[idx].path = HDstrdup(path);
} /* end trav_addr_add() */
-
+
/*-------------------------------------------------------------------------
* Function: trav_addr_visited
*
@@ -164,7 +164,7 @@ trav_addr_visited(trav_addr_t *visited, haddr_t addr)
return(NULL);
} /* end trav_addr_visited() */
-
+
/*-------------------------------------------------------------------------
* Function: traverse_cb
*
@@ -239,7 +239,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
return(H5_ITER_CONT);
} /* end traverse_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: traverse
*
@@ -255,11 +255,11 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
hbool_t recurse, const trav_visitor_t *visitor, unsigned fields)
{
H5O_info_t oinfo; /* Object info for starting group */
- int ret_value = SUCCEED;
+ int ret_value = 0;
/* Get info for starting object */
if(H5Oget_info_by_name2(file_id, grp_name, &oinfo, fields, H5P_DEFAULT) < 0)
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info_by_name failed");
+ H5TOOLS_GOTO_ERROR((-1), "H5Oget_info_by_name failed");
/* Visit the starting object */
if(visit_start && visitor->visit_obj)
@@ -289,12 +289,12 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
if(recurse) {
/* Visit all links in group, recursively */
if(H5Lvisit_by_name(file_id, grp_name, trav_index_by, trav_index_order, traverse_cb, &udata, H5P_DEFAULT) < 0)
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lvisit_by_name failed");
+ H5TOOLS_GOTO_ERROR((-1), "H5Lvisit_by_name failed");
} /* end if */
else {
/* Iterate over links in group */
if(H5Literate_by_name(file_id, grp_name, trav_index_by, trav_index_order, NULL, traverse_cb, &udata, H5P_DEFAULT) < 0)
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Literate_by_name failed");
+ H5TOOLS_GOTO_ERROR((-1), "H5Literate_by_name failed");
} /* end else */
/* Free visited addresses table */
@@ -312,7 +312,7 @@ done:
return ret_value;
}
-
+
/*-------------------------------------------------------------------------
* Function: trav_info_add
*
@@ -366,7 +366,7 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id)
info->paths[idx].fileno = oinfo.fileno;
} /* end trav_fileinfo_add() */
-
+
/*-------------------------------------------------------------------------
* Function: trav_info_visit_obj
*
@@ -396,7 +396,7 @@ trav_info_visit_obj(const char *path, const H5O_info_t *oinfo,
return(0);
} /* end trav_info_visit_obj() */
-
+
/*-------------------------------------------------------------------------
* Function: trav_info_visit_lnk
*
@@ -415,7 +415,7 @@ trav_info_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
return(0);
} /* end trav_info_visit_lnk() */
-
+
/*-------------------------------------------------------------------------
* Function: h5trav_getinfo
*
@@ -430,7 +430,7 @@ int
h5trav_getinfo(hid_t file_id, trav_info_t *info)
{
trav_visitor_t info_visitor; /* Visitor structure for trav_info_t's */
- int ret_value = SUCCEED;
+ int ret_value = 0;
/* Init visitor structure */
info_visitor.visit_obj = trav_info_visit_obj;
@@ -439,7 +439,7 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info)
/* Traverse all objects in the file, visiting each object & link */
if(traverse(file_id, "/", TRUE, TRUE, &info_visitor, H5O_INFO_BASIC) < 0)
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
+ H5TOOLS_GOTO_ERROR((-1), "traverse failed");
done:
return ret_value;
@@ -501,7 +501,7 @@ trav_info_init(const char *filename, hid_t fileid, trav_info_t **_info)
*_info = info;
} /* end trav_info_init() */
-
+
/*-------------------------------------------------------------------------
* Function: trav_info_free
*
@@ -536,7 +536,7 @@ trav_info_free(trav_info_t *info)
*-------------------------------------------------------------------------
*/
-
+
/*-------------------------------------------------------------------------
* Function: trav_table_visit_obj
*
@@ -563,7 +563,7 @@ trav_table_visit_obj(const char *path, const H5O_info_t *oinfo,
return 0;
} /* end trav_table_visit_obj() */
-
+
/*-------------------------------------------------------------------------
* Function: trav_table_visit_lnk
*
@@ -582,7 +582,7 @@ trav_table_visit_lnk(const char *path, const H5L_info_t H5_ATTR_UNUSED *linfo, v
return 0;
} /* end trav_table_visit_lnk() */
-
+
/*-------------------------------------------------------------------------
* Function: h5trav_gettable
*
@@ -596,7 +596,7 @@ int
h5trav_gettable(hid_t fid, trav_table_t *table)
{
trav_visitor_t table_visitor; /* Visitor structure for trav_table_t's */
- int ret_value = SUCCEED;
+ int ret_value = 0;
/* Init visitor structure */
table_visitor.visit_obj = trav_table_visit_obj;
@@ -605,7 +605,7 @@ h5trav_gettable(hid_t fid, trav_table_t *table)
/* Traverse all objects in the file, visiting each object & link */
if(traverse(fid, "/", TRUE, TRUE, &table_visitor, H5O_INFO_BASIC) < 0)
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
+ H5TOOLS_GOTO_ERROR((-1), "traverse failed");
done:
return ret_value;
@@ -882,7 +882,7 @@ trav_attr(hid_t
return(0);
}
-
+
/*-------------------------------------------------------------------------
* Function: trav_print_visit_obj
*
@@ -940,7 +940,7 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
return(0);
} /* end trav_print_visit_obj() */
-
+
/*-------------------------------------------------------------------------
* Function: trav_print_visit_lnk
*
@@ -1004,7 +1004,7 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
return(0);
} /* end trav_print_visit_lnk() */
-
+
/*-------------------------------------------------------------------------
* Function: h5trav_print
*
@@ -1019,7 +1019,7 @@ h5trav_print(hid_t fid)
{
trav_print_udata_t print_udata; /* User data for traversal */
trav_visitor_t print_visitor; /* Visitor structure for printing objects */
- int ret_value = SUCCEED;
+ int ret_value = 0;
/* Init user data for printing */
print_udata.fid = fid;
@@ -1031,13 +1031,13 @@ h5trav_print(hid_t fid)
/* Traverse all objects in the file, visiting each object & link */
if(traverse(fid, "/", TRUE, TRUE, &print_visitor, H5O_INFO_BASIC) < 0)
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
+ H5TOOLS_GOTO_ERROR(FAIL, "traverse failed");
done:
return ret_value;
}
-
+
/*-------------------------------------------------------------------------
* Function: h5trav_visit
*
@@ -1053,7 +1053,7 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start,
void *udata, unsigned fields)
{
trav_visitor_t visitor; /* Visitor structure for objects */
- int ret_value = SUCCEED;
+ int ret_value = 0;
/* Init visitor structure */
visitor.visit_obj = visit_obj;
@@ -1062,7 +1062,7 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start,
/* Traverse all objects in the file, visiting each object & link */
if(traverse(fid, grp_name, visit_start, recurse, &visitor, fields) < 0)
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
+ H5TOOLS_GOTO_ERROR((-1), "traverse failed");
done:
return ret_value;
@@ -1080,8 +1080,8 @@ done:
herr_t
symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path)
{
- herr_t ret_value = SUCCEED;
- size_t idx; /* Index of address to use */
+ size_t idx; /* Index of address to use */
+ herr_t ret_value = SUCCEED;
/* Allocate space if necessary */
if(visited->nused == visited->nalloc) {
@@ -1089,7 +1089,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
visited->nalloc = MAX(1, visited->nalloc * 2);
if(NULL == (tmp_ptr = HDrealloc(visited->objs, visited->nalloc * sizeof(symlink_trav_path_t))))
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure realloc failed");
+ H5TOOLS_GOTO_ERROR(FAIL, "visited data structure realloc failed");
visited->objs = (symlink_trav_path_t *)tmp_ptr;
} /* end if */
@@ -1103,7 +1103,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
if(type == H5L_TYPE_EXTERNAL) {
if(NULL == (visited->objs[idx].file = HDstrdup(file))) {
visited->nused--;
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure name allocation failed");
+ H5TOOLS_GOTO_ERROR(FAIL, "visited data structure name allocation failed");
} /* end if */
} /* end if */
@@ -1111,14 +1111,14 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
visited->nused--;
if(visited->objs[idx].file)
HDfree (visited->objs[idx].file);
- H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure path allocation failed");
+ H5TOOLS_GOTO_ERROR(FAIL, "visited data structure path allocation failed");
} /* end if */
done:
return ret_value;
} /* end symlink_visit_add() */
-
+
/*-------------------------------------------------------------------------
* Function: symlink_is_visited
*