summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c11
1 files changed, 8 insertions, 3 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("<AtomicType>\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) {