summaryrefslogtreecommitdiffstats
path: root/src/h5ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/h5ls.c')
-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);