summaryrefslogtreecommitdiffstats
path: root/tools/h5ls
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-27 13:34:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-27 13:34:28 (GMT)
commitfefbe61aca1a42e716e900be7af5b382be5e19c1 (patch)
treedbb600c8b6555569a4d94ff69b24e72c4787693d /tools/h5ls
parent538d37a1bcc15a600c71fad0566d8480c2344ee6 (diff)
downloadhdf5-fefbe61aca1a42e716e900be7af5b382be5e19c1.zip
hdf5-fefbe61aca1a42e716e900be7af5b382be5e19c1.tar.gz
hdf5-fefbe61aca1a42e716e900be7af5b382be5e19c1.tar.bz2
[svn-r11304] Purpose:
Code cleanup (sorta) Description: Adjust H5G_stat_t to prepare for eventual "external link" information. This also puts the information for regular objects and soft links into more obviously separate places. Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4
Diffstat (limited to 'tools/h5ls')
-rw-r--r--tools/h5ls/h5ls.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index a1a7f3b..75e4218 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -149,7 +149,7 @@ sym_insert(H5G_stat_t *sb, const char *name)
/* Don't add it if the link count is 1 because such an object can only
* have one name. */
- if (sb->nlink<2) return;
+ if (sb->u.obj.nlink<2) return;
/* Extend the table */
if (idtab_g.nobjs>=idtab_g.nalloc) {
@@ -160,7 +160,7 @@ sym_insert(H5G_stat_t *sb, const char *name)
/* Insert the entry */
n = idtab_g.nobjs++;
- idtab_g.obj[n].id = sb->objno;
+ idtab_g.obj[n].id = sb->u.obj.objno;
idtab_g.obj[n].name = HDstrdup(name);
}
@@ -186,9 +186,9 @@ sym_lookup(H5G_stat_t *sb)
{
int n;
- if (sb->nlink<2) return NULL; /*only one name possible*/
+ if (sb->u.obj.nlink<2) return NULL; /*only one name possible*/
for (n=0; n<idtab_g.nobjs; n++) {
- if (idtab_g.obj[n].id==sb->objno)
+ if (idtab_g.obj[n].id==sb->u.obj.objno)
return idtab_g.obj[n].name;
}
return NULL;
@@ -1176,7 +1176,7 @@ display_type(hid_t type, int ind)
if (H5Tcommitted(type)) {
if (H5Gget_objinfo(type, ".", FALSE, &sb)>=0) {
printf("shared-%lu:"H5_PRINTF_HADDR_FMT" ",
- sb.fileno, sb.objno);
+ sb.fileno, sb.u.obj.objno);
} else {
printf("shared ");
}
@@ -1824,11 +1824,11 @@ list (hid_t group, const char *name, void *_iter)
if (verbose_g>0 && H5G_LINK!=sb.type) {
if (sb.type>=0)
H5Aiterate(obj, NULL, list_attr, NULL);
- printf(" %-10s %lu:"H5_PRINTF_HADDR_FMT"\n", "Location:", sb.fileno, sb.objno);
- printf(" %-10s %u\n", "Links:", sb.nlink);
- if (sb.mtime>0) {
- if (simple_output_g) tm=gmtime(&(sb.mtime));
- else tm=localtime(&(sb.mtime));
+ printf(" %-10s %lu:"H5_PRINTF_HADDR_FMT"\n", "Location:", sb.fileno, sb.u.obj.objno);
+ printf(" %-10s %u\n", "Links:", sb.u.obj.nlink);
+ if (sb.u.obj.mtime>0) {
+ if (simple_output_g) tm=gmtime(&(sb.u.obj.mtime));
+ else tm=localtime(&(sb.u.obj.mtime));
if (tm) {
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
printf(" %-10s %s\n", "Modified:", buf);