summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-02 20:28:49 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-02 20:28:49 (GMT)
commitd96ba1186fd104a1023cd2542a51b00c6e2fed73 (patch)
tree55625ed1339f88a82a6240c96862ee0682080fd7 /tools
parentc49dd7fa363bdb49416b5587654101064fd547f8 (diff)
downloadhdf5-d96ba1186fd104a1023cd2542a51b00c6e2fed73.zip
hdf5-d96ba1186fd104a1023cd2542a51b00c6e2fed73.tar.gz
hdf5-d96ba1186fd104a1023cd2542a51b00c6e2fed73.tar.bz2
[svn-r8792] Purpose:
change features Description: for the file contents dump and for hardlinks, one arrow "->" is printed, followed by the first found name for that object options for not printing specific types of objects were postponed Solution: Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dump.c26
-rw-r--r--tools/lib/h5trav.c4
-rw-r--r--tools/testfiles/tcontents.ddl2
3 files changed, 4 insertions, 28 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 931f283..ef5e94c 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -54,10 +54,6 @@ static int display_dcpl = FALSE; /*dcpl */
static int display_fi = FALSE; /*file index */
static int display_ai = TRUE; /*array index */
static int display_escape = FALSE; /*escape non printable characters */
-static int display_dsets = TRUE; /*display datasets */
-static int display_groups = TRUE; /*display groups */
-static int display_dtypes = TRUE; /*display named datatypes */
-static int display_links = TRUE; /*display soft links */
/**
** Added for XML **
@@ -343,7 +339,7 @@ struct handler_t {
* parameters. The long-named ones can be partially spelled. When
* adding more, make sure that they don't clash with each other.
*/
-static const char *s_opts = "hnpeyBHLGTEirVa:c:d:f:g:k:l:t:w:xD:uX:o:s:S:A";
+static const char *s_opts = "hnpeyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:s:S:A";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "hel", no_arg, 'h' },
@@ -1314,7 +1310,6 @@ dump_all(hid_t group, const char *name, void * op_data)
switch (statbuf.type) {
case H5G_LINK:
- if (display_links) {
indentation(indent);
targbuf = malloc(statbuf.linklen);
@@ -1403,11 +1398,9 @@ dump_all(hid_t group, const char *name, void * op_data)
}
free(targbuf);
- }
break;
case H5G_GROUP:
- if (display_groups) {
if ((obj = H5Gopen(group, name)) < 0) {
error_msg(progname, "unable to dump group \"%s\"\n", name);
d_status = EXIT_FAILURE;
@@ -1426,11 +1419,9 @@ dump_all(hid_t group, const char *name, void * op_data)
H5Gclose(obj);
}
- }
break;
case H5G_DATASET:
- if (display_dsets) {
if ((obj = H5Dopen(group, name)) >= 0) {
/* hard link */
H5Gget_objinfo(obj, ".", TRUE, &statbuf);
@@ -1521,11 +1512,9 @@ dump_all(hid_t group, const char *name, void * op_data)
d_status = EXIT_FAILURE;
ret = FAIL;
}
- }
break;
case H5G_TYPE:
- if (display_dtypes) {
if ((obj = H5Topen(group, name)) < 0) {
error_msg(progname, "unable to dump data type \"%s\"\n", name);
d_status = EXIT_FAILURE;
@@ -1534,7 +1523,6 @@ dump_all(hid_t group, const char *name, void * op_data)
dump_function_table->dump_named_datatype_function(obj, name);
H5Tclose(obj);
}
- }
break;
default:
@@ -3097,18 +3085,6 @@ parse_start:
case 'e':
display_escape = TRUE;
break;
- case 'L':
- display_links = FALSE;
- break;
- case 'G':
- display_groups = FALSE;
- break;
- case 'T':
- display_dtypes = FALSE;
- break;
- case 'E':
- display_dsets = FALSE;
- break;
case 'H':
display_data = FALSE;
display_attr_data = FALSE;
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 6c143eb..93211c5 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -402,7 +402,7 @@ int traverse( hid_t loc_id,
{
/* print it */
if (print)
- printf(" %-10s %s %s\n", "group", path, "HARDLINK" );
+ printf(" %-10s %s %s %s\n", "group", path, "->", table->objs[j].name );
}
}
@@ -448,7 +448,7 @@ int traverse( hid_t loc_id,
{
/* print it */
if (print)
- printf(" %-10s %s %s\n", "dataset", path, "(HARDLINK)" );
+ printf(" %-10s %s %s %s\n", "dataset", path, "->", table->objs[j].name );
} /* displayed==1 */
} /* nlink>1 */
diff --git a/tools/testfiles/tcontents.ddl b/tools/testfiles/tcontents.ddl
index 13dab64..f8bc9bf 100644
--- a/tools/testfiles/tcontents.ddl
+++ b/tools/testfiles/tcontents.ddl
@@ -21,7 +21,7 @@ FILE_CONTENTS {
dataset /fletcher32
group /g1
dataset /g1/mydset
- dataset /hlink to all (HARDLINK)
+ dataset /hlink to all -> /all
dataset /myfilter
datatype /mytype
datatype /myvlen