From 3e2d8a730a3d7bf3b6d67bdf0374de15b4639f39 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 7 Jun 2014 21:21:53 +0200 Subject: [PATCH] wmix: always display the version information when verbose is asked Signed-off-by: Christophe CURIS --- wmix/config.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wmix/config.c b/wmix/config.c index ee0a024..6a3c822 100644 --- a/wmix/config.c +++ b/wmix/config.c @@ -32,8 +32,10 @@ #include "include/config.h" -#define HELP_TEXT \ - "WMixer " VERSION " by timecop@japan.co.jp + skunk@mit.edu\n" \ +#define VERSION_TEXT \ + "WMixer " VERSION " by timecop@japan.co.jp + skunk@mit.edu\n" + +#define HELP_TEXT \ "usage:\n" \ " -d connect to remote X display\n" \ " -e exclude channel, can be used many times\n" \ @@ -151,6 +153,7 @@ void parse_cli_options(int argc, char **argv) break; case 'h': + fputs(VERSION_TEXT, stdout); fputs(HELP_TEXT, stdout); exit(0); break; @@ -178,6 +181,9 @@ void parse_cli_options(int argc, char **argv) if (error_found) exit(EXIT_FAILURE); + + if (config.verbose) + fputs(VERSION_TEXT, stdout); } /*