aboutsummaryrefslogtreecommitdiffstats
path: root/src/CommandLine.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/CommandLine.cxx')
-rw-r--r--src/CommandLine.cxx89
1 files changed, 50 insertions, 39 deletions
diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx
index c6e9c69c5..33d8117fb 100644
--- a/src/CommandLine.cxx
+++ b/src/CommandLine.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -98,40 +98,44 @@ static constexpr Domain cmdline_domain("cmdline");
gcc_noreturn
static void version(void)
{
- puts("Music Player Daemon " VERSION
+ printf("Music Player Daemon " VERSION
#ifdef GIT_COMMIT
- " (" GIT_COMMIT ")"
+ " (" GIT_COMMIT ")"
#endif
- "\n"
- "\n"
- "Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>\n"
- "Copyright (C) 2008-2014 Max Kellermann <max@duempel.org>\n"
- "This is free software; see the source for copying conditions. There is NO\n"
- "warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
+ "\n"
+ "\n"
+ "Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>\n"
+ "Copyright (C) 2008-2014 Max Kellermann <max@duempel.org>\n"
+ "This is free software; see the source for copying conditions. There is NO\n"
+ "warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
#ifdef ENABLE_DATABASE
- puts("\n"
- "Database plugins:");
+ "\n"
+ "Database plugins:\n");
for (auto i = database_plugins; *i != nullptr; ++i)
printf(" %s", (*i)->name);
- puts("\n\n"
- "Storage plugins:");
+ printf("\n\n"
+ "Storage plugins:\n");
for (auto i = storage_plugins; *i != nullptr; ++i)
printf(" %s", (*i)->name);
+
+ printf("\n"
#endif
#ifdef ENABLE_NEIGHBOR_PLUGINS
- puts("\n\n"
- "Neighbor plugins:");
+ "\n"
+ "Neighbor plugins:\n");
for (auto i = neighbor_plugins; *i != nullptr; ++i)
printf(" %s", (*i)->name);
+
+ printf("\n"
#endif
- puts("\n\n"
- "Decoders plugins:");
+ "\n"
+ "Decoders plugins:\n");
decoder_plugins_for_each([](const DecoderPlugin &plugin){
printf(" [%s]", plugin.name);
@@ -141,26 +145,31 @@ static void version(void)
for (; *suffixes != nullptr; ++suffixes)
printf(" %s", *suffixes);
- puts("");
+ printf("\n");
});
- puts("\n"
- "Output plugins:");
+ printf("\n"
+ "Tag plugins:\n"
+#ifdef ENABLE_ID3TAG
+ " id3tag"
+#endif
+ "\n\n"
+ "Output plugins:\n");
audio_output_plugins_for_each(plugin)
printf(" %s", plugin->name);
- puts("");
+ printf("\n"
#ifdef ENABLE_ENCODER
- puts("\n"
- "Encoder plugins:");
+ "\n"
+ "Encoder plugins:\n");
encoder_plugins_for_each(plugin)
printf(" %s", plugin->name);
- puts("");
+ printf("\n"
#endif
#ifdef ENABLE_ARCHIVE
- puts("\n"
- "Archive plugins:");
+ "\n"
+ "Archive plugins:\n");
archive_plugins_for_each(plugin) {
printf(" [%s]", plugin->name);
@@ -169,22 +178,24 @@ static void version(void)
for (; *suffixes != nullptr; ++suffixes)
printf(" %s", *suffixes);
- puts("");
+ printf("\n");
}
+
+ printf(""
#endif
- puts("\n"
- "Input plugins:");
+ "\n"
+ "Input plugins:\n");
input_plugins_for_each(plugin)
printf(" %s", plugin->name);
- puts("\n\n"
- "Playlist plugins:");
+ printf("\n\n"
+ "Playlist plugins:\n");
playlist_plugins_for_each(plugin)
printf(" %s", plugin->name);
- puts("\n\n"
- "Protocols:");
+ printf("\n\n"
+ "Protocols:\n");
print_supported_uri_schemes_to_fp(stdout);
exit(EXIT_SUCCESS);
@@ -206,12 +217,12 @@ static void PrintOption(const OptionDef &opt)
gcc_noreturn
static void help(void)
{
- puts("Usage:\n"
- " mpd [OPTION...] [path/to/mpd.conf]\n"
- "\n"
- "Music Player Daemon - a daemon for playing music.\n"
- "\n"
- "Options:");
+ printf("Usage:\n"
+ " mpd [OPTION...] [path/to/mpd.conf]\n"
+ "\n"
+ "Music Player Daemon - a daemon for playing music.\n"
+ "\n"
+ "Options:\n");
PrintOption(opt_help);
PrintOption(opt_kill);