summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-06-19 15:26:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-06-19 15:26:36 (GMT)
commitbc621179243cc4070a57986b8ac5607026fe87f7 (patch)
tree5f7ac2b7d0b35c9972567a7499601f2169b1114a /src
parent23465486edeb6e9d76ae795d523bedbf4e665d64 (diff)
downloadhdf5-bc621179243cc4070a57986b8ac5607026fe87f7.zip
hdf5-bc621179243cc4070a57986b8ac5607026fe87f7.tar.gz
hdf5-bc621179243cc4070a57986b8ac5607026fe87f7.tar.bz2
[svn-r433] Added feature to print the maximum dimension sizes of datasets.
Platform tested: O2K.
Diffstat (limited to 'src')
-rw-r--r--src/h5ls.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/h5ls.c b/src/h5ls.c
index 1766983..4b0ea75 100644
--- a/src/h5ls.c
+++ b/src/h5ls.c
@@ -112,11 +112,16 @@ list (hid_t group, const char *name, void __unused__ *op_data)
if ((obj=H5Dopen (group, name))>=0) {
hsize_t size[64];
+ hsize_t maxsize[64];
hid_t space = H5Dget_space (obj);
- int ndims = H5Sget_dims (space, size, NULL);
+ int ndims = H5Sget_dims(space, size, maxsize);
printf ("Dataset {");
for (i=0; i<ndims; i++) {
- HDfprintf (stdout, "%s%Hu", i?", ":"", size[i]);
+ HDfprintf (stdout, "%s%Hu", i?", ":"", size[i]);
+ if (maxsize[i]==H5S_UNLIMITED)
+ HDfprintf (stdout, "/%s", "Inf");
+ else
+ HDfprintf (stdout, "/%Hu", maxsize[i]);
}
printf ("}\n");
H5Dclose (space);