From 5f91db8d68d20d8106a58467c73fce15a953807a Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Tue, 19 Nov 2002 09:50:04 -0500 Subject: [svn-r6102] Purpose: bug fix Description: forgot to change datatype print-out when fixed VL string bug for h5dump. Platforms tested: modi4 --- tools/h5dump/h5dump.c | 11 ++++++++--- tools/testfiles/tvlstr.h5.xml | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 36250d3..c1abc13 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -3499,7 +3499,8 @@ xml_print_datatype(hid_t type) size_t mpos; size_t msize; int nmembs; - + htri_t is_vlstr=FALSE; + switch (H5Tget_class(type)) { case H5T_INTEGER: indentation(indent); @@ -3593,7 +3594,8 @@ xml_print_datatype(hid_t type) size = H5Tget_size(type); str_pad = H5Tget_strpad(type); cset = H5Tget_cset(type); - + is_vlstr = H5Tis_variable_str(type); + indentation(indent); printf("\n"); indent += COL; @@ -3604,7 +3606,10 @@ xml_print_datatype(hid_t type) } else { printf("unknown_cset\" "); } - printf("StrSize=\"%d\" StrPad=\"", (int) size); + if(is_vlstr) + printf("StrSize=\"H5T_VARIABLE\" StrPad=\""); + else + printf("StrSize=\"%d\" StrPad=\"", (int) size); if (str_pad == H5T_STR_NULLTERM) { printf("H5T_STR_NULLTERM\"/>\n"); } else if (str_pad == H5T_STR_NULLPAD) { diff --git a/tools/testfiles/tvlstr.h5.xml b/tools/testfiles/tvlstr.h5.xml index 3e5b07e..273b23a 100644 --- a/tools/testfiles/tvlstr.h5.xml +++ b/tools/testfiles/tvlstr.h5.xml @@ -11,7 +11,7 @@ Expected output for 'h5dump --xml tvlstr.h5' - + @@ -23,7 +23,7 @@ Expected output for 'h5dump --xml tvlstr.h5' - + @@ -35,7 +35,7 @@ Expected output for 'h5dump --xml tvlstr.h5' - + -- cgit v0.12