summaryrefslogtreecommitdiffstats
path: root/tools/h5ls.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-06-07 15:05:02 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-06-07 15:05:02 (GMT)
commitb98fcbf5926e81f2e4ead8daa46e650566719e1c (patch)
tree1653e8084aff321512fb2d2bc842573fef62f220 /tools/h5ls.c
parent2a10e682a13244d5c61982445f2d6ec5bc990a36 (diff)
downloadhdf5-b98fcbf5926e81f2e4ead8daa46e650566719e1c.zip
hdf5-b98fcbf5926e81f2e4ead8daa46e650566719e1c.tar.gz
hdf5-b98fcbf5926e81f2e4ead8daa46e650566719e1c.tar.bz2
[svn-r1306] Changes since 19990602
---------------------- ./doc/html/Datatypes.html ./test/dtypes.c Added documentation and tests for opaque types. ./tools/h5ls.c Added a `-x' or `--hexdump' argument which is not fully implemented (because I want to synchronize h5tools.c first) but which will eventually print raw data in hexadecimal format without any translation from disk. This would be useful for debugging references and VL types. ./tools/h5tools.c Added support for references (not quite finished yet, but compiles -- I wanted to sync up this file before Patrick and I got too far apart...) ./src/H5R.c Checked for error return value from H5R_get_object_type() ./src/H5A.c ./src/H5D.c Changed error return values from NULL to FAIL ./test/Makefile.in ./test/trefer.c Creates trefer1.h5 and trefer2.h5 so that the second test doesn't clobber the first file since the files might be useful for debugging.
Diffstat (limited to 'tools/h5ls.c')
-rw-r--r--tools/h5ls.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/tools/h5ls.c b/tools/h5ls.c
index 0a361c3..b4e10f7 100644
--- a/tools/h5ls.c
+++ b/tools/h5ls.c
@@ -25,6 +25,7 @@ static hbool_t string_g = FALSE; /*print 1-byte numbers as ASCII? */
static hbool_t fullname_g = FALSE; /*print full path names */
static hbool_t recursive_g = FALSE; /*recursive descent listing */
static hbool_t grp_literal_g = FALSE; /*list group, not contents */
+static hbool_t hexdump_g = FALSE; /*show data as raw hexadecimal */
/* Info to pass to the iteration functions */
typedef struct iter_t {
@@ -94,6 +95,7 @@ usage: %s [OPTIONS] FILE [OBJECTS...]\n\
-wN, --width=N Set the number of columns of output\n\
-v, --verbose Generate more verbose output\n\
-V, --version Print version number and exit\n\
+ -x, --hexdump Show raw data in hexadecimal format\n\
FILE\n\
The file name may include a printf(3C) integer format such as\n\
\"%%05d\" to open a file family.\n\
@@ -897,6 +899,8 @@ display_string_type(hid_t type, int UNUSED indent)
* Thursday, November 5, 1998
*
* Modifications:
+ * Robb Matzke, 1999-06-04
+ * Knows about object and dataset region references.
*
*-------------------------------------------------------------------------
*/
@@ -905,8 +909,15 @@ display_reference_type(hid_t type, int UNUSED indent)
{
if (H5T_REFERENCE!=H5Tget_class(type)) return FALSE;
- printf("%lu-byte unknown reference",
- (unsigned long)H5Tget_size(type));
+ if (H5Tequal(type, H5T_STD_REF_OBJ)) {
+ printf("object reference");
+ } else if (H5Tequal(type, H5T_STD_REF_DSETREG)) {
+ printf("dataset region reference");
+ } else {
+ printf("%lu-byte unknown reference",
+ (unsigned long)H5Tget_size(type));
+ }
+
return TRUE;
}
@@ -1787,6 +1798,10 @@ main (int argc, char *argv[])
printf("This is %s version %u.%u release %u\n",
progname, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE);
exit(0);
+ } else if (!strcmp(argv[argno], "--hexdump")) {
+ hexdump_g = TRUE;
+ fprintf(stderr, "not implemented yet: --hexdump\n");
+ exit(1);
} else if (!strncmp(argv[argno], "-w", 2)) {
if (argv[argno][2]) {
s = argv[argno]+2;
@@ -1839,6 +1854,10 @@ main (int argc, char *argv[])
progname, H5_VERS_MAJOR, H5_VERS_MINOR,
H5_VERS_RELEASE);
exit(0);
+ case 'x': /* --hexdump */
+ hexdump_g = TRUE;
+ fprintf(stderr, "not implemented yet: -x\n");
+ exit(1);
default:
usage(progname);
exit(1);