From e67af42805c16093bb720a1bd04ad8932e86e49e Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 29 May 2000 21:58:35 +0000 Subject: Support --version and --help. --- sysdep/unix/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sysdep') diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 37c5e36..971c79d 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -356,6 +356,16 @@ parse_args(int argc, char **argv) { int c; + if (argc == 2) + { + if (!strcmp(argv[1], "--version")) + { + fprintf(stderr, "BIRD version " BIRD_VERSION "\n"); + exit(0); + } + if (!strcmp(argv[1], "--help")) + usage(); + } while ((c = getopt(argc, argv, opt_list)) >= 0) switch (c) { -- cgit v1.2.3