1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-08-23 05:07:52 +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

@ -333,7 +333,7 @@ int main(int argc, char* argv[])
}
} else {
GUI::MessageBox::show(window,
String::formatted("Successfuly deleted \"{}\".", selected_node_path),
String::formatted("Successfully deleted \"{}\".", selected_node_path),
"Deletion completed",
GUI::MessageBox::Type::Information,
GUI::MessageBox::InputType::OK);

View file

@ -233,7 +233,7 @@ void NewProjectDialog::do_create_project()
auto creation_result = project_template->create_project(maybe_project_name.value(), maybe_project_full_path.value());
if (!creation_result.is_error()) {
// Succesfully created, attempt to open the new project
// Successfully created, attempt to open the new project
m_created_project_path = maybe_project_full_path.value();
done(ExecResult::ExecOK);
} else {

View file

@ -42,7 +42,7 @@ void AutoCompleteEngine::set_declarations_of_document(const String& filename, Ve
{
VERIFY(set_declarations_of_document_callback);
// Optimization - Only notify callback if declerations have changed
// Optimization - Only notify callback if declarations have changed
if (auto previous_declarations = m_all_declarations.get(filename); previous_declarations.has_value()) {
if (previous_declarations.value() == declarations)
return;

View file

@ -78,7 +78,7 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>
break;
case InClassName:
if (token.m_type != GUI::GMLToken::Type::LeftCurly) {
// Close empty class and imediately handle our parent's next child
// Close empty class and immediately handle our parent's next child
class_names.take_last();
state = previous_states.take_last();

View file

@ -952,12 +952,12 @@ u32 Emulator::virt$unveil(u32)
u32 Emulator::virt$mprotect(FlatPtr base, size_t size, int prot)
{
round_to_page_size(base, size);
bool has_non_mmaped_region = false;
bool has_non_mmapped_region = false;
mmu().for_regions_in({ 0x23, base }, size, [&](Region* region) {
if (region) {
if (!is<MmapRegion>(*region)) {
has_non_mmaped_region = true;
has_non_mmapped_region = true;
return IterationDecision::Break;
}
auto& mmap_region = *(MmapRegion*)region;
@ -965,7 +965,7 @@ u32 Emulator::virt$mprotect(FlatPtr base, size_t size, int prot)
}
return IterationDecision::Continue;
});
if (has_non_mmaped_region)
if (has_non_mmapped_region)
return -EINVAL;
return 0;

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);

View file

@ -65,7 +65,7 @@ int main()
}
}
{
printf("Testing partial unmaping\n");
printf("Testing partial unmapping\n");
auto* map1 = mmap(nullptr, 2 * PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, 0, 0);
if (map1 == MAP_FAILED) {
perror("mmap 1");

View file

@ -45,7 +45,7 @@ const char* usage = "usage:\n"
"\tbs=<size>\tblocks size (default: 512)\n"
"\tcount=<size>\t<size> blocks to copy (default: 0 (until end-of-file))\n"
"\tseek=<size>\tskip <size> blocks at start of output (default: 0)\n"
"\tskip=<size>\tskip <size> blocks at start of intput (default: 0)\n"
"\tskip=<size>\tskip <size> blocks at start of input (default: 0)\n"
"\tstatus=<level>\tlevel of output (default: default)\n"
"\t\t\tdefault - error messages + final statistics\n"
"\t\t\tnone - just error messages\n"

View file

@ -99,7 +99,7 @@ int main(int argc, char** argv)
const char* path = "/res/fortunes.json";
Core::ArgsParser args_parser;
args_parser.set_general_help("Open a fortune cookie, recieve a free quote for the day!");
args_parser.set_general_help("Open a fortune cookie, receive a free quote for the day!");
args_parser.add_positional_argument(path, "Path to JSON file with quotes (/res/fortunes.json by default)", "path", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);