diff options
author | tron <tron> | 2006-01-30 00:52:28 +0000 |
---|---|---|
committer | tron <tron> | 2006-01-30 00:52:28 +0000 |
commit | 3acd1d6c98446f87fc16f205a2d5125382aabde4 (patch) | |
tree | ebc62815cdaa0577e31524d9dce8cf020b5938b1 /net/rtorrent/patches | |
parent | 71443089a8f583dc33bfdea7413ed4e367a54816 (diff) | |
download | pkgsrc-3acd1d6c98446f87fc16f205a2d5125382aabde4.tar.gz |
Update "libtorrent" package to version 0.8.3 and "rtorrent" package to
version 0.4.3. Changes since 0.7.6/0.3.6:
- New throttle implementation
- Improved config file parser
- Settings for using a http proxy and changing the process's umask.
- Many more bug fixes and improvements
Diffstat (limited to 'net/rtorrent/patches')
-rw-r--r-- | net/rtorrent/patches/patch-aa | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/net/rtorrent/patches/patch-aa b/net/rtorrent/patches/patch-aa new file mode 100644 index 00000000000..16ba352de1f --- /dev/null +++ b/net/rtorrent/patches/patch-aa @@ -0,0 +1,67 @@ +$NetBSD: patch-aa,v 1.3 2006/01/30 00:52:28 tron Exp $ + +--- src/utils/variable_map.cc.orig 2006-01-17 16:26:38.000000000 +0000 ++++ src/utils/variable_map.cc 2006-01-30 00:02:39.000000000 +0000 +@@ -37,6 +37,7 @@ + #include "config.h" + + #include <algorithm> ++#include <cctype> + #include <rak/functional.h> + #include <torrent/exceptions.h> + #include <torrent/bencode.h> +@@ -93,6 +94,11 @@ + return first; + } + ++static bool ++I_hate_C_Plus_Plus(char c) { ++ return std::isspace(c); ++} ++ + std::string::const_iterator + parse_unknown(std::string::const_iterator first, std::string::const_iterator last, torrent::Bencode* dest) { + if (*first == '"') { +@@ -108,7 +114,7 @@ + + } else { + // Add rak::or and check for ','. +- std::string::const_iterator next = std::find_if(first, last, std::ptr_fun(&std::isspace)); ++ std::string::const_iterator next = std::find_if(first, last, std::ptr_fun(&I_hate_C_Plus_Plus)); + + *dest = std::string(first, next); + return next; +@@ -117,13 +123,13 @@ + + std::string::const_iterator + parse_args(std::string::const_iterator first, std::string::const_iterator last, torrent::Bencode::List* dest) { +- first = std::find_if(first, last, std::not1(std::ptr_fun(&std::isspace))); ++ first = std::find_if(first, last, std::not1(std::ptr_fun(&I_hate_C_Plus_Plus))); + + while (first != last) { + dest->push_back(torrent::Bencode()); + + first = parse_unknown(first, last, &dest->back()); +- first = std::find_if(first, last, std::not1(std::ptr_fun(&std::isspace))); ++ first = std::find_if(first, last, std::not1(std::ptr_fun(&I_hate_C_Plus_Plus))); + + if (first != last && *first != ',') + throw torrent::input_error("A string with blanks must be quoted."); +@@ -135,7 +141,7 @@ + void + VariableMap::process_command(const std::string& command) { + std::string::const_iterator pos = command.begin(); +- pos = std::find_if(pos, command.end(), std::not1(std::ptr_fun(&std::isspace))); ++ pos = std::find_if(pos, command.end(), std::not1(std::ptr_fun(&I_hate_C_Plus_Plus))); + + if (pos == command.end() || *pos == '#') + return; +@@ -143,7 +149,7 @@ + // Replace with parse_unknown? + std::string key; + pos = parse_name(pos, command.end(), &key); +- pos = std::find_if(pos, command.end(), std::not1(std::ptr_fun(&std::isspace))); ++ pos = std::find_if(pos, command.end(), std::not1(std::ptr_fun(&I_hate_C_Plus_Plus))); + + if (pos == command.end() || *pos != '=') + throw torrent::input_error("Could not find '='."); |