mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 22:22:31 +00:00
* 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user