summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPeter Cao <xcao@hdfgroup.org>2011-03-09 13:07:38 (GMT)
committerPeter Cao <xcao@hdfgroup.org>2011-03-09 13:07:38 (GMT)
commita56b49aaba5f5b6ad15ddf4dfc044a4bf55885a9 (patch)
tree71806a343c43b7607d62a85f0b9b0dd3996c57a7 /tools
parentb22867e42b6fba61151f387a459b2c47844eabde (diff)
downloadhdf5-a56b49aaba5f5b6ad15ddf4dfc044a4bf55885a9.zip
hdf5-a56b49aaba5f5b6ad15ddf4dfc044a4bf55885a9.tar.gz
hdf5-a56b49aaba5f5b6ad15ddf4dfc044a4bf55885a9.tar.bz2
[svn-r20206] Updated manifest and source code for fixing h5dump -y -o problem
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/testh5dump.sh.in3
-rw-r--r--tools/lib/h5tools.c18
2 files changed, 12 insertions, 9 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 96be2b9..37dee72 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -633,6 +633,9 @@ TOOLTEST textlink.ddl textlink.h5
# test for error stack display (BZ2048)
TOOLTEST3 filter_fail.ddl -E filter_fail.h5
+# test for -o -y for dataset with attributes
+TOOLTEST tall-6.ddl -y -o data -d /g1/g1.1/dset1.1.1 tall.h5
+
# Report test results and exit
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index e7ba801..00040ad 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -909,19 +909,19 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
h5tools_str_append(&buffer, info->dset_format, ref_name);
- dimension_break = h5tools_render_element(stream, info,
+ dimension_break = h5tools_render_element(stdout, info,
ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
region_type = H5Sget_select_type(region_space);
if(region_type==H5S_SEL_POINTS)
/* Print point information */
dimension_break = h5tools_dump_region_data_points(
- region_space, region_id, stream, info, ctx,
+ region_space, region_id, stdout, info, ctx,
&buffer, &curr_pos, ncols, i, elmt_counter);
else if(region_type==H5S_SEL_HYPERSLABS)
/* Print block information */
dimension_break = h5tools_dump_region_data_blocks(
- region_space, region_id, stream, info, ctx,
+ region_space, region_id, stdout, info, ctx,
&buffer, &curr_pos, ncols, i, elmt_counter);
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "invalid region type");
@@ -950,7 +950,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
if (i + 1 < nelmts || (flags & END_OF_DATA) == 0)
h5tools_str_append(&buffer, "%s", OPT(info->elmt_suf1, ","));
- dimension_break = h5tools_render_element(rawdatastream, info, ctx, &buffer,
+ dimension_break = h5tools_render_element(stream, info, ctx, &buffer,
&curr_pos, ncols, i, elmt_counter);
/* Render the data element end*/
@@ -2310,9 +2310,9 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
/* Terminate the output */
if (ctx.cur_column) {
- fputs(OPT(info->line_suf, ""), stream);
- putc('\n', stream);
- fputs(OPT(info->line_sep, ""), stream);
+ fputs(OPT(info->line_suf, ""), stdout);
+ putc('\n', stdout);
+ fputs(OPT(info->line_sep, ""), stdout);
}
CATCH
@@ -2657,9 +2657,9 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, hid_t dset,
/* Print the data */
if (space_type == H5S_SIMPLE || space_type == H5S_SCALAR) {
if(!sset)
- status = h5tools_dump_simple_dset(stream, info, dset, p_type, indentlevel);
+ status = h5tools_dump_simple_dset(rawdatastream, info, dset, p_type, indentlevel);
else
- status = h5tools_dump_simple_subset(stream, info, dset, p_type, sset, indentlevel);
+ status = h5tools_dump_simple_subset(rawdatastream, info, dset, p_type, sset, indentlevel);
}
else
/* space is H5S_NULL */