summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-11-05 19:05:10 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-11-05 19:05:10 (GMT)
commitc57f03ad75468923dac7e52e161510a4eb5e972f (patch)
tree476f0000e20376140f5d72061159ce462c5807f0
parent467f103cb1e1e10b40abd175d0403a67f0ba8013 (diff)
downloadhdf5-c57f03ad75468923dac7e52e161510a4eb5e972f.zip
hdf5-c57f03ad75468923dac7e52e161510a4eb5e972f.tar.gz
hdf5-c57f03ad75468923dac7e52e161510a4eb5e972f.tar.bz2
[svn-r14236] new feature: add a -V option to h5unjam
tested: linux
-rw-r--r--tools/h5jam/h5unjam.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c
index ac927c8..ebfbdb2 100644
--- a/tools/h5jam/h5unjam.c
+++ b/tools/h5jam/h5unjam.c
@@ -45,7 +45,7 @@ char *ub_file = NULL;
* 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 = "hu:i:o:d";
+static const char *s_opts = "hu:i:o:d:V";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "hel", no_arg, 'h' },
@@ -83,6 +83,8 @@ usage(const char *prog)
fprintf(stdout, " %s -h\n",prog);
fprintf(stdout, " Print a usage message and exit\n");
+ fprintf(stdout, " %s -V \n", prog);
+ fprintf(stdout, " Print HDF5 library version and exit\n");
}
/*-------------------------------------------------------------------------
@@ -121,13 +123,16 @@ parse_command_line(int argc, const char *argv[])
case 'd':
do_delete = TRUE;
break;
- case 'h':
- usage(progname);
- exit(EXIT_SUCCESS);
- case '?':
- default:
- usage(progname);
- exit(EXIT_FAILURE);
+ case 'h':
+ usage(progname);
+ exit(EXIT_SUCCESS);
+ case 'V':
+ print_version (progname);
+ exit (EXIT_SUCCESS);
+ case '?':
+ default:
+ usage(progname);
+ exit(EXIT_FAILURE);
}
}