diff options
author | Martin Mares <mj@ucw.cz> | 2000-05-29 23:58:35 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-05-29 23:58:35 +0200 |
commit | e67af42805c16093bb720a1bd04ad8932e86e49e (patch) | |
tree | 61c3c4a519118a85815a6f592e5e221f4d14dbf4 /sysdep | |
parent | 5459fac61f3a645c636bdf32c140f4d7083034d2 (diff) | |
download | bird-e67af42805c16093bb720a1bd04ad8932e86e49e.tar bird-e67af42805c16093bb720a1bd04ad8932e86e49e.zip |
Support --version and --help.
Diffstat (limited to 'sysdep')
-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 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) { |