summaryrefslogtreecommitdiffstats
path: root/tools/h5dump.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1999-12-10 20:44:04 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1999-12-10 20:44:04 (GMT)
commitf30439d5920626e9527817f9168d72ae1594208e (patch)
tree429d027e4fd375e5a40e552d8f2537046654b2eb /tools/h5dump.c
parent1c91b6fed2e81de31ccb0febcaf2c00efa52ed3f (diff)
downloadhdf5-f30439d5920626e9527817f9168d72ae1594208e.zip
hdf5-f30439d5920626e9527817f9168d72ae1594208e.tar.gz
hdf5-f30439d5920626e9527817f9168d72ae1594208e.tar.bz2
[svn-r1870] h5dump.c:
Added -V option for displaying version information. h5tools.c: Added print_version routine to display version information. h5tools.h: Added print_version prototype.
Diffstat (limited to 'tools/h5dump.c')
-rw-r--r--tools/h5dump.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/tools/h5dump.c b/tools/h5dump.c
index 08bb2c5..b80ecb8 100644
--- a/tools/h5dump.c
+++ b/tools/h5dump.c
@@ -41,10 +41,11 @@ fprintf(stderr,
"\nUsage of HDF5 Dumper:\n\n \
h5dump [-h] [-bb] [-header] [-a <names>] [-d <names>] [-g <names>]\n \
[-l <names>] [-t <names>] [-w <number>] <file>\n\n\
- -h Print information on this command.\n\
+ -h Print information on this command and exit.\n\
-bb Display the conent of the boot block. The default is not to display.\n\
-header Display header only; no data is displayed.\n\
- -v Display the object ids\n\
+ -v Display the object ids\n\
+ -V Display version information and exit.\n\
-a <names> Display the specified attribute(s).\n\
-d <names> Display the specified dataset(s).\n\
-g <names> Display the specified group(s) and all the members.\n\
@@ -1082,8 +1083,14 @@ main(int argc, char *argv[])
usage();
free(opts);
exit(0);
+ }
+ else if (!strcmp(argv[curr_arg],"-V")){
+ print_version("h5dump");
+ free(opts);
+ exit(0);
+ }
- } else if (!strcmp(argv[curr_arg],"-bb"))
+ else if (!strcmp(argv[curr_arg],"-bb"))
display_bb = 1;
@@ -1091,17 +1098,17 @@ main(int argc, char *argv[])
display_data=0;
- else if (!strcmp(argv[curr_arg],"-v"))
+ else if (!strcmp(argv[curr_arg],"-v"))
- display_oid = 1;
+ display_oid = 1;
- else if (!strcmp(argv[curr_arg],"-w")){
- /*
- this way we know which arg was the -w
- we know it won't be 0 since curr_arg starts at 1
- */
- newwidth = curr_arg;
- }
+ else if (!strcmp(argv[curr_arg],"-w")){
+ /*
+ this way we know which arg was the -w
+ we know it won't be 0 since curr_arg starts at 1
+ */
+ newwidth = curr_arg;
+ }
else if (strcmp(argv[curr_arg],"-a") &&
strcmp(argv[curr_arg],"-d") &&
strcmp(argv[curr_arg],"-g") &&