summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-01-05 20:18:16 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-01-05 20:18:16 (GMT)
commitf3c2eb9acfd1242618bc314efffac1e0471727e9 (patch)
tree2ac2051021d8ea1f7e113518eb79352feb957d2e /tools/lib
parent5f00939eb90d3074c5ce2cfe3526cfc2e147bf88 (diff)
downloadhdf5-f3c2eb9acfd1242618bc314efffac1e0471727e9.zip
hdf5-f3c2eb9acfd1242618bc314efffac1e0471727e9.tar.gz
hdf5-f3c2eb9acfd1242618bc314efffac1e0471727e9.tar.bz2
[svn-r19918] Add hh modifier to signed char printf format string. Added h5dump test to verify that signed/unsigned datasets print correctly.
Bring solution from 1.8 packed bits fix which solved problem on heiwa with Signed char of 8 bits Tested: local linux
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.c2
-rw-r--r--tools/lib/h5tools_str.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 896c310..7aee7bc 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -49,7 +49,7 @@ static h5tool_format_t h5tools_dataformat = {
"", /*fmt_raw */
"%d", /*fmt_int */
"%u", /*fmt_uint */
-"%d", /*fmt_schar */
+"%hhd", /*fmt_schar */
"%u", /*fmt_uchar */
"%d", /*fmt_short */
"%u", /*fmt_ushort */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index c5f10b8..8c9960f 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -789,7 +789,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
}
else if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
- h5tools_str_append(str, OPT(info->fmt_schar, "%d"), *cp_vp);
+ h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), *cp_vp);
}
else if (H5Tequal(type, H5T_NATIVE_UCHAR)) {
h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), *ucp_vp);