* Renamed TrackerInfo to DownloadInfo, moved it to DownloadMain and

cleaned up DownloadWrapper etc.

* Resume total upload from the client rather than
torrent::Download::hash_resume_load(...).

* Show client names and versions. (incomplete)


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@646 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-03-01 20:48:54 +00:00
parent c77ecb034f
commit b00d083ac2
11 changed files with 393 additions and 62 deletions
-55
View File
@@ -50,61 +50,6 @@
namespace display {
inline char*
print_buffer(char* first, char* last, const char* format) {
if (first >= last)
return first;
int s = snprintf(first, last - first, format);
if (s < 0)
return first;
else
return std::min(first + s, last);
}
template <typename Arg1>
inline char*
print_buffer(char* first, char* last, const char* format, const Arg1& arg1) {
if (first >= last)
return first;
int s = snprintf(first, last - first, format, arg1);
if (s < 0)
return first;
else
return std::min(first + s, last);
}
template <typename Arg1, typename Arg2>
inline char*
print_buffer(char* first, char* last, const char* format, const Arg1& arg1, const Arg2& arg2) {
if (first >= last)
return first;
int s = snprintf(first, last - first, format, arg1, arg2);
if (s < 0)
return first;
else
return std::min(first + s, last);
}
template <typename Arg1, typename Arg2, typename Arg3>
inline char*
print_buffer(char* first, char* last, const char* format, const Arg1& arg1, const Arg2& arg2, const Arg3& arg3) {
if (first >= last)
return first;
int s = snprintf(first, last - first, format, arg1, arg2, arg3);
if (s < 0)
return first;
else
return std::min(first + s, last);
}
char*
print_string(char* first, char* last, char* str) {
// We don't have any nice simple functions for copying strings that