summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-29 23:37:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-29 23:37:41 (GMT)
commit71d6bffdd745c865e988b29fac8d0173d7fa0131 (patch)
tree30e3ef0aece889d65fac25b0b038f6b7cc965497 /tools/lib/h5trav.c
parentdb3c155bf296fa06ab0df56bb7307f2ba19613e5 (diff)
downloadhdf5-71d6bffdd745c865e988b29fac8d0173d7fa0131.zip
hdf5-71d6bffdd745c865e988b29fac8d0173d7fa0131.tar.gz
hdf5-71d6bffdd745c865e988b29fac8d0173d7fa0131.tar.bz2
[svn-r14127] Description:
Move H5Gget_linkval to deprecated symbol section and replace with H5Lget_val for internal calls. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c153
1 files changed, 74 insertions, 79 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index c824b3d..7ba2cc3 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -611,85 +611,80 @@ static int traverse( hid_t loc_id,
break;
- /*-------------------------------------------------------------------------
- * H5G_LINK
- *-------------------------------------------------------------------------
- */
-
- case H5G_LINK:
- {
- /* increment */
- inserted_objs++;
-
- /* add object to table */
- trav_table_add(HADDR_UNDEF, path, H5G_LINK, table );
-
- if (statbuf.linklen>0)
- {
- char *targbuf;
-
- targbuf = HDmalloc(statbuf.linklen);
- assert(targbuf);
- H5Gget_linkval(loc_id,path,statbuf.linklen,targbuf);
- if (print)
- printf(" %-10s %s -> %s\n", "link", path, targbuf);
- free(targbuf);
- }
- else
- {
- if (print)
- printf(" %-10s %s ->\n", "link", path);
- }
- }
-
- break;
-
- /*-------------------------------------------------------------------------
- * H5G_UDLINK
- *-------------------------------------------------------------------------
- */
-
- case H5G_UDLINK:
- {
- H5L_info_t linkbuf;
-
- /* increment */
- inserted_objs++;
-
- /* add object to table */
- trav_table_add(HADDR_UNDEF, path, H5G_UDLINK, table );
-
- /* Get type of link */
- H5E_BEGIN_TRY {
- /* get link class info */
- H5Lget_info( loc_id, path, &linkbuf, H5P_DEFAULT);
- } H5E_END_TRY;
-
- if(linkbuf.type == H5L_TYPE_EXTERNAL) {
- if(statbuf.linklen > 0) {
- char *targbuf;
- const char *filename;
- const char *objname;
-
- targbuf = HDmalloc(statbuf.linklen);
- assert(targbuf);
- H5Gget_linkval(loc_id, path, statbuf.linklen, targbuf);
- H5Lunpack_elink_val(targbuf, statbuf.linklen, NULL, &filename, &objname);
- if(print)
- printf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
- free(targbuf);
- } /* end if */
- else {
- if(print)
- printf(" %-10s %s ->\n", "udlink", path);
- } /* end else */
- } /* end if */
- else { /* Unknown user-defined type */
- if(print)
- printf(" %-10s %s ->\n", "UD link type", path);
- } /* end else */
- }
- break;
+ /*-------------------------------------------------------------------------
+ * H5G_LINK
+ *-------------------------------------------------------------------------
+ */
+
+ case H5G_LINK:
+ /* increment */
+ inserted_objs++;
+
+ /* add object to table */
+ trav_table_add(HADDR_UNDEF, path, H5G_LINK, table);
+
+ if(statbuf.linklen > 0) {
+ char *targbuf;
+
+ targbuf = HDmalloc(statbuf.linklen);
+ assert(targbuf);
+ H5Lget_val(loc_id, path, targbuf, statbuf.linklen, H5P_DEFAULT);
+ if(print)
+ printf(" %-10s %s -> %s\n", "link", path, targbuf);
+ free(targbuf);
+ }
+ else {
+ if(print)
+ printf(" %-10s %s ->\n", "link", path);
+ }
+ break;
+
+ /*-------------------------------------------------------------------------
+ * H5G_UDLINK
+ *-------------------------------------------------------------------------
+ */
+
+ case H5G_UDLINK:
+ {
+ H5L_info_t linkbuf;
+
+ /* increment */
+ inserted_objs++;
+
+ /* add object to table */
+ trav_table_add(HADDR_UNDEF, path, H5G_UDLINK, table );
+
+ /* Get type of link */
+ H5E_BEGIN_TRY {
+ /* get link class info */
+ H5Lget_info( loc_id, path, &linkbuf, H5P_DEFAULT);
+ } H5E_END_TRY;
+
+ if(linkbuf.type == H5L_TYPE_EXTERNAL) {
+ if(statbuf.linklen > 0) {
+ char *targbuf;
+ const char *filename;
+ const char *objname;
+
+ targbuf = HDmalloc(statbuf.linklen);
+ assert(targbuf);
+ H5Lget_val(loc_id, path, targbuf, statbuf.linklen, H5P_DEFAULT);
+ H5Lunpack_elink_val(targbuf, statbuf.linklen, NULL, &filename, &objname);
+ if(print)
+ printf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
+ free(targbuf);
+ } /* end if */
+ else {
+ if(print)
+ printf(" %-10s %s ->\n", "udlink", path);
+ } /* end else */
+ } /* end if */
+ else { /* Unknown user-defined type */
+ if(print)
+ printf(" %-10s %s ->\n", "UD link type", path);
+ } /* end else */
+ }
+ break;
default: