diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-30 20:03:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-30 20:03:37 (GMT) |
commit | a4069db8f48121ca11d0465b260d9cd81152581b (patch) | |
tree | 37348ad7d71058a6f449255073d631db8c33794a /tools/lib | |
parent | 1374654210854d005546459e48c482c5ea01cba2 (diff) | |
download | hdf5-a4069db8f48121ca11d0465b260d9cd81152581b.zip hdf5-a4069db8f48121ca11d0465b260d9cd81152581b.tar.gz hdf5-a4069db8f48121ca11d0465b260d9cd81152581b.tar.bz2 |
[svn-r14131] Description:
Move H5Giterate() and H5G_iterate_t to deprecated symbols section,
replacing them with H5Literate and H5L_iterate_t respectively.
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
AIX/32 5.3 (copper)
Solaris/32 5.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5tools.c | 3 | ||||
-rw-r--r-- | tools/lib/h5tools.h | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_ref.c | 5 | ||||
-rw-r--r-- | tools/lib/h5tools_ref.h | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 6 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.c | 9 | ||||
-rw-r--r-- | tools/lib/h5trav.c | 34 |
7 files changed, 31 insertions, 30 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 5334a51..50bc6cd 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -894,9 +894,8 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset if (count == 1) flags |= END_OF_DATA; - for (i = 0; i < ctx.ndims; i++) { + for (i = 0; i < ctx.ndims; i++) ctx.p_max_idx[i] = ctx.p_min_idx[i] + MIN(total_size[i], sm_size[i]); - } /* print array indices. get the lower bound of the hyperslab and calulate the element position at the start of hyperslab */ diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 6313992..dad73e7 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -348,7 +348,7 @@ typedef struct h5tools_context_t { size_t cur_column; /*current column for output */ size_t cur_elmt; /*current element/output line */ int need_prefix; /*is line prefix needed? */ - int ndims; /*dimensionality */ + unsigned ndims; /*dimensionality */ hsize_t p_min_idx[H5S_MAX_RANK]; /*min selected index */ hsize_t p_max_idx[H5S_MAX_RANK]; /*max selected index */ int prev_multiline; /*was prev datum multiline? */ diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 2a7a4ff..0b17b41 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -339,7 +339,8 @@ lookup_ref_path(haddr_t ref) *------------------------------------------------------------------------- */ herr_t -fill_ref_path_table(hid_t group, const char *obj_name, void *op_data) +fill_ref_path_table(hid_t group, const char *obj_name, const H5L_info_t UNUSED *linfo, + void *op_data) { const char *obj_prefix = (const char *)op_data; H5G_stat_t statbuf; @@ -372,7 +373,7 @@ fill_ref_path_table(hid_t group, const char *obj_name, void *op_data) /* Iterate over objects in this group, using this group's * name as their prefix */ - if(H5Giterate(group, obj_name, NULL, fill_ref_path_table, thepath) < 0) { + if(H5Literate(group, obj_name, H5_INDEX_NAME, H5_ITER_INC, NULL, fill_ref_path_table, thepath, H5P_DEFAULT) < 0) { error_msg(progname, "unable to dump group \"%s\"\n", obj_name); d_status = EXIT_FAILURE; } diff --git a/tools/lib/h5tools_ref.h b/tools/lib/h5tools_ref.h index 1922e02..d996114 100644 --- a/tools/lib/h5tools_ref.h +++ b/tools/lib/h5tools_ref.h @@ -24,7 +24,7 @@ extern "C" { int init_ref_path_table(hid_t fid); const char *lookup_ref_path(haddr_t ref); -herr_t fill_ref_path_table(hid_t, const char *, void *); +herr_t fill_ref_path_table(hid_t, const char *, const H5L_info_t *, void *); int get_next_xid(void); haddr_t get_fake_xid (void); haddr_t ref_path_table_lookup(const char *); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index d00d0e7..737c68a 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -845,15 +845,15 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (h5tools_is_zero(vp, H5Tget_size(type))) { h5tools_str_append(str, "NULL"); } else { - char name[1024]; + char ref_name[1024]; obj = H5Rdereference(container, H5R_DATASET_REGION, vp); region = H5Rget_region(container, H5R_DATASET_REGION, vp); H5Gget_objinfo(obj, ".", FALSE, &sb); /* get name of the dataset the region reference points to using H5Rget_name */ - H5Rget_name(obj, H5R_DATASET_REGION, vp, (char*)name, 1024); - h5tools_str_append(str, info->dset_format, name); + H5Rget_name(obj, H5R_DATASET_REGION, vp, (char*)ref_name, 1024); + h5tools_str_append(str, info->dset_format, ref_name); h5tools_str_dump_region(str, region, info); H5Sclose(region); diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index bba2973..b04f3c6 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -46,7 +46,8 @@ static void dump_table(char* tablename, table_t *table); #endif /* H5DUMP_DEBUG */ static void add_obj(table_t *table, haddr_t objno, char *objname, hbool_t recorded); static char * build_obj_path_name(const char *prefix, const char *name); -static herr_t find_objs_cb(hid_t group, const char *name, void *op_data); +static herr_t find_objs_cb(hid_t group, const char *name, const H5L_info_t *info, + void *op_data); /*------------------------------------------------------------------------- @@ -480,7 +481,7 @@ build_obj_path_name(const char *prefix, const char *name) *------------------------------------------------------------------------- */ static herr_t -find_objs_cb(hid_t group, const char *name, void *op_data) +find_objs_cb(hid_t group, const char *name, const H5L_info_t UNUSED *linfo, void *op_data) { H5G_stat_t statbuf; find_objs_t *info = (find_objs_t*)op_data; @@ -508,7 +509,7 @@ find_objs_cb(hid_t group, const char *name, void *op_data) info->prefix = HDmalloc(tmp_len+1); HDstrcpy(info->prefix, tmp); - if(H5Giterate(group, name, NULL, find_objs_cb, (void *)info) < 0) + if(H5Literate(group, name, H5_INDEX_NAME, H5_ITER_INC, NULL, find_objs_cb, (void *)info, H5P_DEFAULT) < 0) ret_value = FAIL; info->prefix = old_prefix; @@ -625,7 +626,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table, /* Find all shared objects */ - return(H5Giterate(fid, "/", NULL, find_objs_cb, (void *)info)); + return(H5Literate(fid, "/", H5_INDEX_NAME, H5_ITER_INC, NULL, find_objs_cb, (void *)info, H5P_DEFAULT)); } diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 7ba2cc3..37fa9a1 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -371,19 +371,19 @@ static hssize_t get_nnames( hid_t loc_id, const char *group_name ) *------------------------------------------------------------------------- */ -static herr_t opget_info( hid_t loc_id, const char *name, void *op_data) +static herr_t +opget_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_data) { + H5G_stat_t statbuf; - H5G_stat_t statbuf; + if(H5Gget_objinfo(loc_id, name, FALSE, &statbuf) < 0) + return -1; - if (H5Gget_objinfo( loc_id, name, FALSE, &statbuf) < 0 ) - return -1; - - ((trav_info_t *)op_data)->type = statbuf.type; - ((trav_info_t *)op_data)->name = (char *)HDstrdup(name); + ((trav_info_t *)op_data)->type = statbuf.type; + ((trav_info_t *)op_data)->name = (char *)HDstrdup(name); - /* Define 1 for return. This will cause the iterator to stop */ - return 1; + /* Define 1 for return. This will cause the iterator to stop */ + return 1; } @@ -410,20 +410,20 @@ static herr_t opget_info( hid_t loc_id, const char *name, void *op_data) static herr_t get_name_type( hid_t loc_id, const char *group_name, - int idx, + int _idx, char **name, H5G_obj_t *type ) { + trav_info_t info; + hsize_t idx = (hsize_t)_idx; - trav_info_t info; + if(H5Literate(loc_id, group_name, H5_INDEX_NAME, H5_ITER_INC, &idx, opget_info, (void *)&info, H5P_DEFAULT) < 0) + return -1; - if (H5Giterate( loc_id, group_name, &idx, opget_info, (void *)&info) < 0 ) - return -1; - - *name = info.name; - *type = info.type; + *name = info.name; + *type = info.type; - return 0; + return 0; } /*------------------------------------------------------------------------- |