summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-03-04 19:14:50 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-03-04 19:14:50 (GMT)
commitb3c3c8ea724a844ad95d08cf37726791deddb9a3 (patch)
treeee107063d7c991be1a6693a30243f48df50679ff /tools/lib/h5tools_str.c
parente2175fd0ca8e00af14c97f4a103c31e8ae19b490 (diff)
downloadhdf5-b3c3c8ea724a844ad95d08cf37726791deddb9a3.zip
hdf5-b3c3c8ea724a844ad95d08cf37726791deddb9a3.tar.gz
hdf5-b3c3c8ea724a844ad95d08cf37726791deddb9a3.tar.bz2
[svn-r26361] Added check for unlimited to count/block print selection
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 94b0ff2..6aab146 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -468,16 +468,24 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace,
/* Count coordinates */
h5tools_str_append(str, "%s ", COUNT);
- for (j = 0; j < ndims; j++)
- h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]);
+ for (j = 0; j < ndims; j++) {
+ if(count[j] == H5S_UNLIMITED)
+ h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED");
+ else
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]);
+ }
h5tools_str_append(str, ");");
h5tools_str_append(str, "%s", "\n");
h5tools_str_indent(str, info, ctx);
/* Block coordinates */
h5tools_str_append(str, "%s ", BLOCK);
- for (j = 0; j < ndims; j++)
- h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]);
+ for (j = 0; j < ndims; j++) {
+ if(block[j] == H5S_UNLIMITED)
+ h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED");
+ else
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]);
+ }
h5tools_str_append(str, ");");
h5tools_str_append(str, "%s", "\n");
h5tools_str_indent(str, info, ctx);