summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-31 13:13:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-31 13:13:40 (GMT)
commite15bdb05e6bf52525c1df48f8e8e01aba3ce288b (patch)
treeb6a77169711c84362d7cbb252cb8d288b2656ba6 /tools
parentb969dce6e5625dd9d9f9cc42717a1b2027fdeeb1 (diff)
downloadhdf5-e15bdb05e6bf52525c1df48f8e8e01aba3ce288b.zip
hdf5-e15bdb05e6bf52525c1df48f8e8e01aba3ce288b.tar.gz
hdf5-e15bdb05e6bf52525c1df48f8e8e01aba3ce288b.tar.bz2
[svn-r14225] Description:
Change H5Oget_info -> H5Oget_info_by_name and re-add H5Oget_info in a simpler form for querying a particular object, to align with other new API routines. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dump.c14
-rw-r--r--tools/h5ls/h5ls.c6
-rw-r--r--tools/h5repack/h5repack_copy.c2
-rw-r--r--tools/h5repack/h5repack_refs.c4
-rw-r--r--tools/h5stat/h5stat.c2
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/lib/h5diff_attr.c4
-rw-r--r--tools/lib/h5tools_ref.c6
-rw-r--r--tools/lib/h5tools_str.c2
-rw-r--r--tools/lib/h5tools_utils.c6
-rw-r--r--tools/lib/h5trav.c4
11 files changed, 27 insertions, 27 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index b713194..db17563 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -722,7 +722,7 @@ print_datatype(hid_t type,unsigned in_group)
H5O_info_t oinfo;
obj_t *obj; /* Found object */
- H5Oget_info(type, ".", &oinfo, H5P_DEFAULT);
+ H5Oget_info(type, &oinfo);
obj = search_obj(type_table, oinfo.addr);
if(obj) {
@@ -1393,7 +1393,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
H5O_info_t oinfo;
/* Stat the object */
- if(H5Oget_info(group, name, &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0) {
error_msg(progname, "unable to get object information for \"%s\"\n", name);
d_status = EXIT_FAILURE;
ret = FAIL;
@@ -1906,7 +1906,7 @@ dump_group(hid_t gid, const char *name)
}
} /* end if */
- H5Oget_info(gid, ".", &oinfo, H5P_DEFAULT);
+ H5Oget_info(gid, &oinfo);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
@@ -3252,7 +3252,7 @@ handle_datasets(hid_t fid, char *dset, void *data)
}
}
- H5Oget_info(dsetid, ".", &oinfo, H5P_DEFAULT);
+ H5Oget_info(dsetid, &oinfo);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
@@ -4489,7 +4489,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
obj_t *found_obj; /* Found object */
/* detect a shared datatype, output only once */
- H5Oget_info(type, ".", &oinfo, H5P_DEFAULT);
+ H5Oget_info(type, &oinfo);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -4850,7 +4850,7 @@ xml_dump_datatype(hid_t type)
obj_t *found_obj; /* Found object */
/* Datatype is a shared or named datatype */
- H5Oget_info(type, ".", &oinfo, H5P_DEFAULT);
+ H5Oget_info(type, &oinfo);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -5359,7 +5359,7 @@ xml_dump_group(hid_t gid, const char *name)
indentation(indent);
indent += COL;
- H5Oget_info(gid, ".", &oinfo, H5P_DEFAULT);
+ H5Oget_info(gid, &oinfo);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index d270b0c..19cfe58 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1171,7 +1171,7 @@ display_type(hid_t type, int ind)
if(H5Tcommitted(type)) {
H5O_info_t oi;
- if(H5Oget_info(type, ".", &oi, H5P_DEFAULT) >= 0)
+ if(H5Oget_info(type, &oi) >= 0)
printf("shared-%lu:"H5_PRINTF_HADDR_FMT" ",
oi.fileno, oi.addr);
else
@@ -1744,7 +1744,7 @@ list(hid_t group, const char *name, const H5L_info_t *linfo, void *_iter)
hid_t obj;
/* Get object information */
- if(H5Oget_info(group, name, &oi, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name(group, name, &oi, H5P_DEFAULT) < 0) {
puts("**NOT FOUND**");
return 0;
} else if(oi.type < 0 || oi.type >= H5O_TYPE_NTYPES) {
@@ -2306,7 +2306,7 @@ main(int argc, const char *argv[])
li.type = H5L_TYPE_HARD;
/* Open the object and display it's information */
- if(li.type == H5L_TYPE_HARD && H5Oget_info(file, oname, &oi, H5P_DEFAULT) >= 0 && H5O_TYPE_GROUP == oi.type && !grp_literal_g) {
+ if(li.type == H5L_TYPE_HARD && H5Oget_info_by_name(file, oname, &oi, H5P_DEFAULT) >= 0 && H5O_TYPE_GROUP == oi.type && !grp_literal_g) {
/* Specified name is a group. List the complete contents of the group. */
sym_insert(&oi, oname);
iter.container = container = fix_name((show_file_name_g ? fname : ""), oname);
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 7edb70b..6c26cee 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -900,7 +900,7 @@ int copy_attr(hid_t loc_in,
int j;
unsigned u;
- if(H5Oget_info(loc_in, ".", &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info(loc_in, &oinfo) < 0)
goto error;
/*-------------------------------------------------------------------------
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index 28828b8..64d1990 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -422,7 +422,7 @@ static int copy_refs_attr(hid_t loc_in,
int j;
unsigned u;
- if(H5Oget_info(loc_in, ".", &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info(loc_in, &oinfo) < 0)
goto error;
for(u = 0; u < (unsigned)oinfo.num_attrs; u++) {
@@ -664,7 +664,7 @@ static const char* MapIdToName(hid_t refobj_id,
H5O_info_t ref_oinfo; /* Stat for the refobj id */
/* obtain information to identify the referenced object uniquely */
- if(H5Oget_info(refobj_id, ".", &ref_oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info(refobj_id, &ref_oinfo) < 0)
return NULL;
if(ref_oinfo.addr == travt->objs[i].objno)
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c
index 2fe3302..c69d801 100644
--- a/tools/h5stat/h5stat.c
+++ b/tools/h5stat/h5stat.c
@@ -736,7 +736,7 @@ walk(hid_t group, const char *name, const H5L_info_t *linfo, void *_iter)
char *s;
/* Get object information */
- ret = H5Oget_info(group, name, &oi, H5P_DEFAULT);
+ ret = H5Oget_info_by_name(group, name, &oi, H5P_DEFAULT);
assert(ret >= 0);
/* If the object has already been printed then just show the object ID
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index f852a2d..6da37e2 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -2215,8 +2215,8 @@ hsize_t diff_region(hid_t obj1_id,
if (nfound_b && options->m_verbose) {
H5O_info_t oi1, oi2;
- H5Oget_info(obj1_id, ".", &oi1, H5P_DEFAULT);
- H5Oget_info(obj2_id, ".", &oi2, H5P_DEFAULT);
+ H5Oget_info(obj1_id, &oi1);
+ H5Oget_info(obj2_id, &oi2);
parallel_print("Referenced dataset %lu %lu\n",
(unsigned long)oi1.addr, (unsigned long)oi2.addr);
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 2db6d21..d3d6a66 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -71,9 +71,9 @@ hsize_t diff_attr(hid_t loc1_id,
hsize_t nfound_total = 0;
int cmp=1;
- if(H5Oget_info(loc1_id, ".", &oinfo1, H5P_DEFAULT) < 0)
+ if(H5Oget_info(loc1_id, &oinfo1) < 0)
goto error;
- if(H5Oget_info(loc2_id, ".", &oinfo2, H5P_DEFAULT) < 0)
+ if(H5Oget_info(loc2_id, &oinfo2) < 0)
goto error;
if(oinfo1.num_attrs != oinfo2.num_attrs)
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index 69ea08d..123065b 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -134,7 +134,7 @@ ref_path_table_lookup(const char *thepath)
/* Get the object info now */
/* (returns failure for dangling soft links) */
- if(H5Oget_info(thefile, thepath, &oi, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name(thefile, thepath, &oi, H5P_DEFAULT) < 0)
return HADDR_UNDEF;
/* All existing objects in the file had better be in the table */
@@ -300,7 +300,7 @@ fill_ref_path_table_cb(hid_t group, const char *obj_name, const H5L_info_t *linf
if(linfo->type == H5L_TYPE_HARD) {
H5O_info_t oinfo;
- H5Oget_info(group, obj_name, &oinfo, H5P_DEFAULT);
+ H5Oget_info_by_name(group, obj_name, &oinfo, H5P_DEFAULT);
/* Check if the object is already in the path table */
if(!ref_path_table_find(oinfo.addr)) {
@@ -369,7 +369,7 @@ fill_ref_path_table(hid_t fid)
root_path = HDstrdup("/");
/* Get info for root group */
- H5Oget_info(fid, root_path, &oinfo, H5P_DEFAULT);
+ H5Oget_info_by_name(fid, root_path, &oinfo, H5P_DEFAULT);
/* Insert the root group into the path table (takes ownership of path) */
ref_path_table_put(root_path, oinfo.addr);
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 66966d8..80839ce 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -872,7 +872,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
const char *path;
obj = H5Rdereference(container, H5R_OBJECT, vp);
- H5Oget_info(obj, ".", &oi, H5P_DEFAULT);
+ H5Oget_info(obj, &oi);
/* Print object type and close object */
switch(oi.type) {
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index fba76ad..cb38e7a 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -487,7 +487,7 @@ find_objs_cb(hid_t group, const char *name, const H5L_info_t UNUSED *linfo, void
find_objs_t *info = (find_objs_t*)op_data;
herr_t ret_value = 0;
- if(H5Oget_info(group, name, &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0)
; /* keep going */
else {
switch(oinfo.type) {
@@ -526,7 +526,7 @@ find_objs_cb(hid_t group, const char *name, const H5L_info_t UNUSED *linfo, void
type = H5Dget_type(dset);
if(H5Tcommitted(type) > 0) {
- H5Oget_info(type, ".", &oinfo, H5P_DEFAULT);
+ H5Oget_info(type, &oinfo);
if(search_obj(info->type_table, oinfo.addr) == NULL) {
char *type_name = HDstrdup(tmp);
@@ -603,7 +603,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
info->dset_table = *dset_table;
/* add the root group as an object, it may have hard links to it */
- if(H5Oget_info(fid, "/", &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info(fid, &oinfo) < 0)
return FAIL;
else {
/* call with an empty string, it appends '/' group separator */
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 14c59c4..97de021 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -155,7 +155,7 @@ traverse_cb(hid_t loc_id, const char *link_name, const H5L_info_t *linfo,
H5O_info_t oinfo;
/* Get information about the object */
- if(H5Oget_info(loc_id, link_name, &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name(loc_id, link_name, &oinfo, H5P_DEFAULT) < 0)
return(H5_ITER_ERROR);
/* If the object has multiple links, add it to the list of addresses
@@ -224,7 +224,7 @@ traverse(hid_t file_id, const trav_visitor_t *visitor)
trav_ud_traverse_t udata; /* User data for iteration callback */
/* Get info for root group */
- if(H5Oget_info(file_id, "/", &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info(file_id, &oinfo) < 0)
return -1;
/* Visit the root group of the file */