build with C++ compiler
authorMax Kellermann <>
Sat, 17 Feb 2018 15:14:12 +0000 (16:14 +0100)
committerMax Kellermann <>
Sun, 18 Feb 2018 10:11:04 +0000 (11:11 +0100)
build with C++ compiler

Yes, ncmpc is switching to C++.  A lot of code can be a lot simpler.
Once you have gotten used to C++ sugar, it's hard to go back to plain

Interestingly, this commit makes the ncmpc binary *smaller* (by one
kilobyte, with GCC 7.3).
122 files changed:
src/Main.cxx [moved from src/main.c with 84% similarity]
src/aconnect.cxx [moved from src/aconnect.c with 92% similarity]
src/aconnect.hxx [moved from src/aconnect.h with 100% similarity]
src/callbacks.cxx [moved from src/callbacks.c with 88% similarity]
src/callbacks.hxx [moved from src/callbacks.h with 90% similarity]
src/charset.cxx [moved from src/charset.c with 89% similarity]
src/charset.hxx [moved from src/charset.h with 97% similarity]
src/colors.cxx [moved from src/colors.c with 76% similarity]
src/colors.hxx [moved from src/colors.h with 97% similarity]
src/command.cxx [moved from src/command.c with 98% similarity]
src/command.hxx [moved from src/command.h with 97% similarity]
src/conf.cxx [moved from src/conf.c with 92% similarity]
src/conf.h [deleted file]
src/conf.hxx [new file with mode: 0644]
src/db_completion.cxx [moved from src/db_completion.c with 90% similarity]
src/db_completion.hxx [moved from src/db_completion.h with 100% similarity]
src/defaults.hxx [moved from src/defaults.h with 97% similarity]
src/filelist.cxx [moved from src/filelist.c with 87% similarity]
src/filelist.hxx [moved from src/filelist.h with 96% similarity]
src/gidle.cxx [moved from src/gidle.c with 93% similarity]
src/gidle.hxx [moved from src/gidle.h with 98% similarity]
src/hscroll.cxx [moved from src/hscroll.c with 77% similarity]
src/hscroll.hxx [moved from src/hscroll.h with 100% similarity]
src/keyboard.cxx [moved from src/keyboard.c with 91% similarity]
src/keyboard.hxx [moved from src/keyboard.h with 97% similarity]
src/lirc.cxx [moved from src/lirc.c with 84% similarity]
src/lirc.hxx [moved from src/lirc.h with 95% similarity]
src/list_window.cxx [moved from src/list_window.c with 96% similarity]
src/list_window.hxx [moved from src/list_window.h with 98% similarity]
src/lyrics.cxx [moved from src/lyrics.c with 89% similarity]
src/lyrics.hxx [moved from src/lyrics.h with 93% similarity]
src/match.cxx [moved from src/match.c with 80% similarity]
src/match.hxx [moved from src/match.h with 95% similarity]
src/mpdclient.cxx [moved from src/mpdclient.c with 88% similarity]
src/mpdclient.hxx [moved from src/mpdclient.h with 95% similarity]
src/ncmpc.hxx [moved from src/ncmpc.h with 91% similarity]
src/ncu.cxx [moved from src/ncu.c with 87% similarity]
src/ncu.hxx [moved from src/ncu.h with 96% similarity]
src/net/async_connect.cxx [moved from src/net/async_connect.c with 98% similarity]
src/net/async_connect.hxx [moved from src/net/async_connect.h with 98% similarity]
src/net/async_rconnect.cxx [moved from src/net/async_rconnect.c with 93% similarity]
src/net/async_rconnect.hxx [moved from src/net/async_rconnect.h with 100% similarity]
src/net/resolver.cxx [moved from src/net/resolver.c with 88% similarity]
src/net/resolver.hxx [moved from src/net/resolver.h with 100% similarity]
src/net/socket.cxx [moved from src/net/socket.c with 99% similarity]
src/net/socket.hxx [moved from src/net/socket.h with 96% similarity]
src/net/types.hxx [moved from src/net/types.h with 100% similarity]
src/options.cxx [moved from src/options.c with 83% similarity]
src/options.hxx [moved from src/options.h with 75% similarity]
src/paint.hxx [moved from src/paint.h with 97% similarity]
src/player_command.cxx [moved from src/player_command.c with 87% similarity]
src/player_command.hxx [moved from src/player_command.h with 94% similarity]
src/playlist.cxx [moved from src/playlist.c with 95% similarity]
src/playlist.hxx [moved from src/playlist.h with 94% similarity]
src/plugin.cxx [moved from src/plugin.c with 82% similarity]
src/plugin.hxx [moved from src/plugin.h with 97% similarity]
src/progress_bar.cxx [moved from src/progress_bar.c with 95% similarity]
src/progress_bar.hxx [moved from src/progress_bar.h with 95% similarity]
src/save_playlist.cxx [moved from src/save_playlist.c with 86% similarity]
src/save_playlist.hxx [moved from src/save_playlist.h with 100% similarity]
src/screen.cxx [moved from src/screen.c with 88% similarity]
src/screen.hxx [moved from src/screen.h with 93% similarity]
src/screen_artist.cxx [moved from src/screen_artist.c with 84% similarity]
src/screen_artist.hxx [moved from src/screen_artist.h with 100% similarity]
src/screen_browser.cxx [moved from src/screen_browser.c with 88% similarity]
src/screen_browser.hxx [moved from src/screen_browser.h with 97% similarity]
src/screen_chat.cxx [moved from src/screen_chat.c with 86% similarity]
src/screen_chat.hxx [moved from src/screen_chat.h with 100% similarity]
src/screen_client.cxx [moved from src/screen_client.c with 89% similarity]
src/screen_client.hxx [moved from src/screen_client.h with 98% similarity]
src/screen_file.cxx [moved from src/screen_file.c with 88% similarity]
src/screen_file.hxx [moved from src/screen_file.h with 98% similarity]
src/screen_find.cxx [moved from src/screen_find.c with 90% similarity]
src/screen_find.hxx [moved from src/screen_find.h with 97% similarity]
src/screen_help.cxx [moved from src/screen_help.c with 59% similarity]
src/screen_help.hxx [moved from src/screen_help.h with 100% similarity]
src/screen_init.cxx [moved from src/screen_init.c with 88% similarity]
src/screen_interface.hxx [moved from src/screen_interface.h with 93% similarity]
src/screen_keydef.cxx [moved from src/screen_keydef.c with 91% similarity]
src/screen_keydef.hxx [moved from src/screen_keydef.h with 100% similarity]
src/screen_list.cxx [moved from src/screen_list.c with 85% similarity]
src/screen_list.hxx [moved from src/screen_list.h with 98% similarity]
src/screen_lyrics.cxx [moved from src/screen_lyrics.c with 81% similarity]
src/screen_lyrics.hxx [moved from src/screen_lyrics.h with 98% similarity]
src/screen_outputs.cxx [moved from src/screen_outputs.c with 80% similarity]
src/screen_outputs.hxx [moved from src/screen_outputs.h with 100% similarity]
src/screen_paint.cxx [moved from src/screen_paint.c with 88% similarity]
src/screen_queue.cxx [moved from src/screen_queue.c with 86% similarity]
src/screen_queue.hxx [moved from src/screen_queue.h with 100% similarity]
src/screen_search.cxx [moved from src/screen_search.c with 85% similarity]
src/screen_search.hxx [moved from src/screen_search.h with 100% similarity]
src/screen_song.cxx [moved from src/screen_song.c with 85% similarity]
src/screen_song.hxx [moved from src/screen_song.h with 100% similarity]
src/screen_status.cxx [moved from src/screen_status.c with 93% similarity]
src/screen_status.hxx [moved from src/screen_status.h with 96% similarity]
src/screen_text.cxx [moved from src/screen_text.c with 87% similarity]
src/screen_text.hxx [moved from src/screen_text.h with 97% similarity]
src/screen_utils.cxx [moved from src/screen_utils.c with 89% similarity]
src/screen_utils.hxx [moved from src/screen_utils.h with 95% similarity]
src/signals.cxx [moved from src/signals.c with 89% similarity]
src/signals.hxx [moved from src/signals.h with 98% similarity]
src/song_paint.cxx [moved from src/song_paint.c with 89% similarity]
src/song_paint.hxx [moved from src/song_paint.h with 98% similarity]
src/status_bar.cxx [moved from src/status_bar.c with 93% similarity]
src/status_bar.hxx [moved from src/status_bar.h with 97% similarity]
src/strfsong.cxx [moved from src/strfsong.c with 91% similarity]
src/strfsong.hxx [moved from src/strfsong.h with 100% similarity]
src/time_format.cxx [moved from src/time_format.c with 98% similarity]
src/time_format.hxx [moved from src/time_format.h with 100% similarity]
src/title_bar.cxx [moved from src/title_bar.c with 94% similarity]
src/title_bar.hxx [moved from src/title_bar.h with 97% similarity]
src/utils.cxx [moved from src/utils.c with 94% similarity]
src/utils.hxx [moved from src/utils.h with 100% similarity]
src/window.hxx [moved from src/window.h with 100% similarity]
src/wreadln.cxx [moved from src/wreadln.c with 90% similarity]
src/wreadln.hxx [moved from src/wreadln.h with 87% similarity]
src/xterm_title.cxx [moved from src/xterm_title.c with 90% similarity]
src/xterm_title.hxx [moved from src/xterm_title.h with 100% similarity]
test/run_hscroll.cxx [moved from test/run_hscroll.c with 96% similarity]