diff options
author | Albert Cheng <acheng@hdfgroup.org> | 1998-06-19 15:26:36 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 1998-06-19 15:26:36 (GMT) |
commit | bc621179243cc4070a57986b8ac5607026fe87f7 (patch) | |
tree | 5f7ac2b7d0b35c9972567a7499601f2169b1114a /src | |
parent | 23465486edeb6e9d76ae795d523bedbf4e665d64 (diff) | |
download | hdf5-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.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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); |