summaryrefslogtreecommitdiffstats
path: root/tools/misc/h5stat.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2006-06-18 17:41:58 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2006-06-18 17:41:58 (GMT)
commit09aa1fa82c81ad132bea88a9ee81d30952daa274 (patch)
tree04f0983aff52b8be299f30fdd34bd281ab3e168f /tools/misc/h5stat.c
parentb73313b3d41e4bf1447b89c41cfdcaf40dd6f078 (diff)
downloadhdf5-09aa1fa82c81ad132bea88a9ee81d30952daa274.zip
hdf5-09aa1fa82c81ad132bea88a9ee81d30952daa274.tar.gz
hdf5-09aa1fa82c81ad132bea88a9ee81d30952daa274.tar.bz2
[svn-r12418] Purpose: Maintenance/new feature
Description: Added new tests for the h5stat tool; added --version flag to the h5stat tool to display library version information Solution: Platforms tested: heping, shanti Misc. update:
Diffstat (limited to 'tools/misc/h5stat.c')
-rw-r--r--tools/misc/h5stat.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/misc/h5stat.c b/tools/misc/h5stat.c
index db93471..a396472 100644
--- a/tools/misc/h5stat.c
+++ b/tools/misc/h5stat.c
@@ -101,7 +101,7 @@ static int display_dset = FALSE;
static int display_dtype_metadata = FALSE;
static int display_dtype = FALSE;
-static const char *s_opts ="FfhGgDdT";
+static const char *s_opts ="FfhGgDdTV";
static struct long_options l_opts[] = {
{"help", no_arg, 'h'},
{"hel", no_arg, 'h'},
@@ -149,6 +149,12 @@ static struct long_options l_opts[] = {
{"dtypeme", no_arg, 'T'},
{"dtypem", no_arg, 'T'},
{"dtype", no_arg, 'T'},
+ { "version", no_arg, 'V' },
+ { "versio", no_arg, 'V' },
+ { "versi", no_arg, 'V' },
+ { "vers", no_arg, 'V' },
+ { "ver", no_arg, 'V' },
+ { "ve", no_arg, 'V' },
{ NULL, 0, '\0' }
};
@@ -174,6 +180,7 @@ static void
fprintf(stdout, "\n");
fprintf(stdout, " OPTIONS\n");
fprintf(stdout, " -h, --help Print a usage message and exit\n");
+ fprintf(stdout, " -V, --version Print version number and exit\n");
fprintf(stdout, " -f, --file Print file information\n");
fprintf(stdout, " -F, --filemetadata Print file metadata\n");
fprintf(stdout, " -g, --group Print group information\n");
@@ -659,6 +666,11 @@ parse_start:
case 'h':
usage(progname);
leave(EXIT_SUCCESS);
+ case 'V':
+ print_version(progname);
+ leave(EXIT_SUCCESS);
+ break;
+
default:
usage(progname);
leave(EXIT_FAILURE);