summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-12-19 18:14:26 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-12-19 18:14:26 (GMT)
commitf2344833726caadaec1e26404549cb1d445c85cc (patch)
treee39f226c7eb0688202733146f793e5c1880d6ece /tools/lib/h5tools_str.c
parentd4946be1f210ec189296c7e10167f2deffca87fc (diff)
downloadhdf5-f2344833726caadaec1e26404549cb1d445c85cc.zip
hdf5-f2344833726caadaec1e26404549cb1d445c85cc.tar.gz
hdf5-f2344833726caadaec1e26404549cb1d445c85cc.tar.bz2
[svn-r13076]
fix for bugzilla bug #551 several programming errors contributed to this bug 1) the parsing of subsetting was using atoi to convert the parameter to an int, which caused problems for numbers greater that int. Substitute with atof 2) several index counters were declared as int, use hsize_t instead 3) the numerical format passed for printf was %lu, defined one compatible with hsize_t instead (unsigned long long)
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 76bb81f..a1cfc83 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -28,6 +28,7 @@
#include "h5tools_ref.h"
#include "h5tools_str.h" /*function prototypes */
+
/*
* If REPEAT_VERBOSE is defined then character strings will be printed so
* that repeated character sequences like "AAAAAAAAAA" are displayed as
@@ -335,12 +336,13 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
if (i)
h5tools_str_append(str, "%s", OPT(info->idx_sep, ","));
- h5tools_str_append(str, OPT(info->idx_n_fmt, "%lu"),
- (unsigned long)ctx->pos[i]);
+ h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT),
+ (hsize_t)ctx->pos[i]);
+
}
} else {
/* Scalar */
- h5tools_str_append(str, OPT(info->idx_n_fmt, "%lu"), (unsigned long)0);
+ h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t)0);
}
/* Add prefix and suffix to the index */