diff options
author | Max Kellermann <max@duempel.org> | 2008-10-03 14:24:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-03 14:24:31 +0200 |
commit | 3e70743f5061573a2d9fff2fe4b232f38653d12b (patch) | |
tree | a13bd1f0686f8ca15683f2604e5359dbcdb9c617 /src/options.c | |
parent | 7a12f9e8754a10634fa43732712dc60b87fa2c47 (diff) | |
download | mpd-3e70743f5061573a2d9fff2fe4b232f38653d12b.tar.gz mpd-3e70743f5061573a2d9fff2fe4b232f38653d12b.tar.xz mpd-3e70743f5061573a2d9fff2fe4b232f38653d12b.zip |
options: print one big string in --version screen
Instead of calling printf() multiple times for every compile time
option, build the whole string at compile time and print it with
puts().
Diffstat (limited to '')
-rw-r--r-- | src/options.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/options.c b/src/options.c index ca3e983b3..75f074a63 100644 --- a/src/options.c +++ b/src/options.c @@ -143,27 +143,27 @@ handle_option(int c, const char *arg) display_help(); exit(EXIT_SUCCESS); case 'V': /* --version */ - printf("%s version: %s\n", PACKAGE, VERSION); - printf("build options:"); + puts(PACKAGE " version: " VERSION "\n" + "build options:" #ifndef NDEBUG - printf(" debug"); + " debug" #endif #ifdef ENABLE_NLS - printf(" nls"); + " nls" #endif #ifdef HAVE_GETMOUSE - printf(" getmouse"); + " getmouse" #endif #ifdef ENABLE_ARTIST_SCREEN - printf(" artist-screen"); + " artist-screen" #endif #ifdef ENABLE_SEARCH_SCREEN - printf(" search-screen"); + " search-screen" #endif #ifdef ENABLE_KEYDEF_SCREEN - printf(" key-screen"); + " key-screen" #endif - printf("\n"); + "\n"); exit(EXIT_SUCCESS); case 'c': /* --colors */ options.enable_colors = true; |