summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
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/lib/h5trav.c
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/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index e3578c9..5030e37 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -370,10 +370,10 @@ int traverse( hid_t loc_id,
inserted_objs++;
/* nlink is number of hard links to object */
- if (statbuf.nlink > 0 && trav_table_search(statbuf.objno, table ) == -1)
+ if (statbuf.u.obj.nlink > 0 && trav_table_search(statbuf.u.obj.objno, table ) == -1)
{
/* add object to table */
- trav_table_add(statbuf.objno, path, H5G_GROUP, table );
+ trav_table_add(statbuf.u.obj.objno, path, H5G_GROUP, table );
/* print it */
if (print)
@@ -385,9 +385,9 @@ int traverse( hid_t loc_id,
/* search table
group with more than one link to it */
- if (statbuf.nlink > 1)
+ if (statbuf.u.obj.nlink > 1)
{
- if ((j = trav_table_search(statbuf.objno, table )) < 0 )
+ if ((j = trav_table_search(statbuf.u.obj.objno, table )) < 0 )
return -1;
trav_table_addlink(table,j,path);
@@ -418,10 +418,10 @@ int traverse( hid_t loc_id,
inserted_objs++;
/* nlink is number of hard links to object */
- if (statbuf.nlink > 0 && trav_table_search(statbuf.objno, table ) == -1)
+ if (statbuf.u.obj.nlink > 0 && trav_table_search(statbuf.u.obj.objno, table ) == -1)
{
/* add object to table */
- trav_table_add(statbuf.objno, path, H5G_DATASET, table );
+ trav_table_add(statbuf.u.obj.objno, path, H5G_DATASET, table );
/* print it */
if (print)
@@ -430,9 +430,9 @@ int traverse( hid_t loc_id,
/* search table
dataset with more than one link to it */
- if (statbuf.nlink > 1)
+ if (statbuf.u.obj.nlink > 1)
{
- if ((j = trav_table_search(statbuf.objno, table )) < 0 )
+ if ((j = trav_table_search(statbuf.u.obj.objno, table )) < 0 )
return -1;
trav_table_addlink(table,j,path);
@@ -463,10 +463,10 @@ int traverse( hid_t loc_id,
inserted_objs++;
/* nlink is number of hard links to object */
- if (statbuf.nlink > 0 && trav_table_search(statbuf.objno, table ) == -1)
+ if (statbuf.u.obj.nlink > 0 && trav_table_search(statbuf.u.obj.objno, table ) == -1)
{
/* add object to table */
- trav_table_add(statbuf.objno, path, H5G_TYPE, table );
+ trav_table_add(statbuf.u.obj.objno, path, H5G_TYPE, table );
/* print it */
if (print)
@@ -489,12 +489,12 @@ int traverse( hid_t loc_id,
inserted_objs++;
/* add object to table */
- trav_table_add(statbuf.objno, path, H5G_LINK, table );
+ trav_table_add(statbuf.u.obj.objno, path, H5G_LINK, table );
- if (statbuf.linklen>0)
+ if (statbuf.u.slink.linklen>0)
{
- targbuf=malloc(statbuf.linklen);
- H5Gget_linkval(loc_id,path,statbuf.linklen,targbuf);
+ targbuf=malloc(statbuf.u.slink.linklen);
+ H5Gget_linkval(loc_id,path,statbuf.u.slink.linklen,targbuf);
if (print)
printf(" %-10s %s -> %s\n", "link", path, targbuf);
if (targbuf)