Support --version and --help.

This commit is contained in:
Martin Mares 2000-05-29 21:58:35 +00:00
parent 5459fac61f
commit e67af42805

View file

@ -356,6 +356,16 @@ parse_args(int argc, char **argv)
{ {
int c; 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) while ((c = getopt(argc, argv, opt_list)) >= 0)
switch (c) switch (c)
{ {