From 5b724f2a836d6697a92bf1f8cf0f65ff14250c3c Mon Sep 17 00:00:00 2001 From: unK Date: Mon, 6 Oct 2008 12:08:34 +0200 Subject: [PATCH] fix compilation issue without taglib support and replace printf by std::cout --- src/helpers.cpp | 6 ++++-- src/ncmpcpp.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/helpers.cpp b/src/helpers.cpp index 57d156cc..1e3d7d8c 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -18,6 +18,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include + #include "helpers.h" #include "tag_editor.h" @@ -57,7 +59,7 @@ bool ConnectToMPD() { if (!Mpd->Connect()) { - printf("Cannot connect to mpd: %s\n", Mpd->GetErrorMessage().c_str()); + std::cout << "Cannot connect to mpd: " << Mpd->GetErrorMessage() << std::endl; return false; } return true; @@ -263,7 +265,7 @@ bool SortSongsByTrack(Song *a, Song *b) void WindowTitle(const string &status) { if (TERMINAL_TYPE != "linux" && Config.set_window_title) - printf("\033]0;%s\7",status.c_str()); + std::cout << "\033]0;" << status << "\7"; } void EscapeUnallowedChars(string &s) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 28b58dd7..52894ce0 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -18,6 +18,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include + #include "mpdpp.h" #include "ncmpcpp.h" @@ -831,7 +833,7 @@ int main(int argc, char *argv[]) if (COLS < 20 || LINES < 5) { endwin(); - printf("Screen too small!\n"); + std::cout << "Screen too small!\n"; return 1; } @@ -3506,7 +3508,7 @@ int main(int argc, char *argv[]) Mpd->Disconnect(); curs_set(1); endwin(); - printf("\n"); + std::cout << std::endl; return 0; }