summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-02-21 15:00:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-02-21 15:00:37 (GMT)
commit147edec689b35162a38f13033565f2ca17a60661 (patch)
tree7c372899a359063e8c9a256a15b3bb5b53c01c7e /tools
parent1d0c7360efe514761da8f424a75a80a1c9f1dcf8 (diff)
downloadhdf5-147edec689b35162a38f13033565f2ca17a60661.zip
hdf5-147edec689b35162a38f13033565f2ca17a60661.tar.gz
hdf5-147edec689b35162a38f13033565f2ca17a60661.tar.bz2
[svn-r21966] Index used in printing data uses hsize_t variables. Changed h5ls format to use HSIZE_T_FORMAT.
Tested: local linux and windows 32
Diffstat (limited to 'tools')
-rw-r--r--tools/h5ls/h5ls.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 6b4d5f0..55103a1 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -80,7 +80,7 @@ static h5tool_format_t ls_dataformat = {
",", /*elmt_suf1 */
" ", /*elmt_suf2 */
- "%lu", /*idx_n_fmt */
+ HSIZE_T_FORMAT, /*idx_n_fmt */
",", /*idx_sep */
"(%s)", /*idx_fmt */
@@ -2000,18 +2000,19 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "0x");
for (j=0; j<dst_size; j++)
h5tools_str_append(buffer, "%02x", value[i*dst_size+j]);
- } else if (H5T_SGN_NONE==H5Tget_sign(native)) {
- /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
- *strangely, unless use another pointer "copy".*/
- copy = value+i*dst_size;
- h5tools_str_append(buffer, "%"H5_PRINTF_LL_WIDTH"u",
- *((unsigned long long*)((void*)copy)));
- } else {
- /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
- *strangely, unless use another pointer "copy".*/
- copy = value+i*dst_size;
- h5tools_str_append(buffer, "%"H5_PRINTF_LL_WIDTH"d",
- *((long long*)((void*)copy)));
+ }
+ else if (H5T_SGN_NONE==H5Tget_sign(native)) {
+ /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
+ *strangely, unless use another pointer "copy".*/
+ copy = value+i*dst_size;
+ h5tools_str_append(buffer, HSIZE_T_FORMAT, *((unsigned long long*)((void*)copy)));
+ }
+ else {
+ /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
+ *strangely, unless use another pointer "copy".*/
+ copy = value+i*dst_size;
+ h5tools_str_append(buffer, "%"H5_PRINTF_LL_WIDTH"d",
+ *((long long*)((void*)copy)));
}
}