From b3c3c8ea724a844ad95d08cf37726791deddb9a3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 4 Mar 2015 14:14:50 -0500 Subject: [svn-r26361] Added check for unlimited to count/block print selection --- tools/lib/h5tools_str.c | 16 ++++++++++++---- 1 file 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); -- cgit v0.12