summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2012-04-02 18:28:14 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2012-04-02 18:28:14 (GMT)
commitd41e30a716594bf4a353ad3a178428c839d05d80 (patch)
tree21821547abfd2ad79ecc9df519314238bfa96764
parentbd26865f7d69fed1e926e6a3ec5f8653ae0eb6da (diff)
downloadhdf5-d41e30a716594bf4a353ad3a178428c839d05d80.zip
hdf5-d41e30a716594bf4a353ad3a178428c839d05d80.tar.gz
hdf5-d41e30a716594bf4a353ad3a178428c839d05d80.tar.bz2
[svn-r22241] Fix the failures for h5watch due to format indentation.
-rw-r--r--hl/tools/h5watch/h5watch.c7
-rw-r--r--tools/h5stat/testh5stat.sh.in1
-rw-r--r--tools/lib/h5tools_str.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index c9dfcf6..7cf8ff6 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -128,6 +128,7 @@ static struct long_options l_opts[] = {
static herr_t
doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
{
+ h5tools_context_t ctx; /* print context */
h5tool_format_t info; /* Format info for the tools library */
static char fmt_double[16], fmt_float[16]; /* Format info */
struct subset_t subset; /* Subsetting info */
@@ -152,6 +153,8 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
subset.block.data[i] = block[i];
}
+ HDmemset(&ctx, 0, sizeof(ctx));
+
/* Set to all default values and then override */
HDmemset(&info, 0, sizeof info);
@@ -222,9 +225,11 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
}
/* Print the values. */
- if((ret_value = h5tools_dump_dset(stdout, &info, did, -1, &subset, -1)) < 0)
+ if((ret_value = h5tools_dump_dset(stdout, &info, &ctx, did, -1, &subset)) < 0)
error_msg("unable to print data\n");
+ HDfprintf(stdout, "\n");
+
return(ret_value);
} /* doprint() */
diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in
index 7634dc1..74155e9 100644
--- a/tools/h5stat/testh5stat.sh.in
+++ b/tools/h5stat/testh5stat.sh.in
@@ -90,6 +90,7 @@ $SRC_H5STAT_TESTFILES/h5stat_tsohm.ddl
$SRC_H5STAT_TESTFILES/h5stat_newgrat.ddl
$SRC_H5STAT_TESTFILES/h5stat_newgrat-UG.ddl
$SRC_H5STAT_TESTFILES/h5stat_newgrat-UA.ddl
+$SRC_H5STAT_TESTFILES/h5stat_idx.ddl
"
#
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 70787df..9dac227 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1020,8 +1020,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
}
h5tools_str_sprint(str, info, container, listv[curr_field]->last_tid, cp_vp + listv[curr_field]->tot_offset, ctx);
- if(ctx->indent_level >= 0)
- for(x = ctx->indent_level; x >= 0; x--)
+ if(ctx->indent_level > 0)
+ for(x = ctx->indent_level; x > 0; x--)
h5tools_str_append(str, "%s", OPT(info->cmpd_suf, "}"));
ctx->indent_level = save_indent_level;
}