diff --git a/TODO b/TODO index ae7d0c7f..2af4a4d8 100644 --- a/TODO +++ b/TODO @@ -13,4 +13,12 @@ allowed since the tracker set a min interval. Make accumulate return the value, no refs please... -!!! Clean up logs at regular intervals. \ No newline at end of file +> - listing the total upload / download bandwidth at the bottom of the +> screen; + +> - seeing the number of seeds / leechers of a torrent on the main +> screen (and the level of distribution between leechers); + +> - 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. diff --git a/src/input/path_input.cc b/src/input/path_input.cc index 32ac1864..cfb8a893 100644 --- a/src/input/path_input.cc +++ b/src/input/path_input.cc @@ -23,51 +23,12 @@ #include "config.h" #include +#include #include "path_input.h" namespace input { -struct -string_starts_with : public std::binary_function { - bool operator () (const std::string& complete, const std::string& base) const { - return !complete.compare(0, base.size(), base); - } -}; - -template -typename std::iterator_traits<_InputIter>::difference_type -count_base(_InputIter __first1, _InputIter __last1, - _InputIter __first2, _InputIter __last2) { - - typename std::iterator_traits<_InputIter>::difference_type __n = 0; - - for ( ;__first1 != __last1 && __first2 != __last2; ++__first1, ++__first2, ++__n) - if (*__first1 != *__first2) - return __n; - - return __n; -} - -template -std::string -make_base(_InputIter __first, _InputIter __last) { - if (__first == __last) - return ""; - - std::string __base = *__first++; - - for ( ;__first != __last; ++__first) { - std::string::size_type __pos = count_base(__base.begin(), __base.end(), - __first->begin(), __first->end()); - - if (__pos < __base.size()) - __base.resize(__pos); - } - - return __base; -} - PathInput::PathInput() { }