summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-11-24 16:49:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-11-24 16:49:36 (GMT)
commit2f36ea99d4ad1b036d377719e49eaab2dec64444 (patch)
tree63be7c282767004339c49aa0e738e6a62630c280 /tools/h5dump/h5dump.c
parent083357dad3334473507a97e17593a9d68e42d69f (diff)
downloadhdf5-2f36ea99d4ad1b036d377719e49eaab2dec64444.zip
hdf5-2f36ea99d4ad1b036d377719e49eaab2dec64444.tar.gz
hdf5-2f36ea99d4ad1b036d377719e49eaab2dec64444.tar.bz2
[svn-r14284] Description:
Add H5Lvisit_by_name() API routine to library. Eliminated all (five!) other group traversal routines and changed them all to use the new API routine. Cleaned up output of h5ls & h5stat: - Issue error when requesting recursive traversal of a file with the "group info" flag, but no group given - Print info about root group in all(?) appropriate situations - Don't print "verbose" information about root group until the root group is in the list of objects to display (mostly because h5ls & h5stat had a different twist on traversing the groups in a file that the other utilities) Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index c69c5d70..28534bf 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -3952,7 +3952,7 @@ main(int argc, const char *argv[])
/* allocate and initialize internal data structure */
init_prefix(&prefix, prefix_len);
- /* find all objects that might be targets of a reference */
+ /* Prepare to find objects that might be targets of a reference */
fill_ref_path_table(fid);
if(doxml) {
@@ -4094,7 +4094,6 @@ done:
free_table(type_table);
HDfree(prefix);
- HDfree(info.prefix);
HDfree(fname);
/* To Do: clean up XML table */
@@ -5342,8 +5341,7 @@ xml_dump_group(hid_t gid, const char *name)
if(HDstrcmp(name, "/") == 0) {
isRoot = 1;
- tmp = HDmalloc(2);
- HDstrcpy(tmp, "/");
+ tmp = HDstrdup("/");
} else {
tmp = HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
HDstrcpy(tmp, prefix);
@@ -5401,8 +5399,8 @@ xml_dump_group(hid_t gid, const char *name)
ptrstr = malloc(100);
t_objname = xml_escape_the_name(found_obj->objname);
par_name = xml_escape_the_name(par);
- xml_name_to_XID(par,parentxid,100,1);
- xml_name_to_XID(found_obj->objname,ptrstr,100,1);
+ xml_name_to_XID(found_obj->objname, ptrstr, 100, 1);
+ xml_name_to_XID(par, parentxid, 100, 1);
printf("<%sGroupPtr OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" />\n",
xmlnsprefix,