1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:57:35 +00:00

Everywhere: Fix a bunch of typos

This commit is contained in:
Linus Groh 2021-04-18 10:30:03 +02:00
parent cebd3f740b
commit 2b0c361d04
30 changed files with 42 additions and 42 deletions

View file

@ -85,8 +85,8 @@ public:
void set_timestamp(time_t timestamp) { VERIFY(String::formatted("{:o}", timestamp).copy_characters_to_buffer(m_timestamp, sizeof(m_timestamp))); }
void set_type_flag(TarFileType type) { m_type_flag = static_cast<char>(type); }
void set_link_name(const String& link_name) { VERIFY(link_name.copy_characters_to_buffer(m_link_name, sizeof(m_link_name))); }
void set_magic(const char* magic) { memcpy(m_magic, magic, sizeof(m_magic)); } // magic doesnt necessarily include a null byte
void set_version(const char* version) { memcpy(m_version, version, sizeof(m_version)); } // version doesnt necessarily include a null byte
void set_magic(const char* magic) { memcpy(m_magic, magic, sizeof(m_magic)); } // magic doesn't necessarily include a null byte
void set_version(const char* version) { memcpy(m_version, version, sizeof(m_version)); } // version doesn't necessarily include a null byte
void set_owner_name(const String& owner_name) { VERIFY(owner_name.copy_characters_to_buffer(m_owner_name, sizeof(m_owner_name))); }
void set_group_name(const String& group_name) { VERIFY(group_name.copy_characters_to_buffer(m_group_name, sizeof(m_group_name))); }
void set_major(int major) { VERIFY(String::formatted("{:o}", major).copy_characters_to_buffer(m_major, sizeof(m_major))); }

View file

@ -131,7 +131,7 @@ bool TarInputStream::valid() const
|| (header_magic == posix1_tar_magic && header_version == posix1_tar_version)))
return false;
// POSIX.1-1988 tar does not have magic numbers, so we also neet to verify the header checksum.
// POSIX.1-1988 tar does not have magic numbers, so we also need to verify the header checksum.
return header().checksum() == header().expected_checksum();
}

View file

@ -130,7 +130,7 @@ struct [[gnu::packed]] PtraceRegisters {
};
};
// These may not be used, unless we go back into compatability mode
// These may not be used, unless we go back into compatibility mode
u32 cs;
u32 ss;
u32 ds;

View file

@ -574,7 +574,7 @@ size_t DeflateCompressor::compare_match_candidate(size_t start, size_t candidate
{
VERIFY(previous_match_length < maximum_match_length);
// We firstly check that the match is at least (prev_match_length + 1) long, we check backwards as theres a higher chance the end mismatches
// We firstly check that the match is at least (prev_match_length + 1) long, we check backwards as there's a higher chance the end mismatches
for (ssize_t i = previous_match_length; i >= 0; i--) {
if (m_rolling_window[start + i] != m_rolling_window[candidate + i])
return 0;
@ -597,7 +597,7 @@ size_t DeflateCompressor::find_back_match(size_t start, u16 hash, size_t previou
if (previous_match_length == 0)
previous_match_length = min_match_length - 1; // we only care about matches that are at least min_match_length long
if (previous_match_length >= maximum_match_length)
return 0; // we cant improve a maximum length match
return 0; // we can't improve a maximum length match
if (previous_match_length >= m_compression_constants.max_lazy_length)
return 0; // the previous match is already pretty, we shouldn't waste another full search
if (previous_match_length >= m_compression_constants.good_match_length)
@ -627,7 +627,7 @@ size_t DeflateCompressor::find_back_match(size_t start, u16 hash, size_t previou
candidate = m_hash_prev[candidate % window_size];
}
if (!match_found)
return 0; // we didnt find any matches
return 0; // we didn't find any matches
return previous_match_length; // we found matches, but they were at most previous_match_length long
}
@ -1040,7 +1040,7 @@ void DeflateCompressor::flush()
auto fixed_huffman_size = fixed_block_length();
auto dynamic_huffman_size = dynamic_block_length(dynamic_literal_bit_lengths, dynamic_distance_bit_lengths, code_lengths_bit_lengths, code_lengths_frequencies, code_lengths_count);
// If the compression somehow didnt reduce the size enough, just write out the block uncompressed as it allows for much faster decompression
// If the compression somehow didn't reduce the size enough, just write out the block uncompressed as it allows for much faster decompression
if (uncompressed_size <= min(fixed_huffman_size, dynamic_huffman_size)) {
write_uncompressed();
} else if (fixed_huffman_size <= dynamic_huffman_size) { // If the fixed and dynamic huffman codes come out the same size, prefer the fixed version, as it takes less time to decode

View file

@ -55,7 +55,7 @@ Optional<Zlib> Zlib::try_create(ReadonlyBytes data)
return {}; // we dont support pre-defined dictionaries
if ((compression_info * 256 + flags) % 31 != 0)
return {}; // error correction code doesnt match
return {}; // error correction code doesn't match
zlib.m_data_bytes = data.slice(2, data.size() - 2 - 4);
return zlib;

View file

@ -63,7 +63,7 @@ ByteBuffer Reader::decompress_coredump(const ReadonlyBytes& raw_coredump)
return ByteBuffer::copy(raw_coredump); // handle old format core dumps (uncompressed)
auto decompressed_coredump = Compress::GzipDecompressor::decompress_all(raw_coredump);
if (!decompressed_coredump.has_value())
return ByteBuffer::copy(raw_coredump); // if we didnt manage to decompress it, try and parse it as decompressed core dump
return ByteBuffer::copy(raw_coredump); // if we didn't manage to decompress it, try and parse it as decompressed core dump
return decompressed_coredump.value();
}

View file

@ -577,7 +577,7 @@ void TextEditor::paint_event(PaintEvent& event)
if (span.range.end().line() > line_index || span.range.end().column() >= start_of_visual_line + visual_line_text.length()) {
if (visual_line_text.length() == 0) {
// subtracting 1 would wrap around
// scince there is nothing to draw here just move on
// since there is nothing to draw here just move on
break;
}
span_end = visual_line_text.length() - 1;

View file

@ -897,7 +897,7 @@ public:
if (imported_address.has_value())
rules.append(CSS::CSSImportRule::create(m_context.complete_url(imported_address.value())));
// FIXME: We ignore possilbe media query list
// FIXME: We ignore possible media query list
while (peek() && peek() != ';')
consume_one();

View file

@ -43,7 +43,7 @@ afterInitialPageLoad(() => {
expect(head.compareDocumentPosition(head)).toBe(0);
// FIXME: Can be uncommented once the IDL parser correctly implements nullable paramaters.
// FIXME: Can be uncommented once the IDL parser correctly implements nullable parameters.
// expect(head.compareDocumentPosition(null) & Node.DOCUMENT_POSITION_DISCONNECTED | Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC).
// toBe(Node.DOCUMENT_POSITION_DISCONNECTED | Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC);