From 790b6629f63730b5eccdf6ee906c26b5e535a43d Mon Sep 17 00:00:00 2001 From: xavier2k6 <42386382+xavier2k6@users.noreply.github.com> Date: Sat, 17 Aug 2024 17:10:03 +0100 Subject: [PATCH] Fix some typos --- ChangeLog | 2 +- Jamfile | 2 +- bindings/python/Jamfile | 2 +- bindings/python/src/alert.cpp | 2 +- bindings/python/test.py | 2 +- cmake/Modules/LibtorrentMacros.cmake | 2 +- examples/connection_tester.cpp | 2 +- include/libtorrent/aux_/merkle.hpp | 2 +- include/libtorrent/hash_picker.hpp | 2 +- simulation/test_web_seed.cpp | 2 +- src/hash_picker.cpp | 2 +- src/kademlia/routing_table.cpp | 2 +- src/path.cpp | 2 +- src/puff.cpp | 2 +- test/main.cpp | 2 +- test/socks.py | 2 +- test/test_bdecode.cpp | 4 ++-- test/test_dht.cpp | 2 +- test/test_file_storage.cpp | 2 +- test/test_piece_picker.cpp | 2 +- test/test_xml.cpp | 4 ++-- test/utf8_test.txt | 2 +- 22 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3e73bba456..08998c1f538 100644 --- a/ChangeLog +++ b/ChangeLog @@ -170,7 +170,7 @@ 2.0 released * dropped dependency on iconv - * deprecate set_file_hash() in torrent creator, as it's superceded by v2 torrents + * deprecate set_file_hash() in torrent creator, as it's superseded by v2 torrents * deprecate mutable access to info_section in torrent_info * removed deprecated lazy_entry/lazy_bdecode * stats_alert deprecated diff --git a/Jamfile b/Jamfile index fbd4cb6cd4d..88fe743cd18 100644 --- a/Jamfile +++ b/Jamfile @@ -187,7 +187,7 @@ rule linking ( properties * ) else if [ version.version-less $(jam-version) : 1990 0 ] { # the visibility feature was introduced in boost-1.69. This was close to - # when the verisoning scheme changed from year to (low) version numbers. + # when the versioning scheme changed from year to (low) version numbers. # in boost-1.70 result += hidden ; } diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index 0fcf61c2b6d..876458eba35 100644 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -28,7 +28,7 @@ feature.compose on : -fPIC ; feature python-install-path : : free path ; # when not specifying a custom install path, this controls whether to install -# the python module in the system directory or user-specifc directory +# the python module in the system directory or user-specific directory feature python-install-scope : user system : ; # copied from boost 1.63's boost python jamfile diff --git a/bindings/python/src/alert.cpp b/bindings/python/src/alert.cpp index b93b9a39142..e1b6fa0efd4 100644 --- a/bindings/python/src/alert.cpp +++ b/bindings/python/src/alert.cpp @@ -658,7 +658,7 @@ void bind_alert() ; #if TORRENT_ABI_VERSION == 1 - enum_("listen_succeded_alert_socket_type_t") + enum_("listen_succeeded_alert_socket_type_t") .value("tcp", listen_succeeded_alert::socket_type_t::tcp) .value("tcp_ssl", listen_succeeded_alert::socket_type_t::tcp_ssl) .value("udp", listen_succeeded_alert::socket_type_t::udp) diff --git a/bindings/python/test.py b/bindings/python/test.py index 612006ecac5..d1958cccee8 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -238,7 +238,7 @@ def test_piece_deadlines(self): self.setup() self.h.clear_piece_deadlines() - def test_status_last_uploaded_dowloaded(self): + def test_status_last_uploaded_downloaded(self): # we want to check at seconds precision but can't control session # time, wait for next full second to prevent second increment time.sleep(1 - datetime.datetime.now().microsecond / 1000000.0) diff --git a/cmake/Modules/LibtorrentMacros.cmake b/cmake/Modules/LibtorrentMacros.cmake index e3500c7a71e..a49462c4267 100644 --- a/cmake/Modules/LibtorrentMacros.cmake +++ b/cmake/Modules/LibtorrentMacros.cmake @@ -15,7 +15,7 @@ endmacro() # target_optional_compile_definitions( [FEATURE] # NAME DESCRIPTION DEFAULT # [ENABLED [enabled_compile_definitions...]] -# [DISABLED [disabled_compile_defnitions...]] +# [DISABLED [disabled_compile_definitions...]] # ) # NAME, DESCRIPTION and DEFAULT are passed to option() call # if FEATURE is given, they are passed to add_feature_info() diff --git a/examples/connection_tester.cpp b/examples/connection_tester.cpp index 032df0611e9..fdbc73274c2 100644 --- a/examples/connection_tester.cpp +++ b/examples/connection_tester.cpp @@ -78,7 +78,7 @@ void generate_block(span buffer, piece_index_t const piece for (auto& w : buffer) w = fill; } -// in order to circumvent the restricton of only +// in order to circumvent the restriction of only // one connection per IP that most clients implement // all sockets created by this tester are bound to // unique local IPs in the range (127.0.0.1 - 127.255.255.255) diff --git a/include/libtorrent/aux_/merkle.hpp b/include/libtorrent/aux_/merkle.hpp index c30553e4d94..349961dfbe7 100644 --- a/include/libtorrent/aux_/merkle.hpp +++ b/include/libtorrent/aux_/merkle.hpp @@ -124,7 +124,7 @@ namespace libtorrent { // if we're inserting the hash N, the uncle hashes provide proof of it being // valid by containing 0, 1 and two (as marked in the tree above) // Any non-zero hash encountered in target_tree is assumed to be valid, and - // will termiate the validation early, either successful (if there's a + // will terminate the validation early, either successful (if there's a // match) or unsuccessful (if there's a mismatch). TORRENT_EXTRA_EXPORT bool merkle_validate_and_insert_proofs(span target_tree diff --git a/include/libtorrent/hash_picker.hpp b/include/libtorrent/hash_picker.hpp index bb5b10191ae..ed3e95fdb24 100644 --- a/include/libtorrent/hash_picker.hpp +++ b/include/libtorrent/hash_picker.hpp @@ -218,7 +218,7 @@ namespace libtorrent // this is for a future per-block request feature #if 0 - // blocks are only added to this list if there is a time critial block which + // blocks are only added to this list if there is a time critical block which // has been downloaded but we don't have its hash or if the initial request // for the hash was rejected // this block hash will be requested from every peer possible until the hash diff --git a/simulation/test_web_seed.cpp b/simulation/test_web_seed.cpp index d38d2a2d274..b8efac16600 100644 --- a/simulation/test_web_seed.cpp +++ b/simulation/test_web_seed.cpp @@ -576,7 +576,7 @@ TORRENT_TEST(urlseed_timeout) // check for correct handle of unexpected http status response. // with disabled "close_redundant_connections" alive web server connection // may be closed in such manner. -TORRENT_TEST(no_close_redudant_webseed) +TORRENT_TEST(no_close_redundant_webseed) { using namespace lt; diff --git a/src/hash_picker.cpp b/src/hash_picker.cpp index b301c296480..08d15fa4cca 100644 --- a/src/hash_picker.cpp +++ b/src/hash_picker.cpp @@ -62,7 +62,7 @@ bool validate_hash_request(hash_request const& hr, file_storage const& fs) { // limit the size of the base layer to something reasonable // Blocks are requested for an entire piece so this limit - // effectivly caps the piece size we can handle. A limit of 8192 + // effectively caps the piece size we can handle. A limit of 8192 // corresponds to a piece size of 128MB. if (hr.file < file_index_t{0} diff --git a/src/kademlia/routing_table.cpp b/src/kademlia/routing_table.cpp index ff3e659c4f8..e1cd3cb7dfa 100644 --- a/src/kademlia/routing_table.cpp +++ b/src/kademlia/routing_table.cpp @@ -678,7 +678,7 @@ routing_table::add_node_status_t routing_table::add_node_impl(node_entry e) existing->update_rtt(e.rtt); existing->last_queried = e.last_queried; } - // if this was a replacement node it may be elligible for + // if this was a replacement node it may be eligible for // promotion to the live bucket fill_from_replacements(existing_bucket); prune_empty_bucket(); diff --git a/src/path.cpp b/src/path.cpp index 0f19528fac6..1057d34c302 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -714,7 +714,7 @@ namespace { // count number of path elements left in base, and prepend that number of // "../" to target - // base alwaus points to a directory. There's an implied directory + // base always points to a directory. There's an implied directory // separator at the end of it int const num_steps = static_cast(std::count( base.begin(), base.end(), TORRENT_SEPARATOR_CHAR)) + (base.empty() ? 0 : 1); diff --git a/src/puff.cpp b/src/puff.cpp index 14fd66a242b..51100bd3767 100644 --- a/src/puff.cpp +++ b/src/puff.cpp @@ -43,7 +43,7 @@ * - Use pointers instead of long to specify source and * destination sizes to avoid arbitrary 4 GB limits * 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!), - * but leave simple version for readabilty + * but leave simple version for readability * - Make sure invalid distances detected if pointers * are 16 bits * - Fix fixed codes table error diff --git a/test/main.cpp b/test/main.cpp index 6e3411e77ae..de0b2cf1696 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -551,7 +551,7 @@ int EXPORT main(int argc, char const* argv[]) if (!tests_to_run.empty()) { - std::printf("\x1b[1mUNKONWN tests:\x1b[0m\n"); + std::printf("\x1b[1mUNKNOWN tests:\x1b[0m\n"); for (std::set::iterator i = tests_to_run.begin() , end(tests_to_run.end()); i != end; ++i) { diff --git a/test/socks.py b/test/socks.py index 7a294738f68..20dc559e1a6 100755 --- a/test/socks.py +++ b/test/socks.py @@ -106,7 +106,7 @@ def handle(self): sys.stdout.flush() def inner_handle(self): - # IMRPOVEMENT: Report who requests are from in logging + # IMPROVEMENT: Report who requests are from in logging # IMPROVEMENT: Timeout on client debug('Connection - authenticating') version = self.read(1) diff --git a/test/test_bdecode.cpp b/test/test_bdecode.cpp index 4a93f7c6af9..a15fba78bc4 100644 --- a/test/test_bdecode.cpp +++ b/test/test_bdecode.cpp @@ -512,7 +512,7 @@ TORRENT_TEST(item_limit) } // test unexpected EOF -TORRENT_TEST(unepected_eof) +TORRENT_TEST(unexpected_eof) { char b[] = "l2:.."; // expected terminating 'e' @@ -525,7 +525,7 @@ TORRENT_TEST(unepected_eof) } // test unexpected EOF in string length -TORRENT_TEST(unepected_eof2) +TORRENT_TEST(unexpected_eof2) { char b[] = "l2:..0"; // expected ':' delimiter instead of EOF diff --git a/test/test_dht.cpp b/test/test_dht.cpp index 64627e7c1a2..b551dc9c27d 100644 --- a/test/test_dht.cpp +++ b/test/test_dht.cpp @@ -812,7 +812,7 @@ TORRENT_TEST(invalid_message) } } -TORRENT_TEST(node_id_testng) +TORRENT_TEST(node_id_testing) { node_id rnd = generate_secret_id(); TEST_CHECK(verify_secret_id(rnd)); diff --git a/test/test_file_storage.cpp b/test/test_file_storage.cpp index b23759c28fd..c5cfe8e89c1 100644 --- a/test/test_file_storage.cpp +++ b/test/test_file_storage.cpp @@ -1056,7 +1056,7 @@ TORRENT_TEST(file_first_piece_node) // the size of the merkle tree is implied by the size of the file. // 0x500000 / 0x10000 = 80 pieces // a merkle tree must have a power of 2 number of leaves, so that's 128, - // thats 7 layers + // that's 7 layers TEST_EQUAL(first_piece_node(0x10000, 0x500000), 127); TEST_EQUAL(first_piece_node(0x8000, 0x500000), 255); TEST_EQUAL(first_piece_node(0x4000, 0x500000), 511); diff --git a/test/test_piece_picker.cpp b/test/test_piece_picker.cpp index 7b78ba6794b..35c3487ab1f 100644 --- a/test/test_piece_picker.cpp +++ b/test/test_piece_picker.cpp @@ -2394,7 +2394,7 @@ TORRENT_TEST(mark_as_pad_pick_short_last_piece) // there is no block 3 in this piece } -TORRENT_TEST(mark_as_pad_pick_short_last_piece_prefer_contiguos) +TORRENT_TEST(mark_as_pad_pick_short_last_piece_prefer_contiguous) { auto p = std::make_shared( 3 * default_piece_size - default_block_size, default_piece_size); diff --git a/test/test_xml.cpp b/test/test_xml.cpp index 59d1c14f577..d843f8ad88a 100644 --- a/test/test_xml.cpp +++ b/test/test_xml.cpp @@ -443,7 +443,7 @@ TORRENT_TEST(xml_tag_no_attribute_whitespace) test_parse("", "Dxml"); } -TORRENT_TEST(attribute_missing_qoute) +TORRENT_TEST(attribute_missing_quote) { test_parse("foo