From fe11d1936dcacc33da574dfaaee408470a586b95 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Sat, 26 Mar 2005 17:44:22 +0000 Subject: [PATCH] Fixed some *BSD compatibility bugs. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@371 e378c898-3ddf-0310-93e7-cc216c733640 --- README | 5 +++++ TODO | 9 +++++++++ src/display/utils.cc | 2 +- src/display/window_log.cc | 6 ++++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README b/README index 826b8bc0..c0080edd 100644 --- a/README +++ b/README @@ -1,3 +1,8 @@ +LICENSE + + GNU GPL, see COPYING. + + Options and flags: -i Set the IP address sent to the tracker. diff --git a/TODO b/TODO index 2af4a4d8..c8c0eabd 100644 --- a/TODO +++ b/TODO @@ -22,3 +22,12 @@ Make accumulate return the value, no refs please... > - being able to delete not just the torrent file, but the files it > created from rtorrent. Like when you start a torrent, but it is too > slow or broken or for various reasons you don't want to download it. + + +Const cast problems? + +std::tm *u = std::localtime(&t.tval().tv_sec); + +Let us see the torrent comment. + +Why is the client lagging when downloading a http torrent? Looks like libcurl diff --git a/src/display/utils.cc b/src/display/utils.cc index b5cb7569..e42f4f45 100644 --- a/src/display/utils.cc +++ b/src/display/utils.cc @@ -58,7 +58,7 @@ print_download_status(core::Download* d) { std::string print_hhmmss(utils::Timer t) { - std::tm *u = std::localtime(&t.tval().tv_sec); + std::tm *u = std::localtime(&(time_t)t.tval().tv_sec); if (u == NULL) return "inv_time"; diff --git a/src/display/window_log.cc b/src/display/window_log.cc index 72db79a8..f78be18a 100644 --- a/src/display/window_log.cc +++ b/src/display/window_log.cc @@ -58,7 +58,7 @@ WindowLog::redraw() { int pos = 0; //m_canvas->print(std::max(0, (int)m_canvas->get_width() / 2 - 5), pos++, "*** Log ***"); - m_canvas->print(0, 0, "___"); + //m_canvas->print(0, 0, "___"); for (core::Log::iterator itr = m_log->begin(), end = find_older(); itr != end && pos < m_canvas->get_height(); ++itr) m_canvas->print(0, pos++, "(%s) %s", @@ -69,7 +69,9 @@ WindowLog::redraw() { void WindowLog::receive_update() { iterator itr = find_older(); - int h = std::min(std::distance(m_log->begin(), itr), 10); + + int h = std::min(std::distance(m_log->begin(), itr), + (std::iterator_traits::difference_type)10); if (h != m_minHeight) { set_active(h != 0);