From 120d62f4c97e34a595d892bbe15452d6c44fab51 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 7 Jan 2010 00:31:11 +0100 Subject: [PATCH] Let XBoard print version with argument --version or -v --- xboard.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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]; -- 1.7.0.4