summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5ls/h5ls.c119
-rw-r--r--tools/testfiles/textlinksrc-nodangle-1.ls4
-rw-r--r--tools/testfiles/tgroup-1.ls4
3 files changed, 64 insertions, 63 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 9833694..621b417 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -24,6 +24,7 @@
* programming environment it declares. Other than that, h5ls only calls
* HDF5 API functions (except for H5G_basename())
*/
+#include "hdf5.h"
#include "H5private.h"
#include "h5tools.h"
#include "h5tools_utils.h"
@@ -177,65 +178,65 @@ static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter);
static void
usage (void)
{
- HDfprintf(rawerrorstream, "\
-usage: %s [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]\n\
- OPTIONS\n\
- -h, -?, --help Print a usage message and exit\n\
- -a, --address Print raw data address. If dataset is contiguous, address\n\
- is offset in file of beginning of raw data. If chunked,\n\
- returned list of addresses indicates offset of each chunk.\n\
- Must be used with -v, --verbose option.\n\
- Provides no information for non-dataset objects.\n\
- -d, --data Print the values of datasets\n\
- --enable-error-stack\n\
- Prints messages from the HDF5 error stack as they occur.\n\
- --follow-symlinks\n\
- Follow symbolic links (soft links and external links)\n\
- to display target object information.\n\
- Without this option, h5ls identifies a symbolic link\n\
- as a soft link or external link and prints the value\n\
- assigned to the symbolic link; it does not provide any\n\
- information regarding the target object or determine\n\
- whether the link is a dangling link.\n\
- --no-dangling-links\n\
- Must be used with --follow-symlinks option;\n\
- otherwise, h5ls shows error message and returns an exit\n\
- code of 1. \n\
- Check for any symbolic links (soft links or external links)\n\
- that do not resolve to an existing object (dataset, group,\n\
- or named datatype).\n\
- If any dangling link is found, this situation is treated\n\
- as an error and h5ls returns an exit code of 1.\n\
- -f, --full Print full path names instead of base names\n\
- -g, --group Show information about a group, not its contents\n\
- -l, --label Label members of compound datasets\n\
- -r, --recursive List all groups recursively, avoiding cycles\n\
- -s, --string Print 1-byte integer datasets as ASCII\n\
- -S, --simple Use a machine-readable output format\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\
- --vfd=DRIVER Use the specified virtual file driver\n\
- -x, --hexdump Show raw data in hexadecimal format\n\
-\n\
- file/OBJECT\n\
- Each object consists of an HDF5 file name optionally followed by a\n\
- slash and an object name within the file (if no object is specified\n\
- within the file then the contents of the root group are displayed).\n\
- The file name may include a printf(3C) integer format such as\n\
- \"%%05d\" to open a file family.\n\
-\n\
- Deprecated Options\n\
- The following options have been deprecated in HDF5. While they remain\n\
- available, they have been superseded as indicated and may be removed\n\
- from HDF5 in the future. Use the indicated replacement option in all\n\
- new work; where possible, existing scripts, et cetera, should also be\n\
- updated to use the replacement option.\n\
-\n\
- -E or --external Follow external links.\n\
- Replaced by --follow-symlinks.\n\
- -e, --errors Show all HDF5 error reporting\n\
- Replaced by --enable-error-stack.\n");
+ FLUSHSTREAM(rawoutstream);
+ PRINTVALSTREAM(rawoutstream, "usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]\n");
+ PRINTVALSTREAM(rawoutstream, " OPTIONS\n");
+ PRINTVALSTREAM(rawoutstream, " -h, -?, --help Print a usage message and exit\n");
+ PRINTVALSTREAM(rawoutstream, " -a, --address Print raw data address. If dataset is contiguous, address\n");
+ PRINTVALSTREAM(rawoutstream, " is offset in file of beginning of raw data. If chunked,\n");
+ PRINTVALSTREAM(rawoutstream, " returned list of addresses indicates offset of each chunk.\n");
+ PRINTVALSTREAM(rawoutstream, " Must be used with -v, --verbose option.\n");
+ PRINTVALSTREAM(rawoutstream, " Provides no information for non-dataset objects.\n");
+ PRINTVALSTREAM(rawoutstream, " -d, --data Print the values of datasets\n");
+ PRINTVALSTREAM(rawoutstream, " --enable-error-stack\n");
+ PRINTVALSTREAM(rawoutstream, " Prints messages from the HDF5 error stack as they occur.\n");
+ PRINTVALSTREAM(rawoutstream, " --follow-symlinks\n");
+ PRINTVALSTREAM(rawoutstream, " Follow symbolic links (soft links and external links)\n");
+ PRINTVALSTREAM(rawoutstream, " to display target object information.\n");
+ PRINTVALSTREAM(rawoutstream, " Without this option, h5ls identifies a symbolic link\n");
+ PRINTVALSTREAM(rawoutstream, " as a soft link or external link and prints the value\n");
+ PRINTVALSTREAM(rawoutstream, " assigned to the symbolic link; it does not provide any\n");
+ PRINTVALSTREAM(rawoutstream, " information regarding the target object or determine\n");
+ PRINTVALSTREAM(rawoutstream, " whether the link is a dangling link.\n");
+ PRINTVALSTREAM(rawoutstream, " --no-dangling-links\n");
+ PRINTVALSTREAM(rawoutstream, " Must be used with --follow-symlinks option;\n");
+ PRINTVALSTREAM(rawoutstream, " otherwise, h5ls shows error message and returns an exit\n");
+ PRINTVALSTREAM(rawoutstream, " code of 1. \n");
+ PRINTVALSTREAM(rawoutstream, " Check for any symbolic links (soft links or external links)\n");
+ PRINTVALSTREAM(rawoutstream, " that do not resolve to an existing object (dataset, group,\n");
+ PRINTVALSTREAM(rawoutstream, " or named datatype).\n");
+ PRINTVALSTREAM(rawoutstream, " If any dangling link is found, this situation is treated\n");
+ PRINTVALSTREAM(rawoutstream, " as an error and h5ls returns an exit code of 1.\n");
+ PRINTVALSTREAM(rawoutstream, " -f, --full Print full path names instead of base names\n");
+ PRINTVALSTREAM(rawoutstream, " -g, --group Show information about a group, not its contents\n");
+ PRINTVALSTREAM(rawoutstream, " -l, --label Label members of compound datasets\n");
+ PRINTVALSTREAM(rawoutstream, " -r, --recursive List all groups recursively, avoiding cycles\n");
+ PRINTVALSTREAM(rawoutstream, " -s, --string Print 1-byte integer datasets as ASCII\n");
+ PRINTVALSTREAM(rawoutstream, " -S, --simple Use a machine-readable output format\n");
+ PRINTVALSTREAM(rawoutstream, " -wN, --width=N Set the number of columns of output\n");
+ PRINTVALSTREAM(rawoutstream, " -v, --verbose Generate more verbose output\n");
+ PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n");
+ PRINTVALSTREAM(rawoutstream, " --vfd=DRIVER Use the specified virtual file driver\n");
+ PRINTVALSTREAM(rawoutstream, " -x, --hexdump Show raw data in hexadecimal format\n");
+ PRINTVALSTREAM(rawoutstream, "\n");
+ PRINTVALSTREAM(rawoutstream, " file/OBJECT\n");
+ PRINTVALSTREAM(rawoutstream, " Each object consists of an HDF5 file name optionally followed by a\n");
+ PRINTVALSTREAM(rawoutstream, " slash and an object name within the file (if no object is specified\n");
+ PRINTVALSTREAM(rawoutstream, " within the file then the contents of the root group are displayed).\n");
+ PRINTVALSTREAM(rawoutstream, " The file name may include a printf(3C) integer format such as\n");
+ PRINTVALSTREAM(rawoutstream, " \"%%05d\" to open a file family.\n");
+ PRINTVALSTREAM(rawoutstream, "\n");
+ PRINTVALSTREAM(rawoutstream, " Deprecated Options\n");
+ PRINTVALSTREAM(rawoutstream, " The following options have been deprecated in HDF5. While they remain\n");
+ PRINTVALSTREAM(rawoutstream, " available, they have been superseded as indicated and may be removed\n");
+ PRINTVALSTREAM(rawoutstream, " from HDF5 in the future. Use the indicated replacement option in all\n");
+ PRINTVALSTREAM(rawoutstream, " new work; where possible, existing scripts, et cetera, should also be\n");
+ PRINTVALSTREAM(rawoutstream, " updated to use the replacement option.\n");
+ PRINTVALSTREAM(rawoutstream, "\n");
+ PRINTVALSTREAM(rawoutstream, " -E or --external Follow external links.\n");
+ PRINTVALSTREAM(rawoutstream, " Replaced by --follow-symlinks.\n");
+ PRINTVALSTREAM(rawoutstream, " -e, --errors Show all HDF5 error reporting\n");
+ PRINTVALSTREAM(rawoutstream, " Replaced by --enable-error-stack.\n");
}
diff --git a/tools/testfiles/textlinksrc-nodangle-1.ls b/tools/testfiles/textlinksrc-nodangle-1.ls
index 9c19957..6d1da9e 100644
--- a/tools/testfiles/textlinksrc-nodangle-1.ls
+++ b/tools/testfiles/textlinksrc-nodangle-1.ls
@@ -1,5 +1,3 @@
-Error: --no-dangling-links must be used along with --follow-symlinks option!
-
usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]
OPTIONS
-h, -?, --help Print a usage message and exit
@@ -58,3 +56,5 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]
Replaced by --follow-symlinks.
-e, --errors Show all HDF5 error reporting
Replaced by --enable-error-stack.
+Error: --no-dangling-links must be used along with --follow-symlinks option!
+
diff --git a/tools/testfiles/tgroup-1.ls b/tools/testfiles/tgroup-1.ls
index 893c9ce..069d43e 100644
--- a/tools/testfiles/tgroup-1.ls
+++ b/tools/testfiles/tgroup-1.ls
@@ -1,5 +1,3 @@
-Error: 'recursive' option not compatible with 'group info' option!
-
usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]
OPTIONS
-h, -?, --help Print a usage message and exit
@@ -58,3 +56,5 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]
Replaced by --follow-symlinks.
-e, --errors Show all HDF5 error reporting
Replaced by --enable-error-stack.
+Error: 'recursive' option not compatible with 'group info' option!
+