diff --git a/doc/manual/logging.md b/doc/manual/logging.md index 19441a8d1..0692c902a 100644 --- a/doc/manual/logging.md +++ b/doc/manual/logging.md @@ -4,7 +4,7 @@ # log.open_file = "log name", "file path" - log.open_file = "rtorrent.log", (cat,/tmp/rtorrent.log.,(system.pid)) + log.open_file = "rtorrent.log", (cat,/tmp/rtorrent.log.,(system.pid)) A newly opened log file is not connected to any logging events. diff --git a/doc/manual/logging.tex b/doc/manual/logging.tex index 67aa294ea..16d0eecaf 100644 --- a/doc/manual/logging.tex +++ b/doc/manual/logging.tex @@ -5,7 +5,7 @@ \subsection{Opening log files} \begin{verbatim} # log.open_file = "log name", "file path" -log.open_file = "rtorrent.log", (cat,/tmp/rtorrent.log.,(system.pid)) +log.open_file = "rtorrent.log", (cat,/tmp/rtorrent.log.,(system.pid)) \end{verbatim} A newly opened log file is not connected to any logging events. diff --git a/doc/old/rtorrent.1 b/doc/old/rtorrent.1 index 5cdf2bddc..5c86a6978 100644 --- a/doc/old/rtorrent.1 +++ b/doc/old/rtorrent.1 @@ -1,7 +1,7 @@ -.\" This manpage has been automatically generated by docbook2man +.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: -.\" -.\" Please send any bug reports, improvements, comments, patches, +.\" +.\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "RTORRENT" "1" "14 May 2009" "BitTorrent client for ncurses" "" @@ -220,14 +220,14 @@ default, encryption is disabled, equivalent to specifying the option \fBnone\fR\&. Alternatively, any number of the following options may be specified: -\fBallow_incoming\fR (allow incoming encrypted connections), +\fBallow_incoming\fR (allow incoming encrypted connections), \fBtry_outgoing\fR (use encryption for outgoing connections), -\fBrequire\fR (disable unencrypted handshakes), +\fBrequire\fR (disable unencrypted handshakes), \fBrequire_RC4\fR (also disable plaintext transmission after the initial encrypted handshake), \fBenable_retry\fR (if the initial outgoing connection fails, retry -with encryption turned on if it was off or off if it was on), -\fBprefer_plaintext\fR (choose plaintext when peer offers a choice +with encryption turned on if it was off or off if it was on), +\fBprefer_plaintext\fR (choose plaintext when peer offers a choice between plaintext transmission and RC4 encryption, otherwise RC4 will be used). .TP \fBpeer_exchange = \fIyes | no\fB\fR @@ -294,7 +294,7 @@ Stop torrents when they reach the given upload ratio upload amount of this many bytes as well. If the optional \fBmax_ratio\fR is given, stop the torrent when reaching this ratio regardless of the total upload -amount. Exclude certain torrent by pressing +amount. Exclude certain torrent by pressing \fBShift+I\fR in the downlist list. Use with the \fBschedule\fR option. .TP @@ -408,7 +408,7 @@ Set the UDP listen port for DHT. Defaults to 6881. .TP \fBdht_add_node = \fIhost[:port]\fB\fR Not intended for use in the configuration file but as one-time option in the -client or on the command line to bootstrap an empty DHT node table. Contacts +client or on the command line to bootstrap an empty DHT node table. Contacts the given node and attempts to bootstrap from it if it replies. The port is optional, with port 6881 being used by default. .TP diff --git a/doc/old/rtorrent.1.xml b/doc/old/rtorrent.1.xml index 68f5ae639..3f92b807b 100644 --- a/doc/old/rtorrent.1.xml +++ b/doc/old/rtorrent.1.xml @@ -11,12 +11,12 @@ BitTorrent client for ncurses - + rtorrent a BitTorrent client for ncurses - + @@ -28,7 +28,7 @@ URL | FILE - + DESCRIPTION @@ -494,14 +494,14 @@ options may be specified: -allow_incoming (allow incoming encrypted connections), +allow_incoming (allow incoming encrypted connections), try_outgoing (use encryption for outgoing connections), -require (disable unencrypted handshakes), +require (disable unencrypted handshakes), require_RC4 (also disable plaintext transmission after the initial encrypted handshake), enable_retry (if the initial outgoing connection fails, retry -with encryption turned on if it was off or off if it was on), -prefer_plaintext (choose plaintext when peer offers a choice +with encryption turned on if it was off or off if it was on), +prefer_plaintext (choose plaintext when peer offers a choice between plaintext transmission and RC4 encryption, otherwise RC4 will be used). @@ -752,7 +752,7 @@ Set the UDP listen port for DHT. Defaults to 6881. dht_add_node = host[:port] Not intended for use in the configuration file but as one-time option in the -client or on the command line to bootstrap an empty DHT node table. Contacts +client or on the command line to bootstrap an empty DHT node table. Contacts the given node and attempts to bootstrap from it if it replies. The port is optional, with port 6881 being used by default. diff --git a/doc/rtorrent_fast_resume.pl b/doc/rtorrent_fast_resume.pl index 286507a8a..63cd739e1 100755 --- a/doc/rtorrent_fast_resume.pl +++ b/doc/rtorrent_fast_resume.pl @@ -83,7 +83,7 @@ foreach my $f (0..$#files) { die "$d$files[$f] not found.\n" unless -e "$d$files[$f]"; my $mtime = (stat "$d$files[$f]")[9]; - + # Compute number of chunks per file my $fsize = (exists $t->{info}{files}) ? $t->{info}{files}[$f]{length} : 1; my $fchunks = ($pmod ? 1 : 0); @@ -91,7 +91,7 @@ else { ($pmod, $fsize) = (0, $fsize-$pmod); } $fchunks += ceil($fsize / $psize); $pmod ||= $psize - ($fsize % $psize); - + $t->{libtorrent_resume}{files}[$f] = { priority => 0, # Don't download; we already have the file, so don't clobber it! mtime => $mtime, diff --git a/rak/address_info.h b/rak/address_info.h index 83a202246..ad24f0cfc 100644 --- a/rak/address_info.h +++ b/rak/address_info.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -60,10 +60,10 @@ class address_info { int socket_type() const { return m_addrinfo.ai_socktype; } void set_socket_type(int t) { m_addrinfo.ai_socktype = t; } - + int protocol() const { return m_addrinfo.ai_protocol; } void set_protocol(int p) { m_addrinfo.ai_protocol = p; } - + size_t length() const { return m_addrinfo.ai_addrlen; } socket_address* address() { return reinterpret_cast(m_addrinfo.ai_addr); } @@ -89,7 +89,7 @@ address_info::get_address_info(const char* node, int pfamily, int stype, address hints.clear(); hints.set_family(pfamily); hints.set_socket_type(stype); - + return ::getaddrinfo(node, NULL, hints.c_addrinfo(), reinterpret_cast(ai)); } diff --git a/rak/algorithm.h b/rak/algorithm.h index 986138201..51eb73adc 100644 --- a/rak/algorithm.h +++ b/rak/algorithm.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -50,7 +50,7 @@ for_each_pre(_InputIter __first, _InputIter __last, _Function __f) { while (__first != __last) { __tmp = __first++; - + __f(*__tmp); } @@ -166,7 +166,7 @@ inline int popcount_wrapper(T t) { #else #error __builtin_popcount not found. unsigned int count = 0; - + while (t) { count += t & 0x1; t >> 1; diff --git a/rak/allocators.h b/rak/allocators.h index 0a1b71177..a8e8a473d 100644 --- a/rak/allocators.h +++ b/rak/allocators.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/rak/error_number.h b/rak/error_number.h index 2948a97ec..d3150b88f 100644 --- a/rak/error_number.h +++ b/rak/error_number.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -55,7 +55,7 @@ class error_number { static const int e_nomem = ENOMEM; static const int e_notdir = ENOTDIR; static const int e_isdir = EISDIR; - + static const int e_intr = EINTR; error_number() : m_errno(0) {} diff --git a/rak/file_stat.h b/rak/file_stat.h index f1ad8c2b2..0f42abd53 100644 --- a/rak/file_stat.h +++ b/rak/file_stat.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/rak/fs_stat.h b/rak/fs_stat.h index 2d73ff1b2..161a28a6d 100644 --- a/rak/fs_stat.h +++ b/rak/fs_stat.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/rak/functional.h b/rak/functional.h index ac77b2dac..04887b509 100644 --- a/rak/functional.h +++ b/rak/functional.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -288,12 +288,12 @@ struct on_t : public std::unary_function inline on_t on(Src s, Dest d) { return on_t(s, d); -} +} template struct on2_t : public std::binary_function { @@ -308,12 +308,12 @@ struct on2_t : public std::binary_function inline on2_t on2(Src s, Dest d) { return on2_t(s, d); -} +} // Creates a functor for accessing a member. template @@ -470,7 +470,7 @@ class ptr_fun0 { bool is_valid() const { return m_function; } Ret operator () () { return m_function(); } - + private: Function m_function; }; @@ -487,7 +487,7 @@ class mem_fun0 { bool is_valid() const { return m_object; } Ret operator () () { return (m_object->*m_function)(); } - + private: Object* m_object; Function m_function; @@ -505,7 +505,7 @@ class const_mem_fun0 { bool is_valid() const { return m_object; } Ret operator () () const { return (m_object->*m_function)(); } - + private: const Object* m_object; Function m_function; @@ -523,7 +523,7 @@ class mem_fun1 { bool is_valid() const { return m_object; } Ret operator () (Arg1 a1) { return (m_object->*m_function)(a1); } - + private: Object* m_object; Function m_function; @@ -541,7 +541,7 @@ class const_mem_fun1 { bool is_valid() const { return m_object; } Ret operator () (Arg1 a1) const { return (m_object->*m_function)(a1); } - + private: const Object* m_object; Function m_function; @@ -563,7 +563,7 @@ class mem_fun2 : public std::binary_function { const object_type* object() const { return m_object; } Ret operator () (Arg1 a1, Arg2 a2) { return (m_object->*m_function)(a1, a2); } - + private: Object* m_object; Function m_function; @@ -581,7 +581,7 @@ class mem_fun3 { bool is_valid() const { return m_object; } Ret operator () (Arg1 a1, Arg2 a2, Arg3 a3) { return (m_object->*m_function)(a1, a2, a3); } - + private: Object* m_object; Function m_function; diff --git a/rak/functional_fun.h b/rak/functional_fun.h index 054290210..002e4c0a3 100644 --- a/rak/functional_fun.h +++ b/rak/functional_fun.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -184,7 +184,7 @@ class ptr_fn0_t : public function_base0 { ptr_fn0_t(Func func) : m_func(func) {} virtual ~ptr_fn0_t() {} - + virtual Result operator () () { return m_func(); } private: @@ -198,7 +198,7 @@ class ptr_fn1_t : public function_base1 { ptr_fn1_t(Func func) : m_func(func) {} virtual ~ptr_fn1_t() {} - + virtual Result operator () (Arg1 arg1) { return m_func(arg1); } private: @@ -212,7 +212,7 @@ class ptr_fn2_t : public function_base2 { ptr_fn2_t(Func func) : m_func(func) {} virtual ~ptr_fn2_t() {} - + virtual Result operator () (Arg1 arg1, Arg2 arg2) { return m_func(arg1, arg2); } private: @@ -226,7 +226,7 @@ class mem_fn0_t : public function_base0 { mem_fn0_t(Object* object, Func func) : m_object(object), m_func(func) {} virtual ~mem_fn0_t() {} - + virtual Result operator () () { return (m_object->*m_func)(); } private: @@ -241,7 +241,7 @@ class mem_fn1_t : public function_base1 { mem_fn1_t(Object* object, Func func) : m_object(object), m_func(func) {} virtual ~mem_fn1_t() {} - + virtual Result operator () (Arg1 arg1) { return (m_object->*m_func)(arg1); } private: @@ -256,7 +256,7 @@ class mem_fn3_t : public function_base3 { mem_fn3_t(Object* object, Func func) : m_object(object), m_func(func) {} virtual ~mem_fn3_t() {} - + virtual Result operator () (Arg1 arg1, Arg2 arg2, Arg3 arg3) { return (m_object->*m_func)(arg1, arg2, arg3); } private: @@ -271,7 +271,7 @@ class mem_fn2_t : public function_base2 { mem_fn2_t(Object* object, Func func) : m_object(object), m_func(func) {} virtual ~mem_fn2_t() {} - + virtual Result operator () (Arg1 arg1, Arg2 arg2) { return (m_object->*m_func)(arg1, arg2); } private: @@ -286,7 +286,7 @@ class const_mem_fn0_t : public function_base0 { const_mem_fn0_t(const Object* object, Func func) : m_object(object), m_func(func) {} virtual ~const_mem_fn0_t() {} - + virtual Result operator () () { return (m_object->*m_func)(); } private: @@ -301,7 +301,7 @@ class const_mem_fn1_t : public function_base1 { const_mem_fn1_t(const Object* object, Func func) : m_object(object), m_func(func) {} virtual ~const_mem_fn1_t() {} - + virtual Result operator () (Arg1 arg1) { return (m_object->*m_func)(arg1); } private: @@ -317,7 +317,7 @@ class mem_fn0_b1_t : public function_base0 { mem_fn0_b1_t(Object* object, Func func, const Arg1 arg1) : m_object(object), m_func(func), m_arg1(arg1) {} virtual ~mem_fn0_b1_t() {} - + virtual Result operator () () { return (m_object->*m_func)(m_arg1); } private: @@ -333,7 +333,7 @@ class mem_fn1_b1_t : public function_base1 { mem_fn1_b1_t(Object* object, Func func, const Arg1 arg1) : m_object(object), m_func(func), m_arg1(arg1) {} virtual ~mem_fn1_b1_t() {} - + virtual Result operator () (const Arg2 arg2) { return (m_object->*m_func)(m_arg1, arg2); } private: @@ -349,7 +349,7 @@ class mem_fn1_b2_t : public function_base1 { mem_fn1_b2_t(Object* object, Func func, const Arg2 arg2) : m_object(object), m_func(func), m_arg2(arg2) {} virtual ~mem_fn1_b2_t() {} - + virtual Result operator () (const Arg1 arg1) { return (m_object->*m_func)(arg1, m_arg2); } private: @@ -365,7 +365,7 @@ class ptr_fn0_b1_t : public function_base0 { ptr_fn0_b1_t(Func func, const Arg1 arg1) : m_func(func), m_arg1(arg1) {} virtual ~ptr_fn0_b1_t() {} - + virtual Result operator () () { return m_func(m_arg1); } private: @@ -380,7 +380,7 @@ class ptr_fn1_b1_t : public function_base1 { ptr_fn1_b1_t(Func func, const Arg1 arg1) : m_func(func), m_arg1(arg1) {} virtual ~ptr_fn1_b1_t() {} - + virtual Result operator () (Arg2 arg2) { return m_func(m_arg1, arg2); } private: @@ -395,7 +395,7 @@ class ptr_fn2_b1_t : public function_base2 { ptr_fn2_b1_t(Func func, const Arg1 arg1) : m_func(func), m_arg1(arg1) {} virtual ~ptr_fn2_b1_t() {} - + virtual Result operator () (Arg2 arg2, Arg3 arg3) { return m_func(m_arg1, arg2, arg3); } private: @@ -411,7 +411,7 @@ class ftor_fn1_t : public function_base1 class value_fn0_t : public function_base0 { public: value_fn0_t(const Result& val) : m_value(val) {} - + virtual Result operator () () { return m_value; } private: @@ -452,7 +452,7 @@ class convert_fn0_t : public function_base0 { convert_fn0_t(typename src_type::base_type* object) { m_object.set(object); } virtual ~convert_fn0_t() {} - + virtual Result operator () () { return m_object(); } @@ -468,7 +468,7 @@ class convert_fn1_t : public function_base1 { convert_fn1_t(typename src_type::base_type* object) { m_object.set(object); } virtual ~convert_fn1_t() {} - + virtual Result operator () (Arg1 arg1) { return m_object(arg1); } @@ -484,7 +484,7 @@ class convert_fn2_t : public function_base2 { convert_fn2_t(typename src_type::base_type* object) { m_object.set(object); } virtual ~convert_fn2_t() {} - + virtual Result operator () (Arg1 arg1, Arg2 arg2) { return m_object(arg1, arg2); } diff --git a/rak/partial_queue.h b/rak/partial_queue.h index 193eedc42..491d51ae4 100644 --- a/rak/partial_queue.h +++ b/rak/partial_queue.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/rak/path.h b/rak/path.h index 64daf355a..b47bcd989 100644 --- a/rak/path.h +++ b/rak/path.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -54,7 +54,7 @@ path_expand(const std::string& path) { if (home == NULL) return path; - + return home + path.substr(1); } @@ -75,7 +75,7 @@ strlcpy(char *dest, const char *src, size_t size) { if (n == 0) { if (size != 0) *dest = '\0'; - + while (*src++) ; } diff --git a/rak/priority_queue.h b/rak/priority_queue.h index f4e1ed9c7..f0bd60b7b 100644 --- a/rak/priority_queue.h +++ b/rak/priority_queue.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/rak/priority_queue_default.h b/rak/priority_queue_default.h index a7bba0ceb..f1a6a731d 100644 --- a/rak/priority_queue_default.h +++ b/rak/priority_queue_default.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -129,7 +129,7 @@ priority_queue_erase(priority_queue_default* queue, priority_item* item) { // Clear time before erasing to force it to the top. item->clear_time(); - + if (!queue->erase(item)) throw torrent::internal_error("priority_queue_erase(...) could not find item in queue."); diff --git a/rak/regex.h b/rak/regex.h index 2d0741616..76fa848ef 100644 --- a/rak/regex.h +++ b/rak/regex.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -76,7 +76,7 @@ regex::operator () (const std::string& text) const { paths.push_front(0); for (std::string::const_iterator itrText = ++text.begin(), lastText = text.end(); itrText != lastText; ++itrText) { - + for (std::list::iterator itrPaths = paths.begin(), lastPaths = paths.end(); itrPaths != lastPaths; ) { unsigned int next = *itrPaths + 1; diff --git a/rak/socket_address.h b/rak/socket_address.h index 654cb8908..fd9b77fe7 100644 --- a/rak/socket_address.h +++ b/rak/socket_address.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -188,7 +188,7 @@ class socket_address_inet { const sockaddr* c_sockaddr() const { return reinterpret_cast(&m_sockaddr); } const sockaddr_in* c_sockaddr_inet() const { return &m_sockaddr; } - + socket_address_inet6 to_mapped_address() const; bool operator == (const socket_address_inet& rhs) const; @@ -379,7 +379,7 @@ socket_address::length() const { return sizeof(sockaddr_in6); default: return 0; - } + } } inline void @@ -453,7 +453,7 @@ socket_address_inet::to_mapped_address() const { addr32[1] = 0; addr32[2] = htonl(0xffff); addr32[3] = m_sockaddr.sin_addr.s_addr; - + socket_address_inet6 sa; sa.clear(); sa.set_address(*reinterpret_cast(addr32)); diff --git a/rak/string_manip.h b/rak/string_manip.h index 1a09c3775..b51c11160 100644 --- a/rak/string_manip.h +++ b/rak/string_manip.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -173,7 +173,7 @@ hexchar_to_value(char c) { else if (c >= 'A' && c <= 'F') return 10 + c - 'A'; - + else return 10 + c - 'a'; } @@ -190,7 +190,7 @@ value_to_hexchar(Value v) { return 'A' + v - 0xA; } -template +template OutputIterator copy_escape_html(InputIterator first, InputIterator last, OutputIterator dest) { while (first != last) { @@ -211,7 +211,7 @@ copy_escape_html(InputIterator first, InputIterator last, OutputIterator dest) { return dest; } -template +template OutputIterator copy_escape_html(InputIterator first1, InputIterator last1, OutputIterator first2, OutputIterator last2) { while (first1 != last1) { @@ -260,7 +260,7 @@ copy_escape_html_str(const Sequence& src) { } // Consider support for larger than char type. -template +template OutputIterator transform_hex(InputIterator first, InputIterator last, OutputIterator dest) { while (first != last) { @@ -273,7 +273,7 @@ transform_hex(InputIterator first, InputIterator last, OutputIterator dest) { return dest; } -template +template OutputIterator transform_hex(InputIterator first1, InputIterator last1, OutputIterator first2, OutputIterator last2) { while (first1 != last1) { diff --git a/rak/timer.h b/rak/timer.h index 842a2e533..9be1a6ff7 100644 --- a/rak/timer.h +++ b/rak/timer.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -101,7 +101,7 @@ inline timer timer::current() { timeval t; gettimeofday(&t, 0); - + return timer(t); } diff --git a/rak/unordered_vector.h b/rak/unordered_vector.h index 683eb06b5..8bbea232a 100644 --- a/rak/unordered_vector.h +++ b/rak/unordered_vector.h @@ -5,12 +5,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -45,7 +45,7 @@ template class unordered_vector : private std::vector<_Tp> { public: typedef std::vector<_Tp> Base; - + typedef typename Base::value_type value_type; typedef typename Base::pointer pointer; typedef typename Base::const_pointer const_pointer; @@ -102,7 +102,7 @@ unordered_vector<_Tp>::erase(iterator position) { Base::pop_back(); return position; -} +} } diff --git a/scripts/attributes.m4 b/scripts/attributes.m4 index b121fcdca..3c8a37aea 100644 --- a/scripts/attributes.m4 +++ b/scripts/attributes.m4 @@ -10,7 +10,7 @@ AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ [cc_cv_attribute_constructor=yes], [cc_cv_attribute_constructor=no]) ]) - + if test "x$cc_cv_attribute_constructor" = "xyes"; then AC_DEFINE([SUPPORT_ATTRIBUTE_CONSTRUCTOR], 1, [Define this if the compiler supports the constructor attribute]) $1 @@ -29,7 +29,7 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT], [ [cc_cv_attribute_format=yes], [cc_cv_attribute_format=no]) ]) - + if test "x$cc_cv_attribute_format" = "xyes"; then AC_DEFINE([SUPPORT_ATTRIBUTE_FORMAT], 1, [Define this if the compiler supports the format attribute]) $1 @@ -48,7 +48,7 @@ AC_DEFUN([CC_ATTRIBUTE_INTERNAL], [ [cc_cv_attribute_internal=yes], [cc_cv_attribute_internal=no]) ]) - + if test "x$cc_cv_attribute_internal" = "xyes"; then AC_DEFINE([SUPPORT_ATTRIBUTE_INTERNAL], 1, [Define this if the compiler supports the internal visibility attribute]) $1 @@ -72,7 +72,7 @@ AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ [cc_cv_attribute_visibility=yes], [cc_cv_attribute_visibility=no]) ]) - + CXXFLAGS=$tmp_CXXFLAGS AC_LANG_POP(C++) @@ -97,7 +97,7 @@ AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ [cc_cv_attribute_nonnull=yes], [cc_cv_attribute_nonnull=no]) ]) - + if test "x$cc_cv_attribute_nonnull" = "xyes"; then AC_DEFINE([SUPPORT_ATTRIBUTE_NONNULL], 1, [Define this if the compiler supports the nonnull attribute]) $1 @@ -116,7 +116,7 @@ AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ [cc_cv_attribute_unused=yes], [cc_cv_attribute_unused=no]) ]) - + if test "x$cc_cv_attribute_unused" = "xyes"; then AC_DEFINE([SUPPORT_ATTRIBUTE_UNUSED], 1, [Define this if the compiler supports the unused attribute]) $1 @@ -139,7 +139,7 @@ AC_DEFUN([CC_FUNC_EXPECT], [ [cc_cv_func_expect=yes], [cc_cv_func_expect=no]) ]) - + if test "x$cc_cv_func_expect" = "xyes"; then AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1, [Define this if the compiler supports __builtin_expect() function]) $1 diff --git a/scripts/checks.m4 b/scripts/checks.m4 index b9095cee1..526d1fc97 100644 --- a/scripts/checks.m4 +++ b/scripts/checks.m4 @@ -355,7 +355,7 @@ AC_DEFUN([TORRENT_WITH_FASTCGI], [ elif test "$withval" = "yes"; then CXXFLAGS="$CXXFLAGS" - LIBS="$LIBS -lfcgi" + LIBS="$LIBS -lfcgi" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ FCGX_Init(); ]])],[ @@ -400,7 +400,7 @@ AC_DEFUN([TORRENT_WITH_XMLRPC_C], [ else xmlrpc_cc_prg="$withval" fi - + if eval $xmlrpc_cc_prg --version 2>/dev/null >/dev/null; then CXXFLAGS="$CXXFLAGS `$xmlrpc_cc_prg --cflags server-util`" LIBS="$LIBS `$xmlrpc_cc_prg server-util --libs`" diff --git a/scripts/common.m4 b/scripts/common.m4 index 2f54402e0..8e8ecc1c6 100644 --- a/scripts/common.m4 +++ b/scripts/common.m4 @@ -13,7 +13,7 @@ AC_DEFUN([TORRENT_WITH_SYSROOT], [ AC_MSG_ERROR(The sysroot option must point to a directory, like f.ex "/Developer/SDKs/MacOSX10.4u.sdk".) else AC_MSG_RESULT($withval) - + CXXFLAGS="$CXXFLAGS -isysroot $withval" LDFLAGS="$LDFLAGS -Wl,-syslibroot,$withval" fi diff --git a/test/rpc/command_test.cc b/test/rpc/command_test.cc index 274333d53..8784dfcd8 100644 --- a/test/rpc/command_test.cc +++ b/test/rpc/command_test.cc @@ -31,7 +31,7 @@ CommandTest::test_stack() { last_stack = rpc::command_base::push_stack(args, &stack); CPPUNIT_ASSERT(!command_stack_all_empty()); CPPUNIT_ASSERT(rpc::command_base::stack_begin()->as_value() == 1); - + rpc::command_base::pop_stack(&stack, last_stack); CPPUNIT_ASSERT(command_stack_all_empty()); @@ -44,7 +44,7 @@ CommandTest::test_stack() { CPPUNIT_ASSERT(!command_stack_all_empty()); CPPUNIT_ASSERT(rpc::command_base::current_stack[0].as_value() == 2); CPPUNIT_ASSERT(rpc::command_base::current_stack[1].as_value() == 3); - + rpc::command_base::pop_stack(&stack, last_stack); CPPUNIT_ASSERT(command_stack_all_empty()); } @@ -59,7 +59,7 @@ CommandTest::test_stack_double() { // Test double-stacked. args.push_back(int64_t(1)); - + last_stack_first = rpc::command_base::push_stack(args, &stack_first); CPPUNIT_ASSERT(!command_stack_all_empty()); CPPUNIT_ASSERT(rpc::command_base::current_stack[0].as_value() == 1); @@ -67,17 +67,17 @@ CommandTest::test_stack_double() { args.clear(); args.push_back(int64_t(2)); args.push_back(int64_t(3)); - + last_stack_second = rpc::command_base::push_stack(args, &stack_second); CPPUNIT_ASSERT(!command_stack_all_empty()); - + CPPUNIT_ASSERT(rpc::command_base::current_stack[0].as_value() == 2); CPPUNIT_ASSERT(rpc::command_base::current_stack[1].as_value() == 3); rpc::command_base::pop_stack(&stack_second, last_stack_second); CPPUNIT_ASSERT(!command_stack_all_empty()); CPPUNIT_ASSERT(rpc::command_base::current_stack[0].as_value() == 1); - + rpc::command_base::pop_stack(&stack_first, last_stack_first); CPPUNIT_ASSERT(command_stack_all_empty()); } diff --git a/test/rpc/object_storage_test.cc b/test/rpc/object_storage_test.cc index c58666f07..cffb8df7d 100644 --- a/test/rpc/object_storage_test.cc +++ b/test/rpc/object_storage_test.cc @@ -10,7 +10,7 @@ ObjectStorageTest::test_basics() { rpc::object_storage::iterator itr; CPPUNIT_ASSERT(m_storage.empty()); - + itr = m_storage.insert("test_1", torrent::Object("a"), rpc::object_storage::flag_string_type); CPPUNIT_ASSERT(itr != m_storage.end()); @@ -68,7 +68,7 @@ ObjectStorageTest::test_access() { // CPPUNIT_ASSERT(m_storage.set_c_str_value("value_1", "123").as_value() == 123); // CPPUNIT_ASSERT(m_storage.set_c_str_value("value_1", torrent::raw_string::from_c_str("321")).as_value() == 321); // CPPUNIT_ASSERT(m_storage.set_c_str_value("value_1", torrent::raw_bencode::from_c_str("i567e")).as_value() == 567); - + // ASSERT_CATCH_INPUT_ERROR( { m_storage.set_c_str_value("value_1", "e123"); } ); // Test string from raw and normal, list, etc. diff --git a/test/rpc/test_parse_options.cc b/test/rpc/test_parse_options.cc index 6f7ce289a..bba21919e 100644 --- a/test/rpc/test_parse_options.cc +++ b/test/rpc/test_parse_options.cc @@ -37,7 +37,7 @@ flag_to_int(const std::string& flag) { for (auto f : flag_list) if (f.first == flag) return f.second; - + throw torrent::input_error("unknown flag"); } @@ -86,7 +86,7 @@ TestParseOptions::test_flag_error() { FLAG_ASSERT_ERROR(""); FLAG_ASSERT_ERROR("foo|bar"); FLAG_ASSERT_ERROR("foo|bar|baz"); - + FLAG_ASSERT_ERROR("foo |bar"); FLAG_ASSERT_ERROR("foo | bar| baz"); }