summaryrefslogtreecommitdiffstats
path: root/tools/lib
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
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')
-rw-r--r--tools/lib/h5diff.c24
-rw-r--r--tools/lib/h5trav.c153
2 files changed, 86 insertions, 91 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index dc32b9e..38bbcf55 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -1052,33 +1052,33 @@ hsize_t diff (hid_t file1_id,
char *buf1 = NULL;
char *buf2 = NULL;
- if (H5Gget_objinfo (file1_id, path1, FALSE, &sb1) < 0)
+ if(H5Gget_objinfo(file1_id, path1, FALSE, &sb1) < 0)
goto out;
- if (H5Gget_objinfo (file1_id, path1, FALSE, &sb2) < 0)
+ if(H5Gget_objinfo(file1_id, path1, FALSE, &sb2) < 0)
goto out;
- buf1 = HDmalloc (sb1.linklen);
- buf2 = HDmalloc (sb2.linklen);
+ buf1 = HDmalloc(sb1.linklen);
+ buf2 = HDmalloc(sb2.linklen);
- if (H5Gget_linkval (file1_id, path1, sb1.linklen, buf1) < 0)
+ if(H5Lget_val(file1_id, path1, buf1, sb1.linklen, H5P_DEFAULT) < 0)
goto out;
- if (H5Gget_linkval (file2_id, path2, sb1.linklen, buf2) < 0)
+ if(H5Lget_val(file2_id, path2, buf2, sb2.linklen, H5P_DEFAULT) < 0)
goto out;
- ret = HDstrcmp (buf1, buf2);
+ ret = HDstrcmp(buf1, buf2);
/* if "buf1" != "buf2" then the links are "different" */
nfound = (ret != 0) ? 1 : 0;
- if (print_objname (options, nfound))
- do_print_objname ("link", path1, path2);
+ if(print_objname(options, nfound))
+ do_print_objname("link", path1, path2);
/* always print the number of differences found in verbose mode */
- if (options->m_verbose)
+ if(options->m_verbose)
print_found(nfound);
- HDfree (buf1);
- HDfree (buf2);
+ HDfree(buf1);
+ HDfree(buf2);
}
break;
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: