From ecd06afe4e64d878b582e7313e7d65afe1c6981a Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Fri, 1 Dec 2000 13:25:07 -0500 Subject: [svn-r3051] ./hdf5/tools/h5ls.c 2000-12-01 Robb Matzke * display_vlen_type: Added function to display name of variable-length datatypes. --- tools/h5ls.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tools/h5ls.c b/tools/h5ls.c index 341308b..f792a19 100644 --- a/tools/h5ls.c +++ b/tools/h5ls.c @@ -1037,6 +1037,35 @@ display_opaque_type(hid_t type, int ind) return TRUE; } +/*------------------------------------------------------------------------- + * Function: display_vlen_type + * + * Purpose: Print information about a variable-length type + * + * Return: Success: TRUE + * + * Failure: FALSE + * + * Programmer: Robb Matzke + * Friday, December 1, 2000 + * + * Modifications: + *------------------------------------------------------------------------- + */ +static hbool_t +display_vlen_type(hid_t type, int ind) +{ + hid_t super; + + if (H5T_VLEN!=H5Tget_class(type)) return FALSE; + + printf("variable length of\n%*s", ind+4, ""); + super = H5Tget_super(type); + display_type(super, ind+4); + H5Tclose(super); + return TRUE; +} + /*------------------------------------------------------------------------- * Function: display_type @@ -1090,6 +1119,7 @@ display_type(hid_t type, int ind) display_enum_type(type, ind) || display_string_type(type, ind) || display_reference_type(type, ind) || + display_vlen_type(type, ind) || display_opaque_type(type, ind)) { return; } -- cgit v0.12