diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-09-01 10:27:45 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-09-01 10:27:45 (GMT) |
commit | 642f392ba3e2d30ae2a82e32f249461121d17cbc (patch) | |
tree | bbce1ae1606153f323156f207b50d88d7fba2ddf /tools/lib/h5tools_str.c | |
parent | c034336452ee48574f0dd65bf053079f9801e269 (diff) | |
download | hdf5-642f392ba3e2d30ae2a82e32f249461121d17cbc.zip hdf5-642f392ba3e2d30ae2a82e32f249461121d17cbc.tar.gz hdf5-642f392ba3e2d30ae2a82e32f249461121d17cbc.tar.bz2 |
[svn-r19330] Description:
Bring r19109:19328 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.4 (amazon) in debug mode
Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r-- | tools/lib/h5tools_str.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 55596cd..c5f10b8 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -305,8 +305,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt) */ char * h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info, - hsize_t elmtno, unsigned ndims, hsize_t min_idx[], - hsize_t max_idx[], h5tools_context_t *ctx) + hsize_t elmtno, unsigned ndims, h5tools_context_t *ctx) { size_t i = 0; hsize_t curr_pos = elmtno; @@ -358,7 +357,7 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info, */ char * h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, - hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t min_idx[], hsize_t max_idx[], + hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t max_idx[], h5tools_context_t *ctx) { hsize_t p_prod[H5S_MAX_RANK]; @@ -414,7 +413,7 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, */ void h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, - const h5tool_format_t *info, h5tools_context_t *ctx) + const h5tool_format_t *info) { hssize_t nblocks; hsize_t alloc_size; @@ -434,7 +433,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); assert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/ - ptdata = malloc((size_t) alloc_size); + ptdata = (hsize_t *)malloc((size_t) alloc_size); H5_CHECK_OVERFLOW(nblocks, hssize_t, hsize_t); H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata); @@ -475,7 +474,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, */ void h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region, - const h5tool_format_t *info, h5tools_context_t *ctx) + const h5tool_format_t *info) { hssize_t npoints; hsize_t alloc_size; @@ -495,7 +494,7 @@ h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region, alloc_size = npoints * ndims * sizeof(ptdata[0]); assert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/ - ptdata = malloc((size_t) alloc_size); + ptdata = (hsize_t *)malloc((size_t) alloc_size); H5_CHECK_OVERFLOW(npoints, hssize_t, hsize_t); H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata); @@ -639,7 +638,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai char *name; unsigned char *ucp_vp = (unsigned char *)vp; char *cp_vp = (char *)vp; - hid_t memb, obj, region; + hid_t memb, obj; unsigned nmembs; static char fmt_llong[8], fmt_ullong[8]; H5T_str_t pad; @@ -934,7 +933,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, "NULL"); } else { - h5tools_str_sprint_region(str, info, container, vp, ctx); + h5tools_str_sprint_region(str, info, container, vp); } } else if (H5Tequal(type, H5T_STD_REF_OBJ)) { @@ -1112,7 +1111,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai */ void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, - hid_t container, void *vp, h5tools_context_t *ctx) + hid_t container, void *vp) { hid_t obj, region; char ref_name[1024]; @@ -1130,9 +1129,9 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, region_type = H5Sget_select_type(region); if(region_type==H5S_SEL_POINTS) - h5tools_str_dump_region_points(str, region, info, ctx); + h5tools_str_dump_region_points(str, region, info); else - h5tools_str_dump_region_blocks(str, region, info, ctx); + h5tools_str_dump_region_blocks(str, region, info); h5tools_str_append(str, "}"); |