From: H.G. Muller Date: Wed, 6 Jan 2010 23:31:11 +0000 (+0100) Subject: Let XBoard print version with argument --version or -v X-Git-Tag: master-20100118~25 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=120d62f4c97e34a595d892bbe15452d6c44fab51;p=xboard.git Let XBoard print version with argument --version or -v --- diff --git a/xboard.c b/xboard.c index 3c4d8d7..e4c19e4 100644 --- a/xboard.c +++ b/xboard.c @@ -1665,6 +1665,11 @@ main(argc, argv) setbuf(stderr, NULL); debugFP = stderr; + if(argc > 1 && (!strcmp(argv[1], "-v" ) || !strcmp(argv[1], "--version" ))) { + printf("%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION); + exit(0); + } + programName = strrchr(argv[0], '/'); if (programName == NULL) programName = argv[0];