diff options
author | Martin Mares <mj@ucw.cz> | 2000-05-29 21:58:35 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-05-29 21:58:35 +0000 |
commit | e67af42805c16093bb720a1bd04ad8932e86e49e (patch) | |
tree | 61c3c4a519118a85815a6f592e5e221f4d14dbf4 | |
parent | 5459fac61f3a645c636bdf32c140f4d7083034d2 (diff) |
Support --version and --help.
-rw-r--r-- | sysdep/unix/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 37c5e36e..971c79dd 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) { |