summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a12f9e)
raw | patch | inline | side by side (parent: 7a12f9e)
author | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 12:24:31 +0000 (14:24 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 12:24:31 +0000 (14:24 +0200) |
Instead of calling printf() multiple times for every compile time
option, build the whole string at compile time and print it with
puts().
option, build the whole string at compile time and print it with
puts().
src/options.c | patch | blob | history |
diff --git a/src/options.c b/src/options.c
index ca3e983b3493a315530f878b15b5876ba01b2fda..75f074a63a5e46c763774bd203c3a2caa89da9ba 100644 (file)
--- a/src/options.c
+++ b/src/options.c
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;