diff options
48 files changed, 120 insertions, 120 deletions
diff --git a/AK/Format.cpp b/AK/Format.cpp index a59aae67a0..03d9fab42e 100644 --- a/AK/Format.cpp +++ b/AK/Format.cpp @@ -252,7 +252,7 @@ void FormatBuilder::put_u64( size_t used_by_prefix = 0; if (align == Align::Right && zero_pad) { // We want String::formatted("{:#08x}", 32) to produce '0x00000020' instead of '0x000020'. This - // behaviour differs from both fmtlib and printf, but is more intuitive. + // behavior differs from both fmtlib and printf, but is more intuitive. used_by_prefix = 0; } else { if (is_negative || sign_mode != SignMode::OnlyIfNeeded) diff --git a/AK/HashTable.h b/AK/HashTable.h index 7ce8376b0b..dd40c6906d 100644 --- a/AK/HashTable.h +++ b/AK/HashTable.h @@ -250,11 +250,11 @@ public: } template<typename U = T> - HashSetResult set(U&& value, HashSetExistingEntryBehavior existing_entry_behaviour = HashSetExistingEntryBehavior::Replace) + HashSetResult set(U&& value, HashSetExistingEntryBehavior existing_entry_behavior = HashSetExistingEntryBehavior::Replace) { auto& bucket = lookup_for_writing(value); if (bucket.used) { - if (existing_entry_behaviour == HashSetExistingEntryBehavior::Keep) + if (existing_entry_behavior == HashSetExistingEntryBehavior::Keep) return HashSetResult::KeptExistingEntry; (*bucket.slot()) = forward<U>(value); return HashSetResult::ReplacedExistingEntry; diff --git a/Kernel/Bus/USB/UHCI/UHCIController.cpp b/Kernel/Bus/USB/UHCI/UHCIController.cpp index 532925cdd0..47cc9db9de 100644 --- a/Kernel/Bus/USB/UHCI/UHCIController.cpp +++ b/Kernel/Bus/USB/UHCI/UHCIController.cpp @@ -547,7 +547,7 @@ void UHCIController::get_port_status(Badge<UHCIRootHub>, u8 port, HubStatus& hub void UHCIController::reset_port(u8 port) { // We still have to reset the port manually because UHCI does not automatically enable the port after reset. - // Additionally, the USB 2.0 specification says the SetPortFeature(PORT_ENABLE) request is not specified and that the _ideal_ behaviour is to return a Request Error. + // Additionally, the USB 2.0 specification says the SetPortFeature(PORT_ENABLE) request is not specified and that the _ideal_ behavior is to return a Request Error. // Source: USB 2.0 Specification Section 11.24.2.7.1.2 // This means the hub code cannot rely on using it. diff --git a/Kernel/FileSystem/ext2_fs.h b/Kernel/FileSystem/ext2_fs.h index 2782845cee..2214b37f43 100644 --- a/Kernel/FileSystem/ext2_fs.h +++ b/Kernel/FileSystem/ext2_fs.h @@ -473,7 +473,7 @@ struct ext2_inode_large { #define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */ /* - * Behaviour when detecting errors + * Behavior when detecting errors */ #define EXT2_ERRORS_CONTINUE 1 /* Continue execution */ #define EXT2_ERRORS_RO 2 /* Remount fs read-only */ @@ -501,7 +501,7 @@ struct ext2_super_block { __s16 s_max_mnt_count; /* Maximal mount count */ __u16 s_magic; /* Magic signature */ __u16 s_state; /* File system state */ - __u16 s_errors; /* Behaviour when detecting errors */ + __u16 s_errors; /* Behavior when detecting errors */ __u16 s_minor_rev_level; /* minor revision level */ __u32 s_lastcheck; /* time of last check */ __u32 s_checkinterval; /* max. time between checks */ diff --git a/Tests/AK/TestTrie.cpp b/Tests/AK/TestTrie.cpp index b05bd58fb9..9bcda0d940 100644 --- a/Tests/AK/TestTrie.cpp +++ b/Tests/AK/TestTrie.cpp @@ -9,7 +9,7 @@ #include <AK/StringView.h> #include <AK/Trie.h> -TEST_CASE(normal_behaviour) +TEST_CASE(normal_behavior) { Trie<char, String> dictionary('/', ""); constexpr StringView data[] { "test", "example", "foo", "foobar" }; diff --git a/Userland/Applications/Spreadsheet/ExportDialog.cpp b/Userland/Applications/Spreadsheet/ExportDialog.cpp index 0a80f4a627..52321f7e1c 100644 --- a/Userland/Applications/Spreadsheet/ExportDialog.cpp +++ b/Userland/Applications/Spreadsheet/ExportDialog.cpp @@ -154,17 +154,17 @@ auto CSVExportDialogPage::make_writer() -> Optional<XSV> quote_escape, }; - auto behaviours = Writer::default_behaviours(); + auto behaviors = Writer::default_behaviors(); Vector<String> empty_headers; auto* headers = &empty_headers; if (should_export_headers) { - behaviours = behaviours | Writer::WriterBehaviour::WriteHeaders; + behaviors = behaviors | Writer::WriterBehavior::WriteHeaders; headers = &m_headers; } if (should_quote_all_fields) - behaviours = behaviours | Writer::WriterBehaviour::QuoteAll; + behaviors = behaviors | Writer::WriterBehavior::QuoteAll; // Note that the stream is used only by the ctor. auto stream = Core::OutputFileStream::open(m_temp_output_file_path); @@ -172,7 +172,7 @@ auto CSVExportDialogPage::make_writer() -> Optional<XSV> dbgln("Cannot open {} for writing: {}", m_temp_output_file_path, stream.error()); return {}; } - XSV writer(stream.value(), m_data, traits, *headers, behaviours); + XSV writer(stream.value(), m_data, traits, *headers, behaviors); if (stream.value().has_any_error()) { dbgln("Write error when making preview"); diff --git a/Userland/Applications/Spreadsheet/ImportDialog.cpp b/Userland/Applications/Spreadsheet/ImportDialog.cpp index 5e9962dd18..3c19bbaf27 100644 --- a/Userland/Applications/Spreadsheet/ImportDialog.cpp +++ b/Userland/Applications/Spreadsheet/ImportDialog.cpp @@ -135,16 +135,16 @@ auto CSVImportDialogPage::make_reader() -> Optional<Reader::XSV> quote_escape, }; - auto behaviours = Reader::default_behaviours() | Reader::ParserBehaviour::Lenient; + auto behaviors = Reader::default_behaviors() | Reader::ParserBehavior::Lenient; if (should_read_headers) - behaviours = behaviours | Reader::ParserBehaviour::ReadHeaders; + behaviors = behaviors | Reader::ParserBehavior::ReadHeaders; if (should_trim_leading) - behaviours = behaviours | Reader::ParserBehaviour::TrimLeadingFieldSpaces; + behaviors = behaviors | Reader::ParserBehavior::TrimLeadingFieldSpaces; if (should_trim_trailing) - behaviours = behaviours | Reader::ParserBehaviour::TrimTrailingFieldSpaces; + behaviors = behaviors | Reader::ParserBehavior::TrimTrailingFieldSpaces; - return Reader::XSV(m_csv, move(traits), behaviours); + return Reader::XSV(m_csv, move(traits), behaviors); }; void CSVImportDialogPage::update_preview() diff --git a/Userland/Applications/Spreadsheet/Readers/CSV.h b/Userland/Applications/Spreadsheet/Readers/CSV.h index ae41405452..72283a72e0 100644 --- a/Userland/Applications/Spreadsheet/Readers/CSV.h +++ b/Userland/Applications/Spreadsheet/Readers/CSV.h @@ -14,8 +14,8 @@ namespace Reader { class CSV : public XSV { public: - CSV(StringView source, ParserBehaviour behaviours = default_behaviours()) - : XSV(source, { ",", "\"", ParserTraits::Repeat }, behaviours) + CSV(StringView source, ParserBehavior behaviors = default_behaviors()) + : XSV(source, { ",", "\"", ParserTraits::Repeat }, behaviors) { } }; diff --git a/Userland/Applications/Spreadsheet/Readers/Test/TestXSV.cpp b/Userland/Applications/Spreadsheet/Readers/Test/TestXSV.cpp index 0b2d901015..5dbe2a5966 100644 --- a/Userland/Applications/Spreadsheet/Readers/Test/TestXSV.cpp +++ b/Userland/Applications/Spreadsheet/Readers/Test/TestXSV.cpp @@ -18,7 +18,7 @@ TEST_CASE(should_parse_valid_data) 1, 2, 3 4, 5, 6 """x", y"z, 9)~~~"; - auto csv = Reader::CSV { data, Reader::default_behaviours() | Reader::ParserBehaviour::ReadHeaders | Reader::ParserBehaviour::TrimLeadingFieldSpaces }; + auto csv = Reader::CSV { data, Reader::default_behaviors() | Reader::ParserBehavior::ReadHeaders | Reader::ParserBehavior::TrimLeadingFieldSpaces }; csv.parse(); EXPECT(!csv.has_error()); @@ -32,7 +32,7 @@ TEST_CASE(should_parse_valid_data) 1 , 2, 3 4, "5 " , 6 """x", y"z, 9 )~~~"; - auto csv = Reader::CSV { data, Reader::default_behaviours() | Reader::ParserBehaviour::ReadHeaders | Reader::ParserBehaviour::TrimLeadingFieldSpaces | Reader::ParserBehaviour::TrimTrailingFieldSpaces }; + auto csv = Reader::CSV { data, Reader::default_behaviors() | Reader::ParserBehavior::ReadHeaders | Reader::ParserBehavior::TrimLeadingFieldSpaces | Reader::ParserBehavior::TrimTrailingFieldSpaces }; csv.parse(); EXPECT(!csv.has_error()); @@ -48,7 +48,7 @@ TEST_CASE(should_fail_nicely) { auto data = R"~~~(Foo, Bar, Baz x, y)~~~"; - auto csv = Reader::CSV { data, Reader::default_behaviours() | Reader::ParserBehaviour::ReadHeaders | Reader::ParserBehaviour::TrimLeadingFieldSpaces }; + auto csv = Reader::CSV { data, Reader::default_behaviors() | Reader::ParserBehavior::ReadHeaders | Reader::ParserBehavior::TrimLeadingFieldSpaces }; csv.parse(); EXPECT(csv.has_error()); EXPECT_EQ(csv.error(), Reader::ReadError::NonConformingColumnCount); @@ -57,7 +57,7 @@ TEST_CASE(should_fail_nicely) { auto data = R"~~~(Foo, Bar, Baz x, y, "z)~~~"; - auto csv = Reader::CSV { data, Reader::default_behaviours() | Reader::ParserBehaviour::ReadHeaders | Reader::ParserBehaviour::TrimLeadingFieldSpaces }; + auto csv = Reader::CSV { data, Reader::default_behaviors() | Reader::ParserBehavior::ReadHeaders | Reader::ParserBehavior::TrimLeadingFieldSpaces }; csv.parse(); EXPECT(csv.has_error()); EXPECT_EQ(csv.error(), Reader::ReadError::QuoteFailure); @@ -70,7 +70,7 @@ TEST_CASE(should_iterate_rows) 1, 2, 3 4, 5, 6 """x", y"z, 9)~~~"; - auto csv = Reader::CSV { data, Reader::default_behaviours() | Reader::ParserBehaviour::ReadHeaders | Reader::ParserBehaviour::TrimLeadingFieldSpaces }; + auto csv = Reader::CSV { data, Reader::default_behaviors() | Reader::ParserBehavior::ReadHeaders | Reader::ParserBehavior::TrimLeadingFieldSpaces }; csv.parse(); EXPECT(!csv.has_error()); @@ -92,7 +92,7 @@ BENCHMARK_CASE(fairly_big_data) memcpy(buf.offset_pointer(row * line.length()), line.characters_without_null_termination(), line.length()); } - auto csv = Reader::CSV { (char const*)buf.data(), Reader::default_behaviours() | Reader::ParserBehaviour::ReadHeaders }; + auto csv = Reader::CSV { (char const*)buf.data(), Reader::default_behaviors() | Reader::ParserBehavior::ReadHeaders }; csv.parse(); EXPECT(!csv.has_error()); diff --git a/Userland/Applications/Spreadsheet/Readers/XSV.cpp b/Userland/Applications/Spreadsheet/Readers/XSV.cpp index 9e3b737fd7..9039ee0f99 100644 --- a/Userland/Applications/Spreadsheet/Readers/XSV.cpp +++ b/Userland/Applications/Spreadsheet/Readers/XSV.cpp @@ -9,14 +9,14 @@ namespace Reader { -ParserBehaviour operator&(ParserBehaviour left, ParserBehaviour right) +ParserBehavior operator&(ParserBehavior left, ParserBehavior right) { - return static_cast<ParserBehaviour>(to_underlying(left) & to_underlying(right)); + return static_cast<ParserBehavior>(to_underlying(left) & to_underlying(right)); } -ParserBehaviour operator|(ParserBehaviour left, ParserBehaviour right) +ParserBehavior operator|(ParserBehavior left, ParserBehavior right) { - return static_cast<ParserBehaviour>(to_underlying(left) | to_underlying(right)); + return static_cast<ParserBehavior>(to_underlying(left) | to_underlying(right)); } void XSV::set_error(ReadError error) @@ -46,7 +46,7 @@ Vector<String> XSV::headers() const void XSV::parse_preview() { reset(); - if ((m_behaviours & ParserBehaviour::ReadHeaders) != ParserBehaviour::None) + if ((m_behaviors & ParserBehavior::ReadHeaders) != ParserBehavior::None) read_headers(); while (!has_error() && !m_lexer.is_eof()) { @@ -59,7 +59,7 @@ void XSV::parse_preview() void XSV::parse() { reset(); - if ((m_behaviours & ParserBehaviour::ReadHeaders) != ParserBehaviour::None) + if ((m_behaviors & ParserBehavior::ReadHeaders) != ParserBehavior::None) read_headers(); while (!has_error() && !m_lexer.is_eof()) @@ -103,7 +103,7 @@ Vector<XSV::Field> XSV::read_row(bool header_row) } } - auto is_lenient = (m_behaviours & ParserBehaviour::Lenient) != ParserBehaviour::None; + auto is_lenient = (m_behaviors & ParserBehavior::Lenient) != ParserBehavior::None; if (is_lenient) { if (m_rows.is_empty()) return row; @@ -120,7 +120,7 @@ Vector<XSV::Field> XSV::read_row(bool header_row) row.resize(new_size); } } else { - auto should_read_headers = (m_behaviours & ParserBehaviour::ReadHeaders) != ParserBehaviour::None; + auto should_read_headers = (m_behaviors & ParserBehavior::ReadHeaders) != ParserBehavior::None; if (!header_row && should_read_headers && row.size() != m_names.size()) set_error(ReadError::NonConformingColumnCount); else if (!header_row && !has_explicit_headers() && !m_rows.is_empty() && m_rows.first().size() != row.size()) @@ -132,7 +132,7 @@ Vector<XSV::Field> XSV::read_row(bool header_row) XSV::Field XSV::read_one_field() { - if ((m_behaviours & ParserBehaviour::TrimLeadingFieldSpaces) != ParserBehaviour::None) + if ((m_behaviors & ParserBehavior::TrimLeadingFieldSpaces) != ParserBehavior::None) m_lexer.consume_while(is_any_of(" \t\v")); bool is_quoted = false; @@ -144,7 +144,7 @@ XSV::Field XSV::read_one_field() field = read_one_unquoted_field(); } - if ((m_behaviours & ParserBehaviour::TrimTrailingFieldSpaces) != ParserBehaviour::None) { + if ((m_behaviors & ParserBehavior::TrimTrailingFieldSpaces) != ParserBehavior::None) { m_lexer.consume_while(is_any_of(" \t\v")); if (!is_quoted) { @@ -182,7 +182,7 @@ XSV::Field XSV::read_one_quoted_field() size_t start = m_lexer.tell(), end = start; bool is_copy = false; StringBuilder builder; - auto allow_newlines = (m_behaviours & ParserBehaviour::AllowNewlinesInFields) != ParserBehaviour::None; + auto allow_newlines = (m_behaviors & ParserBehavior::AllowNewlinesInFields) != ParserBehavior::None; for (; !m_lexer.is_eof();) { char ch; @@ -248,7 +248,7 @@ XSV::Field XSV::read_one_quoted_field() XSV::Field XSV::read_one_unquoted_field() { size_t start = m_lexer.tell(), end = start; - bool allow_quote_in_field = (m_behaviours & ParserBehaviour::QuoteOnlyInFieldStart) != ParserBehaviour::None; + bool allow_quote_in_field = (m_behaviors & ParserBehavior::QuoteOnlyInFieldStart) != ParserBehavior::None; for (; !m_lexer.is_eof();) { if (m_lexer.next_is(m_traits.separator.view())) diff --git a/Userland/Applications/Spreadsheet/Readers/XSV.h b/Userland/Applications/Spreadsheet/Readers/XSV.h index adc2e67805..25baaaa3d0 100644 --- a/Userland/Applications/Spreadsheet/Readers/XSV.h +++ b/Userland/Applications/Spreadsheet/Readers/XSV.h @@ -14,7 +14,7 @@ namespace Reader { -enum class ParserBehaviour : u32 { +enum class ParserBehavior : u32 { None = 0, ReadHeaders = 1, AllowNewlinesInFields = ReadHeaders << 1, @@ -27,8 +27,8 @@ enum class ParserBehaviour : u32 { // - updates previous rows with extra columns }; -ParserBehaviour operator&(ParserBehaviour left, ParserBehaviour right); -ParserBehaviour operator|(ParserBehaviour left, ParserBehaviour right); +ParserBehavior operator&(ParserBehavior left, ParserBehavior right); +ParserBehavior operator|(ParserBehavior left, ParserBehavior right); struct ParserTraits { String separator; @@ -52,18 +52,18 @@ enum class ReadError { #undef E }; -constexpr ParserBehaviour default_behaviours() +constexpr ParserBehavior default_behaviors() { - return ParserBehaviour::QuoteOnlyInFieldStart; + return ParserBehavior::QuoteOnlyInFieldStart; } class XSV { public: - XSV(StringView source, ParserTraits traits, ParserBehaviour behaviours = default_behaviours()) + XSV(StringView source, ParserTraits traits, ParserBehavior behaviors = default_behaviors()) : m_source(source) , m_lexer(m_source) , m_traits(traits) - , m_behaviours(behaviours) + , m_behaviors(behaviors) { parse_preview(); } @@ -88,7 +88,7 @@ public: size_t size() const { return m_rows.size(); } Vector<String> headers() const; - [[nodiscard]] bool has_explicit_headers() const { return (static_cast<u32>(m_behaviours) & static_cast<u32>(ParserBehaviour::ReadHeaders)) != 0; } + [[nodiscard]] bool has_explicit_headers() const { return (static_cast<u32>(m_behaviors) & static_cast<u32>(ParserBehavior::ReadHeaders)) != 0; } class Row { public: @@ -207,7 +207,7 @@ private: StringView m_source; GenericLexer m_lexer; ParserTraits m_traits; - ParserBehaviour m_behaviours; + ParserBehavior m_behaviors; Vector<Field> m_names; Vector<Vector<Field>> m_rows; ReadError m_error { ReadError::None }; diff --git a/Userland/Applications/Spreadsheet/Writers/CSV.h b/Userland/Applications/Spreadsheet/Writers/CSV.h index 1b7c7ba511..d7650e760a 100644 --- a/Userland/Applications/Spreadsheet/Writers/CSV.h +++ b/Userland/Applications/Spreadsheet/Writers/CSV.h @@ -15,8 +15,8 @@ namespace Writer { template<typename ContainerType> class CSV : public XSV<ContainerType> { public: - CSV(OutputStream& output, const ContainerType& data, const Vector<StringView>& headers = {}, WriterBehaviour behaviours = default_behaviours()) - : XSV<ContainerType>(output, data, { ",", "\"", WriterTraits::Repeat }, headers, behaviours) + CSV(OutputStream& output, const ContainerType& data, const Vector<StringView>& headers = {}, WriterBehavior behaviors = default_behaviors()) + : XSV<ContainerType>(output, data, { ",", "\"", WriterTraits::Repeat }, headers, behaviors) { } }; diff --git a/Userland/Applications/Spreadsheet/Writers/Test/TestXSVWriter.cpp b/Userland/Applications/Spreadsheet/Writers/Test/TestXSVWriter.cpp index 542c544ea8..fd294d3a0c 100644 --- a/Userland/Applications/Spreadsheet/Writers/Test/TestXSVWriter.cpp +++ b/Userland/Applications/Spreadsheet/Writers/Test/TestXSVWriter.cpp @@ -53,7 +53,7 @@ TEST_CASE(can_write_with_header) EXPECT_EQ(StringView { stream.bytes() }, expected_output); } -TEST_CASE(can_write_with_different_behaviours) +TEST_CASE(can_write_with_different_behaviors) { Vector<Vector<String>> data = { { "Well", "Hello\"", "Friends" }, @@ -63,7 +63,7 @@ TEST_CASE(can_write_with_different_behaviours) auto buffer = ByteBuffer::create_uninitialized(1024).release_value(); OutputMemoryStream stream { buffer }; - Writer::CSV csv(stream, data, { "A", "B\"", "C" }, Writer::WriterBehaviour::QuoteOnlyInFieldStart | Writer::WriterBehaviour::WriteHeaders); + Writer::CSV csv(stream, data, { "A", "B\"", "C" }, Writer::WriterBehavior::QuoteOnlyInFieldStart | Writer::WriterBehavior::WriteHeaders); auto expected_output = R"~(A,B",C Well,Hello",Friends diff --git a/Userland/Applications/Spreadsheet/Writers/XSV.h b/Userland/Applications/Spreadsheet/Writers/XSV.h index b72e35525b..08ce3a0b5c 100644 --- a/Userland/Applications/Spreadsheet/Writers/XSV.h +++ b/Userland/Applications/Spreadsheet/Writers/XSV.h @@ -16,7 +16,7 @@ namespace Writer { -enum class WriterBehaviour : u32 { +enum class WriterBehavior : u32 { None = 0, WriteHeaders = 1, AllowNewlinesInFields = WriteHeaders << 1, @@ -24,14 +24,14 @@ enum class WriterBehaviour : u32 { QuoteAll = WriteHeaders << 3, }; -inline WriterBehaviour operator&(WriterBehaviour left, WriterBehaviour right) +inline WriterBehavior operator&(WriterBehavior left, WriterBehavior right) { - return static_cast<WriterBehaviour>(static_cast<u32>(left) & static_cast<u32>(right)); + return static_cast<WriterBehavior>(static_cast<u32>(left) & static_cast<u32>(right)); } -inline WriterBehaviour operator|(WriterBehaviour left, WriterBehaviour right) +inline WriterBehavior operator|(WriterBehavior left, WriterBehavior right) { - return static_cast<WriterBehaviour>(static_cast<u32>(left) | static_cast<u32>(right)); + return static_cast<WriterBehavior>(static_cast<u32>(left) | static_cast<u32>(right)); } struct WriterTraits { @@ -54,23 +54,23 @@ enum class WriteError { #undef E }; -constexpr WriterBehaviour default_behaviours() +constexpr WriterBehavior default_behaviors() { - return WriterBehaviour::None; + return WriterBehavior::None; } template<typename ContainerType, typename HeaderType = Vector<StringView>> class XSV { public: - XSV(OutputStream& output, const ContainerType& data, const WriterTraits& traits, const HeaderType& headers = {}, WriterBehaviour behaviours = default_behaviours()) + XSV(OutputStream& output, const ContainerType& data, const WriterTraits& traits, const HeaderType& headers = {}, WriterBehavior behaviors = default_behaviors()) : m_data(data) , m_traits(traits) - , m_behaviours(behaviours) + , m_behaviors(behaviors) , m_names(headers) , m_output(output) { if (!headers.is_empty()) - m_behaviours = m_behaviours | WriterBehaviour::WriteHeaders; + m_behaviors = m_behaviors | WriterBehavior::WriteHeaders; generate(); } @@ -101,7 +101,7 @@ private: void generate() { - auto with_headers = (m_behaviours & WriterBehaviour::WriteHeaders) != WriterBehaviour::None; + auto with_headers = (m_behaviors & WriterBehavior::WriteHeaders) != WriterBehavior::None; if (with_headers) { write_row(m_names); if (m_output.write({ "\n", 1 }) != 1) @@ -139,12 +139,12 @@ private: { auto string = String::formatted("{}", FormatIfSupported(entry)); - auto safe_to_write_normally = (m_behaviours & WriterBehaviour::QuoteAll) == WriterBehaviour::None + auto safe_to_write_normally = (m_behaviors & WriterBehavior::QuoteAll) == WriterBehavior::None && !string.contains("\n") && !string.contains(m_traits.separator); if (safe_to_write_normally) { - if ((m_behaviours & WriterBehaviour::QuoteOnlyInFieldStart) == WriterBehaviour::None) + if ((m_behaviors & WriterBehavior::QuoteOnlyInFieldStart) == WriterBehavior::None) safe_to_write_normally = !string.contains(m_traits.quote); else safe_to_write_normally = !string.starts_with(m_traits.quote); @@ -190,7 +190,7 @@ private: const ContainerType& m_data; const WriterTraits& m_traits; - WriterBehaviour m_behaviours; + WriterBehavior m_behaviors; const HeaderType& m_names; WriteError m_error { WriteError::None }; OutputStream& m_output; diff --git a/Userland/Libraries/LibC/scanf.cpp b/Userland/Libraries/LibC/scanf.cpp index cf46014eca..ea88d572c2 100644 --- a/Userland/Libraries/LibC/scanf.cpp +++ b/Userland/Libraries/LibC/scanf.cpp @@ -547,7 +547,7 @@ extern "C" int vsscanf(const char* input, const char* format, va_list ap) case ConversionSpecifier::Invalid: case ConversionSpecifier::Unspecified: default: - // "undefined behaviour", let's be nice and crash. + // "undefined behavior", let's be nice and crash. dbgln("Invalid conversion specifier {} in scanf!", (int)conversion_specifier); VERIFY_NOT_REACHED(); case ConversionSpecifier::Decimal: diff --git a/Userland/Libraries/LibCrypto/BigInt/Algorithms/BitwiseOperations.cpp b/Userland/Libraries/LibCrypto/BigInt/Algorithms/BitwiseOperations.cpp index dd0290fce0..38e4059246 100644 --- a/Userland/Libraries/LibCrypto/BigInt/Algorithms/BitwiseOperations.cpp +++ b/Userland/Libraries/LibCrypto/BigInt/Algorithms/BitwiseOperations.cpp @@ -241,7 +241,7 @@ ALWAYS_INLINE UnsignedBigInteger::Word UnsignedBigIntegerAlgorithms::shift_left_ VERIFY(num_bits <= UnsignedBigInteger::BITS_IN_WORD); u32 result = 0; - // we need to check for "num_bits != 0" since shifting right by 32 is apparently undefined behaviour! + // we need to check for "num_bits != 0" since shifting right by 32 is apparently undefined behavior! if (result_word_index > 0 && num_bits != 0) { result += number.m_words[result_word_index - 1] >> (UnsignedBigInteger::BITS_IN_WORD - num_bits); } diff --git a/Userland/Libraries/LibGL/Tex/Sampler2D.cpp b/Userland/Libraries/LibGL/Tex/Sampler2D.cpp index caf3efc1cb..dbe8a4dd1b 100644 --- a/Userland/Libraries/LibGL/Tex/Sampler2D.cpp +++ b/Userland/Libraries/LibGL/Tex/Sampler2D.cpp @@ -35,7 +35,7 @@ static constexpr float wrap(float value, GLint mode) case GL_REPEAT: return wrap_repeat(value); - // FIXME: These clamp modes actually have slightly different behaviour + // FIXME: These clamp modes actually have slightly different behavior case GL_CLAMP: case GL_CLAMP_TO_BORDER: case GL_CLAMP_TO_EDGE: diff --git a/Userland/Libraries/LibGUI/VimEditingEngine.cpp b/Userland/Libraries/LibGUI/VimEditingEngine.cpp index a3c1e7f1b5..5082a4eb22 100644 --- a/Userland/Libraries/LibGUI/VimEditingEngine.cpp +++ b/Userland/Libraries/LibGUI/VimEditingEngine.cpp @@ -1353,7 +1353,7 @@ void VimEditingEngine::put_after() m_editor->set_cursor({ m_editor->cursor().line(), m_editor->current_line().first_non_whitespace_column() }); } else { // FIXME: If attempting to put on the last column a line, - // the buffer will bne placed on the next line due to the move_one_left/right behaviour. + // the buffer will bne placed on the next line due to the move_one_left/right behavior. move_one_right(); StringBuilder sb = StringBuilder(m_yank_buffer.length() * amount); for (auto i = 0; i < amount; i++) { diff --git a/Userland/Libraries/LibJS/Runtime/Array.cpp b/Userland/Libraries/LibJS/Runtime/Array.cpp index 7d1a82b0a3..9998c912a7 100644 --- a/Userland/Libraries/LibJS/Runtime/Array.cpp +++ b/Userland/Libraries/LibJS/Runtime/Array.cpp @@ -104,7 +104,7 @@ bool Array::set_length(PropertyDescriptor const& property_descriptor) // 15. Let succeeded be ! OrdinaryDefineOwnProperty(A, "length", newLenDesc). // 16. If succeeded is false, return false. // NOTE: Because the length property does not actually exist calling OrdinaryDefineOwnProperty - // will result in unintended behaviour, so instead we only implement here the small subset of + // will result in unintended behavior, so instead we only implement here the small subset of // checks performed inside of it that would have mattered to us: // 10.1.6.3 ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current ), https://tc39.es/ecma262/#sec-validateandapplypropertydescriptor diff --git a/Userland/Libraries/LibJS/Runtime/IteratorOperations.cpp b/Userland/Libraries/LibJS/Runtime/IteratorOperations.cpp index 4a702daedd..afdf4d2f13 100644 --- a/Userland/Libraries/LibJS/Runtime/IteratorOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/IteratorOperations.cpp @@ -115,7 +115,7 @@ void iterator_close(Object& iterator) auto& vm = iterator.vm(); auto& global_object = iterator.global_object(); - // Emulates `completion` behaviour + // Emulates `completion` behavior auto* completion_exception = vm.exception(); vm.clear_exception(); auto unwind_until = vm.unwind_until(); diff --git a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp index 7321180343..1df3e4f973 100644 --- a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp @@ -252,7 +252,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::repeat) if (n == 0) return js_string(vm, String::empty()); - // NOTE: This is an optimization, it is not required by the specification but it produces equivalent behaviour + // NOTE: This is an optimization, it is not required by the specification but it produces equivalent behavior if (string->is_empty()) return js_string(vm, String::empty()); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp index 4170dbbbe1..aaf9ff8025 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp @@ -173,7 +173,7 @@ Optional<ISODate> regulate_iso_date(GlobalObject& global_object, double year, do // 3. If overflow is "reject", then if (overflow == "reject"sv) { // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards. - // This does not change the exposed behaviour as the call to IsValidISODate will immediately check that these values are valid ISO + // This does not change the exposed behavior as the call to IsValidISODate will immediately check that these values are valid ISO // values (for years: -273975 - 273975, for months: 1 - 12, for days: 1 - 31) all of which are subsets of this check. if (!AK::is_within_range<i32>(year) || !AK::is_within_range<u8>(month) || !AK::is_within_range<u8>(day)) { vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainDate); @@ -193,7 +193,7 @@ Optional<ISODate> regulate_iso_date(GlobalObject& global_object, double year, do // 4. If overflow is "constrain", then else if (overflow == "constrain"sv) { // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat this double as normal integer from this point onwards. This - // does not change the exposed behaviour as the parent's call to CreateTemporalDate will immediately check that this value is a valid + // does not change the exposed behavior as the parent's call to CreateTemporalDate will immediately check that this value is a valid // ISO value for years: -273975 - 273975, which is a subset of this check. if (!AK::is_within_range<i32>(year)) { vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainDate); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp index a13789ed0a..3d4032288c 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp @@ -73,7 +73,7 @@ Value PlainDateConstructor::construct(FunctionObject& new_target) return {}; // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards. - // This does not change the exposed behaviour as the call to CreateTemporalDate will immediately check that these values are valid + // This does not change the exposed behavior as the call to CreateTemporalDate will immediately check that these values are valid // ISO values (for years: -273975 - 273975, for months: 1 - 12, for days: 1 - 31) all of which are subsets of this check. if (!AK::is_within_range<i32>(y) || !AK::is_within_range<u8>(m) || !AK::is_within_range<u8>(d)) { vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainDate); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp index 7d0434bd03..59a37dd6f4 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp @@ -103,7 +103,7 @@ Value PlainDateTimeConstructor::construct(FunctionObject& new_target) return {}; // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards. - // This does not change the exposed behaviour as the call to CreateTemporalDateTime will immediately check that these values are valid + // This does not change the exposed behavior as the call to CreateTemporalDateTime will immediately check that these values are valid // ISO values (for years: -273975 - 273975, for months: 1 - 12, for days: 1 - 31, for hours: 0 - 23, for minutes and seconds: 0 - 59, // milliseconds, microseconds, and nanoseconds: 0 - 999) all of which are subsets of this check. if (!AK::is_within_range<i32>(iso_year) || !AK::is_within_range<u8>(iso_month) || !AK::is_within_range<u8>(iso_day) || !AK::is_within_range<u8>(hour) || !AK::is_within_range<u8>(minute) || !AK::is_within_range<u8>(second) || !AK::is_within_range<u16>(millisecond) || !AK::is_within_range<u16>(microsecond) || !AK::is_within_range<u16>(nanosecond)) { diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp index 09648087d4..8401b53409 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp @@ -78,7 +78,7 @@ Value PlainMonthDayConstructor::construct(FunctionObject& new_target) return {}; // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards. - // This does not change the exposed behaviour as the call to CreateTemporalMonthDay will immediately check that these values are valid + // This does not change the exposed behavior as the call to CreateTemporalMonthDay will immediately check that these values are valid // ISO values (for years: -273975 - 273975, for months: 1 - 12, for days: 1 - 31) all of which are subsets of this check. if (!AK::is_within_range<i32>(ref) || !AK::is_within_range<u8>(m) || !AK::is_within_range<u8>(d)) { vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainYearMonth); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp index ec3e039d02..657abe62e4 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp @@ -81,7 +81,7 @@ Value PlainTimeConstructor::construct(FunctionObject& new_target) return {}; // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards. - // This does not change the exposed behaviour as the call to CreateTemporalTime will immediately check that these values are valid + // This does not change the exposed behavior as the call to CreateTemporalTime will immediately check that these values are valid // ISO values (for hours: 0 - 23, for minutes and seconds: 0 - 59, milliseconds, microseconds, and nanoseconds: 0 - 999) all of which // are subsets of this check. if (!AK::is_within_range<u8>(hour) || !AK::is_within_range<u8>(minute) || !AK::is_within_range<u8>(second) || !AK::is_within_range<u16>(millisecond) || !AK::is_within_range<u16>(microsecond) || !AK::is_within_range<u16>(nanosecond)) { diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp index 27819bf250..f15425d2db 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp @@ -44,7 +44,7 @@ Optional<ISOYearMonth> regulate_iso_year_month(GlobalObject& global_object, doub // 3. If overflow is "constrain", then if (overflow == "constrain"sv) { // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat `year` (a double) as normal integer from this point onwards. - // This does not change the exposed behaviour as the subsequent call to CreateTemporalYearMonth will check that its value is a valid ISO + // This does not change the exposed behavior as the subsequent call to CreateTemporalYearMonth will check that its value is a valid ISO // values (for years: -273975 - 273975) which is a subset of this check. // If RegulateISOYearMonth is ever used outside ISOYearMonthFromFields, this may need to be changed. if (!AK::is_within_range<i32>(year)) { @@ -59,7 +59,7 @@ Optional<ISOYearMonth> regulate_iso_year_month(GlobalObject& global_object, doub // 4. If overflow is "reject", then if (overflow == "reject"sv) { // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards. - // This does not change the exposed behaviour as the call to IsValidISOMonth and subsequent call to CreateTemporalDateTime will check + // This does not change the exposed behavior as the call to IsValidISOMonth and subsequent call to CreateTemporalDateTime will check // that these values are valid ISO values (for years: -273975 - 273975, for months: 1 - 12) all of which are subsets of this check. if (!AK::is_within_range<i32>(year) || !AK::is_within_range<u8>(month)) { vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainYearMonth); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp index 3971ff1db6..2900d46de9 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp @@ -78,7 +78,7 @@ Value PlainYearMonthConstructor::construct(FunctionObject& new_target) return {}; // IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards. - // This does not change the exposed behaviour as the call to CreateTemporalYearMonth will immediately check that these values are valid + // This does not change the exposed behavior as the call to CreateTemporalYearMonth will immediately check that these values are valid // ISO values (for years: -273975 - 273975, for months: 1 - 12, for days: 1 - 31) all of which are subsets of this check. if (!AK::is_within_range<i32>(y) || !AK::is_within_range<u8>(m) || !AK::is_within_range<u8>(ref)) { vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainYearMonth); diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.copyWithin.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.copyWithin.js index f4bb921d46..6995d8c6ab 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.copyWithin.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.copyWithin.js @@ -22,7 +22,7 @@ test("length is 2", () => { }); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("Noop", () => { TYPED_ARRAYS.forEach(T => { const array = new T([1, 2]); @@ -37,7 +37,7 @@ describe("normal behaviour", () => { }); }); - test("basic behaviour", () => { + test("basic behavior", () => { TYPED_ARRAYS.forEach(T => { const array = new T([1, 2, 3]); expect(array.copyWithin(1, 2)).toEqual(array); diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.filter.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.filter.js index 824aca9c3a..a242efe3cf 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.filter.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.filter.js @@ -112,7 +112,7 @@ describe("errors", () => { }); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("never calls callback with empty array", () => { TYPED_ARRAYS.forEach(T => { let callbackCalled = 0; diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.find.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.find.js index 149e41e27c..ead1500d0a 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.find.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.find.js @@ -44,7 +44,7 @@ describe("errors", () => { BIGINT_TYPED_ARRAYS.forEach(T => errorTests(T)); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("basic functionality", () => { TYPED_ARRAYS.forEach(T => { const typedArray = new T([1, 2, 3]); diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findIndex.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findIndex.js index 98c61e0dfd..7ecaafb509 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findIndex.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findIndex.js @@ -44,7 +44,7 @@ describe("errors", () => { BIGINT_TYPED_ARRAYS.forEach(T => errorTests(T)); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("basic functionality", () => { TYPED_ARRAYS.forEach(T => { const typedArray = new T([1, 2, 3]); diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLast.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLast.js index 7c7879b401..4f44f13646 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLast.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLast.js @@ -44,7 +44,7 @@ describe("errors", () => { BIGINT_TYPED_ARRAYS.forEach(T => errorTests(T)); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("basic functionality", () => { TYPED_ARRAYS.forEach(T => { const typedArray = new T([1, 2, 3]); diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLastIndex.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLastIndex.js index 54b42b0758..8139487ce8 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLastIndex.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.findLastIndex.js @@ -44,7 +44,7 @@ describe("errors", () => { BIGINT_TYPED_ARRAYS.forEach(T => errorTests(T)); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("basic functionality", () => { TYPED_ARRAYS.forEach(T => { const typedArray = new T([1, 2, 3]); diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.forEach.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.forEach.js index ea2e19c9ac..84dcbed433 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.forEach.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.forEach.js @@ -44,7 +44,7 @@ describe("errors", () => { BIGINT_TYPED_ARRAYS.forEach(T => errorTests(T)); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("never calls callback with empty array", () => { function emptyTest(T) { var callbackCalled = 0; diff --git a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.map.js b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.map.js index 048a3eb06c..da25a55de4 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.map.js +++ b/Userland/Libraries/LibJS/Tests/builtins/TypedArray/TypedArray.prototype.map.js @@ -144,7 +144,7 @@ describe("errors", () => { }); }); -describe("normal behaviour", () => { +describe("normal behavior", () => { test("never calls callback with empty array", () => { TYPED_ARRAYS.forEach(T => { let callbackCalled = 0; diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index dadf73a510..cf12d021c4 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -41,11 +41,11 @@ Configuration Configuration::from_config(const StringView& libname) Configuration configuration; auto config_file = Core::ConfigFile::open_for_lib(libname); - // Read behaviour options. - auto refresh = config_file->read_entry("behaviour", "refresh", "lazy"); - auto operation = config_file->read_entry("behaviour", "operation_mode"); - auto bracketed_paste = config_file->read_bool_entry("behaviour", "bracketed_paste", true); - auto default_text_editor = config_file->read_entry("behaviour", "default_text_editor"); + // Read behavior options. + auto refresh = config_file->read_entry("behavior", "refresh", "lazy"); + auto operation = config_file->read_entry("behavior", "operation_mode"); + auto bracketed_paste = config_file->read_bool_entry("behavior", "bracketed_paste", true); + auto default_text_editor = config_file->read_entry("behavior", "default_text_editor"); Configuration::Flags flags { Configuration::Flags::None }; if (bracketed_paste) @@ -184,7 +184,7 @@ void Editor::set_default_keybinds() Editor::Editor(Configuration configuration) : m_configuration(move(configuration)) { - m_always_refresh = m_configuration.refresh_behaviour == Configuration::RefreshBehaviour::Eager; + m_always_refresh = m_configuration.refresh_behavior == Configuration::RefreshBehavior::Eager; m_pending_chars = {}; get_terminal_size(); m_suggestion_display = make<XtermSuggestionDisplay>(m_num_lines, m_num_columns); @@ -1024,8 +1024,8 @@ void Editor::handle_read_event() ArmedScopeGuard suggestion_cleanup { [this] { cleanup_suggestions(); } }; // Normally ^D. `stty eof \^n` can change it to ^N (or something else), but Serenity doesn't have `stty` yet. - // Process this here since the keybinds might override its behaviour. - // This only applies when the buffer is empty. at any other time, the behaviour should be configurable. + // Process this here since the keybinds might override its behavior. + // This only applies when the buffer is empty. at any other time, the behavior should be configurable. if (code_point == m_termios.c_cc[VEOF] && m_buffer.size() == 0) { finish_edit(); continue; diff --git a/Userland/Libraries/LibLine/Editor.h b/Userland/Libraries/LibLine/Editor.h index bf32b1bbef..c4aa22fab7 100644 --- a/Userland/Libraries/LibLine/Editor.h +++ b/Userland/Libraries/LibLine/Editor.h @@ -45,7 +45,7 @@ struct KeyBinding { }; struct Configuration { - enum RefreshBehaviour { + enum RefreshBehavior { Lazy, Eager, }; @@ -80,7 +80,7 @@ struct Configuration { set(arg); } - void set(RefreshBehaviour refresh) { refresh_behaviour = refresh; } + void set(RefreshBehavior refresh) { refresh_behavior = refresh; } void set(OperationMode mode) { operation_mode = mode; } void set(SignalHandler mode) { m_signal_mode = mode; } void set(const KeyBinding& binding) { keybindings.append(binding); } @@ -92,7 +92,7 @@ struct Configuration { static Configuration from_config(const StringView& libname = "line"); - RefreshBehaviour refresh_behaviour { RefreshBehaviour::Lazy }; + RefreshBehavior refresh_behavior { RefreshBehavior::Lazy }; SignalHandler m_signal_mode { SignalHandler::WithSignalHandlers }; OperationMode operation_mode { OperationMode::Unset }; Vector<KeyBinding> keybindings; diff --git a/Userland/Libraries/LibRegex/RegexOptions.h b/Userland/Libraries/LibRegex/RegexOptions.h index 5ad7cab9fc..24dba533ac 100644 --- a/Userland/Libraries/LibRegex/RegexOptions.h +++ b/Userland/Libraries/LibRegex/RegexOptions.h @@ -34,7 +34,7 @@ enum class AllFlags { Multiline = __Regex_Multiline, // Handle newline characters. Match each line, one by one. SkipTrimEmptyMatches = __Regex_SkipTrimEmptyMatches, // Do not remove empty capture group results. Internal_Stateful = __Regex_Internal_Stateful, // Make global matches match one result at a time, and further match() calls on the same instance continue where the previous one left off. - Internal_BrowserExtended = __Regex_Internal_BrowserExtended, // Only for ECMA262, Enable the behaviours defined in section B.1.4. of the ECMA262 spec. + Internal_BrowserExtended = __Regex_Internal_BrowserExtended, // Only for ECMA262, Enable the behaviors defined in section B.1.4. of the ECMA262 spec. Last = Internal_BrowserExtended, }; diff --git a/Userland/Libraries/LibRegex/RegexParser.h b/Userland/Libraries/LibRegex/RegexParser.h index cc73fa8665..eb66221f21 100644 --- a/Userland/Libraries/LibRegex/RegexParser.h +++ b/Userland/Libraries/LibRegex/RegexParser.h @@ -260,7 +260,7 @@ private: // Most patterns should have no need to ever populate this field. Optional<size_t> m_total_number_of_capturing_parenthesis; - // Keep the Annex B. behaviour behind a flag, the users can enable it by passing the `ECMAScriptFlags::BrowserExtended` flag. + // Keep the Annex B. behavior behind a flag, the users can enable it by passing the `ECMAScriptFlags::BrowserExtended` flag. bool m_should_use_browser_extended_grammar { false }; // ECMA-262 basically requires that we clear the inner captures of a capture group before trying to match it, diff --git a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp index d472da2f96..22e98e2af2 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp @@ -307,7 +307,7 @@ template<typename V, typename T> MakeSigned<T> BytecodeInterpreter::checked_signed_truncate(V value) { if (isnan(value) || isinf(value)) { // "undefined", let's just trap. - m_trap = Trap { "Signed truncation undefined behaviour" }; + m_trap = Trap { "Signed truncation undefined behavior" }; return 0; } @@ -330,7 +330,7 @@ template<typename V, typename T> MakeUnsigned<T> BytecodeInterpreter::checked_unsigned_truncate(V value) { if (isnan(value) || isinf(value)) { // "undefined", let's just trap. - m_trap = Trap { "Unsigned truncation undefined behaviour" }; + m_trap = Trap { "Unsigned truncation undefined behavior" }; return 0; } double truncated; diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Operators.h b/Userland/Libraries/LibWasm/AbstractMachine/Operators.h index 44692d9d23..de06a3cb79 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/Operators.h +++ b/Userland/Libraries/LibWasm/AbstractMachine/Operators.h @@ -317,7 +317,7 @@ struct CheckedTruncate { AK::Result<ResultT, StringView> operator()(Lhs lhs) const { if (isnan(lhs) || isinf(lhs)) // "undefined", let's just trap. - return "Truncation undefined behaviour"sv; + return "Truncation undefined behavior"sv; Lhs truncated; if constexpr (IsSame<float, Lhs>) diff --git a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp index d6615c1b4a..9b62ebcd1e 100644 --- a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp @@ -181,7 +181,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< bool is_activation_event = is<UIEvents::MouseEvent>(*event) && event->type() == HTML::EventNames::click; - if (is_activation_event && target->activation_behaviour) + if (is_activation_event && target->activation_behavior) activation_target = target; // FIXME: Let slottable be target, if target is a slottable and is assigned, and null otherwise. @@ -203,7 +203,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< if (is<Window>(parent) || (is<Node>(parent) && verify_cast<Node>(*target).root().is_shadow_including_inclusive_ancestor_of(verify_cast<Node>(*parent)))) { - if (is_activation_event && event->bubbles() && !activation_target && parent->activation_behaviour) + if (is_activation_event && event->bubbles() && !activation_target && parent->activation_behavior) activation_target = parent; event->append_to_path(*parent, nullptr, related_target, touch_targets, slot_in_closed_tree); @@ -212,7 +212,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< } else { target = *parent; - if (is_activation_event && !activation_target && target->activation_behaviour) + if (is_activation_event && !activation_target && target->activation_behavior) activation_target = target; event->append_to_path(*parent, target, related_target, touch_targets, slot_in_closed_tree); @@ -255,8 +255,8 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< } } - if (activation_target && activation_target->legacy_pre_activation_behaviour) - activation_target->legacy_pre_activation_behaviour(); + if (activation_target && activation_target->legacy_pre_activation_behavior) + activation_target->legacy_pre_activation_behavior(); for (ssize_t i = event->path().size() - 1; i >= 0; --i) { auto& entry = event->path().at(i); @@ -298,11 +298,11 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< if (activation_target) { if (!event->cancelled()) { - // NOTE: Since activation_target is set, it will have activation behaviour. - activation_target->activation_behaviour(event); + // NOTE: Since activation_target is set, it will have activation behavior. + activation_target->activation_behavior(event); } else { - if (activation_target->legacy_cancelled_activation_behaviour) - activation_target->legacy_cancelled_activation_behaviour(); + if (activation_target->legacy_cancelled_activation_behavior) + activation_target->legacy_cancelled_activation_behavior(); } } diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.h b/Userland/Libraries/LibWeb/DOM/EventTarget.h index adbc689489..c85f65ee84 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.h +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.h @@ -47,11 +47,11 @@ public: Vector<EventListenerRegistration>& listeners() { return m_listeners; } const Vector<EventListenerRegistration>& listeners() const { return m_listeners; } - Function<void(const Event&)> activation_behaviour; + Function<void(const Event&)> activation_behavior; // NOTE: These only exist for checkbox and radio input elements. - Function<void()> legacy_pre_activation_behaviour; - Function<void()> legacy_cancelled_activation_behaviour; + Function<void()> legacy_pre_activation_behavior; + Function<void()> legacy_cancelled_activation_behavior; protected: explicit EventTarget(Bindings::ScriptExecutionContext&); diff --git a/Userland/Libraries/LibWeb/HTML/AttributeNames.h b/Userland/Libraries/LibWeb/HTML/AttributeNames.h index 2e69dd3618..e966ac89da 100644 --- a/Userland/Libraries/LibWeb/HTML/AttributeNames.h +++ b/Userland/Libraries/LibWeb/HTML/AttributeNames.h @@ -27,7 +27,7 @@ namespace AttributeNames { __ENUMERATE_HTML_ATTRIBUTE(autoplay) \ __ENUMERATE_HTML_ATTRIBUTE(axis) \ __ENUMERATE_HTML_ATTRIBUTE(background) \ - __ENUMERATE_HTML_ATTRIBUTE(behaviour) \ + __ENUMERATE_HTML_ATTRIBUTE(behavior) \ __ENUMERATE_HTML_ATTRIBUTE(bgcolor) \ __ENUMERATE_HTML_ATTRIBUTE(border) \ __ENUMERATE_HTML_ATTRIBUTE(cellpadding) \ diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMarqueeElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLMarqueeElement.idl index 49ff70654d..ae258866f0 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLMarqueeElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLMarqueeElement.idl @@ -1,6 +1,6 @@ interface HTMLMarqueeElement : HTMLElement { - [Reflect] attribute DOMString behaviour; + [Reflect] attribute DOMString behavior; [Reflect=bgcolor] attribute DOMString bgColor; [Reflect] attribute DOMString direction; [Reflect] attribute DOMString height; diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp index 73aadad1a6..c7e7ebcc2e 100644 --- a/Userland/Shell/AST.cpp +++ b/Userland/Shell/AST.cpp @@ -2080,7 +2080,7 @@ RefPtr<Value> MatchExpr::run(RefPtr<Shell> shell) } else { auto list = option.run(shell); option.for_each_entry(shell, [&](auto&& value) { - pattern.extend(value->resolve_as_list(nullptr)); // Note: 'nullptr' incurs special behaviour, + pattern.extend(value->resolve_as_list(nullptr)); // Note: 'nullptr' incurs special behavior, // asking the node for a 'raw' value. return IterationDecision::Continue; }); diff --git a/Userland/Utilities/grep.cpp b/Userland/Utilities/grep.cpp index 113cd6cbb7..5e352053a5 100644 --- a/Userland/Utilities/grep.cpp +++ b/Userland/Utilities/grep.cpp @@ -110,7 +110,7 @@ int main(int argc, char** argv) args_parser.add_positional_argument(files, "File(s) to process", "file", Core::ArgsParser::Required::No); args_parser.parse(argc, argv); - // mock grep behaviour: if -e is omitted, use first positional argument as pattern + // mock grep behavior: if -e is omitted, use first positional argument as pattern if (pattern == nullptr && files.size()) pattern = files.take_first(); |