Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
457ab8b2
Commit
457ab8b2
authored
Dec 08, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CommandLine: use printf() instead of puts()
parent
1ebf5f3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
41 deletions
+41
-41
CommandLine.cxx
src/CommandLine.cxx
+41
-41
No files found.
src/CommandLine.cxx
View file @
457ab8b2
...
...
@@ -98,40 +98,40 @@ static constexpr Domain cmdline_domain("cmdline");
gcc_noreturn
static
void
version
(
void
)
{
p
uts
(
"Music Player Daemon "
VERSION
p
rintf
(
"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
p
uts
(
"
\n
"
"Database plugins:
"
);
p
rintf
(
"
\n
"
"Database plugins:
\n
"
);
for
(
auto
i
=
database_plugins
;
*
i
!=
nullptr
;
++
i
)
printf
(
" %s"
,
(
*
i
)
->
name
);
p
uts
(
"
\n\n
"
"Storage plugins:
"
);
p
rintf
(
"
\n\n
"
"Storage plugins:
\n
"
);
for
(
auto
i
=
storage_plugins
;
*
i
!=
nullptr
;
++
i
)
printf
(
" %s"
,
(
*
i
)
->
name
);
#endif
#ifdef ENABLE_NEIGHBOR_PLUGINS
p
uts
(
"
\n\n
"
"Neighbor plugins:
"
);
p
rintf
(
"
\n\n
"
"Neighbor plugins:
\n
"
);
for
(
auto
i
=
neighbor_plugins
;
*
i
!=
nullptr
;
++
i
)
printf
(
" %s"
,
(
*
i
)
->
name
);
#endif
p
uts
(
"
\n\n
"
"Decoders plugins:
"
);
p
rintf
(
"
\n\n
"
"Decoders plugins:
\n
"
);
decoder_plugins_for_each
([](
const
DecoderPlugin
&
plugin
){
printf
(
" [%s]"
,
plugin
.
name
);
...
...
@@ -141,31 +141,31 @@ static void version(void)
for
(;
*
suffixes
!=
nullptr
;
++
suffixes
)
printf
(
" %s"
,
*
suffixes
);
p
uts
(
"
"
);
p
rintf
(
"
\n
"
);
});
p
uts
(
"
\n
"
"Tag plugins:
\n
"
p
rintf
(
"
\n
"
"Tag plugins:
\n
"
#ifdef ENABLE_ID3TAG
" id3tag"
" id3tag"
#endif
"
\n\n
"
"Output plugins:
"
);
"
\n\n
"
"Output plugins:
\n
"
);
audio_output_plugins_for_each
(
plugin
)
printf
(
" %s"
,
plugin
->
name
);
p
uts
(
"
"
);
p
rintf
(
"
\n
"
);
#ifdef ENABLE_ENCODER
p
uts
(
"
\n
"
"Encoder plugins:
"
);
p
rintf
(
"
\n
"
"Encoder plugins:
\n
"
);
encoder_plugins_for_each
(
plugin
)
printf
(
" %s"
,
plugin
->
name
);
p
uts
(
"
"
);
p
rintf
(
"
\n
"
);
#endif
#ifdef ENABLE_ARCHIVE
p
uts
(
"
\n
"
"Archive plugins:
"
);
p
rintf
(
"
\n
"
"Archive plugins:
\n
"
);
archive_plugins_for_each
(
plugin
)
{
printf
(
" [%s]"
,
plugin
->
name
);
...
...
@@ -174,22 +174,22 @@ static void version(void)
for
(;
*
suffixes
!=
nullptr
;
++
suffixes
)
printf
(
" %s"
,
*
suffixes
);
p
uts
(
"
"
);
p
rintf
(
"
\n
"
);
}
#endif
p
uts
(
"
\n
"
"Input plugins:
"
);
p
rintf
(
"
\n
"
"Input plugins:
\n
"
);
input_plugins_for_each
(
plugin
)
printf
(
" %s"
,
plugin
->
name
);
p
uts
(
"
\n\n
"
"Playlist plugins:
"
);
p
rintf
(
"
\n\n
"
"Playlist plugins:
\n
"
);
playlist_plugins_for_each
(
plugin
)
printf
(
" %s"
,
plugin
->
name
);
p
uts
(
"
\n\n
"
"Protocols:
"
);
p
rintf
(
"
\n\n
"
"Protocols:
\n
"
);
print_supported_uri_schemes_to_fp
(
stdout
);
exit
(
EXIT_SUCCESS
);
...
...
@@ -211,12 +211,12 @@ static void PrintOption(const OptionDef &opt)
gcc_noreturn
static
void
help
(
void
)
{
p
uts
(
"Usage:
\n
"
" mpd [OPTION...] [path/to/mpd.conf]
\n
"
"
\n
"
"Music Player Daemon - a daemon for playing music.
\n
"
"
\n
"
"Options:
"
);
p
rintf
(
"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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment