summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>2000-12-01 18:25:07 (GMT)
committerRobb Matzke <matzke@llnl.gov>2000-12-01 18:25:07 (GMT)
commitecd06afe4e64d878b582e7313e7d65afe1c6981a (patch)
treee11b5cd94f86e8ca0968c2e498e27712f1e53d5a
parentbad9e4d4a169159a586690a59f0b9aa00401e565 (diff)
downloadhdf5-ecd06afe4e64d878b582e7313e7d65afe1c6981a.zip
hdf5-ecd06afe4e64d878b582e7313e7d65afe1c6981a.tar.gz
hdf5-ecd06afe4e64d878b582e7313e7d65afe1c6981a.tar.bz2
[svn-r3051] ./hdf5/tools/h5ls.c
2000-12-01 Robb Matzke <matzke@llnl.gov> * display_vlen_type: Added function to display name of variable-length datatypes.
-rw-r--r--tools/h5ls.c30
1 files changed, 30 insertions, 0 deletions
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;
}