diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-04-14 16:44:46 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-04-14 16:44:46 (GMT) |
commit | b6fc6ede10fee24e9ef0a21df81cc181f6d7fec0 (patch) | |
tree | 66321165e4bd58a9fe3722a1a3baee2f835d0544 /src/h5ls.c | |
parent | 3f571b6b4499e09aa6db29cb389e1121624a081d (diff) | |
download | hdf5-b6fc6ede10fee24e9ef0a21df81cc181f6d7fec0.zip hdf5-b6fc6ede10fee24e9ef0a21df81cc181f6d7fec0.tar.gz hdf5-b6fc6ede10fee24e9ef0a21df81cc181f6d7fec0.tar.bz2 |
[svn-r346] Changes since 19980410
----------------------
./html/H5.format.html
./src/H5E.c
./src/H5Epublic.h
./src/H5F.c
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gprivate.h
./src/h5ls.c
./test/Makefile.in
Symbolic links are now supported. The ./test/links program
will create a `links.h5' file that demonstrates hard links,
soft links, dangling links, and recursive links. A symbolic
link is a symbol table entity and doesn't have an object
header. It's format is described in H5.format.hml.
./src/H5G.c
./src/H5Gpublic.h
./src/h5ls.c
Implemented H5Gstat() and H5Gget_linkval() as documented by
Quincey. The `H5G_type_t type' field of `H5G_stat_t' was
changed to `int type' because H5G_type_t was already used and
the `type' data type should be open-ended.
./src/H5Ffamily.c
Removed an incorrect diagnostic message.
./test/big.c
Added read/write calls to test partial I/O to big contiguous
datasets. With no arguments it writes to a dataset and prints
the list of points written which should be redirected to a
file. With an argument (the name of a file containing the
stdout of a run with no arguments) values are read from the
dataset. One would typically say `big >x && big x'.
Diffstat (limited to 'src/h5ls.c')
-rw-r--r-- | src/h5ls.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -44,13 +44,22 @@ list (hid_t group, const char *name, void __unused__ *op_data) hid_t (*func)(void*); void *edata; int i; - + char linkval[512]; + H5G_stat_t statbuf; + /* Disable error reporting */ H5Eget_auto (&func, &edata); H5Eset_auto (NULL, NULL); /* Print info about each name */ printf ("%-30s", name); + + if (H5Gstat (group, name, TRUE, &statbuf)>=0) { + printf ("FILE={%lu,%lu}, OID={%lu,%lu} ", + statbuf.fileno[0], statbuf.fileno[1], + statbuf.objno[0], statbuf.objno[1]); + } + if ((obj=H5Dopen (group, name))>=0) { hsize_t size[64]; hid_t space = H5Dget_space (obj); @@ -65,6 +74,11 @@ list (hid_t group, const char *name, void __unused__ *op_data) } else if ((obj=H5Gopen (group, name))>=0) { printf (" Group\n"); H5Gclose (obj); + } else if (H5Gget_linkval (group, name, sizeof(linkval), linkval)>=0) { + if (NULL==HDmemchr (linkval, 0, sizeof(linkval))) { + strcpy (linkval+sizeof(linkval)-4, "..."); + } + printf (" -> %s\n", linkval); } else { printf (" Unknown Type\n"); } |