From 4ed4c8fb47fd4718b2727be79cf91a3d75e1e83d Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Fri, 3 Dec 1999 14:43:56 -0500 Subject: [svn-r1852] fixed a bug that i introduced with the last change to this file. --- tools/h5tools.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/h5tools.c b/tools/h5tools.c index f857970..a1048ed 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -2202,6 +2202,7 @@ static void display_string switch (H5Tget_class(memb)) { case H5T_INTEGER: indentation(indent+COL); + indent += 2; if (nelmts > 1) { printf("[ "); } @@ -2210,10 +2211,12 @@ static void display_string if (nelmts > 1) { printf(" ]"); } + indent -= 2; break; case H5T_FLOAT: indentation(indent+COL); + indent += 2; if (nelmts > 1) { printf("[ "); } @@ -2222,6 +2225,7 @@ static void display_string if (nelmts > 1) { printf(" ]"); } + indent -= 2; break; case H5T_TIME: @@ -2230,10 +2234,17 @@ static void display_string case H5T_STRING: indentation(indent+COL); - display_string + indent += 2; + if (nelmts > 1) { + printf("[ "); + } + display_string (nelmts, memb, sm_buf+offset+i*p_type_nbytes, size, nelmts, dim_n_size, 0 ) ; - - break; + if (nelmts > 1) { + printf(" ]"); + } + indent -= 2; + break; case H5T_BITFIELD: @@ -2250,8 +2261,8 @@ static void display_string } - if ( j == nmembs-1) printf(" \n"); - else printf(" ,\n"); + if ( j == nmembs-1) printf("\n"); + else printf(",\n"); H5Tclose(memb); } -- cgit v0.12