aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-01 11:28:52 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-01 11:28:52 +0000
commit1ccac975d31ea07fb6dee097c51a91bfa1f41bf7 (patch)
treeec2d4d6daeafe6fe424c210e5d2ed43c9974ae12
parent86d5656ddf37a9e6880d18a9c22e60b7a976153f (diff)
downloadgdbm-1ccac975d31ea07fb6dee097c51a91bfa1f41bf7.tar.gz
gdbm-1ccac975d31ea07fb6dee097c51a91bfa1f41bf7.tar.bz2
Support --help and --version for the sake of make distcheck.
-rw-r--r--src/testgdbm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testgdbm.c b/src/testgdbm.c
index bd4e96d..d789a01 100644
--- a/src/testgdbm.c
+++ b/src/testgdbm.c
@@ -791,6 +791,20 @@ main (int argc, char *argv[])
progname = argv[0];
/* Argument checking. */
+ if (argc == 2)
+ {
+ if (strcmp (argv[1], "--help") == 0)
+ {
+ usage ();
+ exit (0);
+ }
+ else if (strcmp (argv[1], "--version") == 0)
+ {
+ version ();
+ exit (0);
+ }
+ }
+
opterr = 0;
while ((opt = getopt (argc, argv, "lmsrnc:b:g:hv")) != -1)
switch (opt)

Return to:

Send suggestions and report system problems to the System administrator.