Skip to content

Commit

Permalink
Everywhere: Fix more typos
Browse files Browse the repository at this point in the history
  • Loading branch information
linusg authored and awesomekling committed Oct 3, 2020
1 parent 4e86c34 commit bcfc6f0
Show file tree
Hide file tree
Showing 57 changed files with 108 additions and 108 deletions.
2 changes: 1 addition & 1 deletion AK/Bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class Bitmap {

// The function will return the next range of unset bits starting from the
// @from value.
// @from: the postition from which the search starts. The var will be
// @from: the position from which the search starts. The var will be
// changed and new value is the offset of the found block.
// @min_length: minimum size of the range which will be returned.
// @max_length: maximum size of the range which will be returned.
Expand Down
2 changes: 1 addition & 1 deletion AK/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace AK {

class InputStream : public virtual AK::Detail::Stream {
public:
// Reads at least one byte unless none are requested or none are avaliable. Does nothing
// Reads at least one byte unless none are requested or none are available. Does nothing
// and returns zero if there is already an error.
virtual size_t read(Bytes) = 0;

Expand Down
4 changes: 2 additions & 2 deletions AK/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ bool String::equals_ignoring_case(const StringView& other) const
return StringUtils::equals_ignoring_case(view(), other);
}

int String::replace(const String& needle, const String& replacement, bool all_occurences)
int String::replace(const String& needle, const String& replacement, bool all_occurrences)
{
if (is_empty())
return 0;
Expand All @@ -316,7 +316,7 @@ int String::replace(const String& needle, const String& replacement, bool all_oc

pos = ptr - characters();
positions.append(pos);
if (!all_occurences)
if (!all_occurrences)
break;

start = pos + 1;
Expand Down
2 changes: 1 addition & 1 deletion AK/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class String {

StringView view() const;

int replace(const String& needle, const String& replacement, bool all_occurences = false);
int replace(const String& needle, const String& replacement, bool all_occurrences = false);

template<typename T, typename... Rest>
bool is_one_of(const T& string, Rest... rest) const
Expand Down
4 changes: 2 additions & 2 deletions AK/TestSuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ void TestSuite::main(const String& suite_name, int argc, char** argv)

args_parser.add_option(do_tests_only, "Only run tests.", "tests", 0);
args_parser.add_option(do_benchmarks_only, "Only run benchmarks.", "bench", 0);
args_parser.add_option(do_list_cases, "List avaliable test cases.", "list", 0);
args_parser.add_option(do_list_cases, "List available test cases.", "list", 0);
args_parser.add_positional_argument(search_string, "Only run matching cases.", "pattern", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);

const auto& matching_tests = find_cases(search_string, !do_benchmarks_only, !do_tests_only);

if (do_list_cases) {
out() << "Avaliable cases for " << suite_name << ":";
out() << "Available cases for " << suite_name << ":";
for (const auto& test : matching_tests) {
out() << " " << test.name();
}
Expand Down
2 changes: 1 addition & 1 deletion AK/Tests/TestBitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ TEST_CASE(set_range)
bitmap.set_range(48, 32, true);
bitmap.set_range(94, 39, true);
bitmap.set_range(190, 71, true);
bitmap.set_range(190 + 71 - 7, 21, false); // slighly overlapping clear
bitmap.set_range(190 + 71 - 7, 21, false); // slightly overlapping clear
for (size_t i = 0; i < bitmap.size(); i++) {
bool should_be_set = (i >= 48 && i < 48 + 32)
|| (i >= 94 && i < 94 + 39)
Expand Down
2 changes: 1 addition & 1 deletion Applications/Calculator/Keypad.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Keypad final {
String to_string() const;

private:
// Internal representation ofthe current decimal value.
// Internal representation of the current decimal value.
bool m_negative { false };
long m_int_value { 0 };
long m_frac_value { 0 };
Expand Down
4 changes: 2 additions & 2 deletions Applications/Debugger/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ static bool handle_breakpoint_command(const String& command)

bool success = g_debug_session->insert_breakpoint(reinterpret_cast<void*>(breakpoint_address));
if (!success) {
fprintf(stderr, "coult not insert breakpoint at: %08x\n", breakpoint_address);
fprintf(stderr, "could not insert breakpoint at: %08x\n", breakpoint_address);
return false;
}
printf("breakpoint insterted at: %08x\n", breakpoint_address);
printf("breakpoint inserted at: %08x\n", breakpoint_address);
return true;
}

Expand Down
8 changes: 4 additions & 4 deletions Applications/FileManager/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
auto left = config->read_num_entry("Window", "Left", 150);
auto top = config->read_num_entry("Window", "Top", 75);
auto width = config->read_num_entry("Window", "Width", 640);
auto heigth = config->read_num_entry("Window", "Heigth", 480);
window->set_rect({ left, top, width, heigth });
auto height = config->read_num_entry("Window", "Height", 480);
window->set_rect({ left, top, width, height });

auto& widget = window->set_main_widget<GUI::Widget>();
widget.set_layout<GUI::VerticalBoxLayout>();
Expand Down Expand Up @@ -683,7 +683,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio

window->show();

// Read direcory read mode from config.
// Read directory read mode from config.
auto dir_view_mode = config->read_entry("DirectoryView", "ViewMode", "Icon");

if (dir_view_mode.contains("Table")) {
Expand All @@ -702,7 +702,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
config->write_num_entry("Window", "Left", window->x());
config->write_num_entry("Window", "Top", window->y());
config->write_num_entry("Window", "Width", window->width());
config->write_num_entry("Window", "Heigth", window->height());
config->write_num_entry("Window", "Height", window->height());
config->sync();

return GUI::Window::CloseRequestDecision::Close;
Expand Down
4 changes: 2 additions & 2 deletions Base/etc/services
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pop3s 995/tcp # POP-3 over SSL
#> providing services to unknown callers, a service contact port is
#> defined. This list specifies the port used by the server process as its
#> contact port. While the IANA can not control uses of these ports it
#> does register or list uses of these ports as a convienence to the
#> does register or list uses of these ports as a convenience to the
#> community.
#
socks 1080/tcp # socks proxy server
Expand Down Expand Up @@ -392,7 +392,7 @@ afs3-vlserver 7003/tcp # volume location database
afs3-vlserver 7003/udp
afs3-kaserver 7004/tcp # AFS/Kerberos authentication
afs3-kaserver 7004/udp
afs3-volser 7005/tcp # volume managment server
afs3-volser 7005/tcp # volume management server
afs3-volser 7005/udp
afs3-errors 7006/tcp # error interpretation service
afs3-errors 7006/udp
Expand Down
2 changes: 1 addition & 1 deletion Base/home/anon/.config/FileManager.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ViewMode=Icon
Left=150
Top=75
Width=640
Heigth=480
Height=480
2 changes: 1 addition & 1 deletion Base/res/html/misc/acid2.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* picture setup */
#top { margin: 100em 3em 0; padding: 2em 0 0 .5em; text-align: left; font: 2em/24px sans-serif; color: navy; white-space: pre; } /* "Hello World!" text */
.picture { position: relative; border: 1em solid transparent; margin: 0 0 100em 3em; } /* containing block for face */
.picture { background: red; } /* overriden by preferred stylesheet below */
.picture { background: red; } /* overridden by preferred stylesheet below */

/* top line of face (scalp): fixed positioning and min/max height/width */
.picture p { position: fixed; margin: 0; padding: 0; border: 0; top: 9em; left: 11em; width: 140%; max-width: 4em; height: 8px; min-height: 1em; max-height: 2mm; /* min-height overrides max-height, see 10.7 */ background: black; border-bottom: 0.5em yellow solid; }
Expand Down
4 changes: 2 additions & 2 deletions Base/res/html/misc/borders.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#three-px-solid-blue {
border: 3px solid blue;
}
#foo-but-actually-resetted {
#foo-but-actually-reset {
border-top-color: red;
border-right-color: lime;
border-bottom-color: blue;
Expand Down Expand Up @@ -132,7 +132,7 @@
<div id="resetting">resetting</div>
<div id="three-px-solid-blue-separate">three px solid blue separate</div>
<div id="three-px-solid-blue">three px solid blue</div>
<div id="foo-but-actually-resetted">foo but actually resetted</div>
<div id="foo-but-actually-reset">foo but actually reset</div>
<div id="double-width">double width</div>
<div id="double-style">double style</div>
<div id="double-color">double color</div>
Expand Down
2 changes: 1 addition & 1 deletion Base/res/js/Spreadsheet/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ reduce.__documentation = JSON.stringify({
"to the `accumulator`\n The `reduction function` should be a function of arity 2, taking " +
"first the accumulator, then the current value, and returning the new accumulator value\n\n" +
"Please keep in mind that this function respects the cell type, and can yield non-numeric " +
"values to the `curent value`.",
"values to the `current value`.",
examples: {
'reduce((acc, x) => acc * x, 1, range("A0", "A5"))':
"Calculate the product of all values in the range A0:A5",
Expand Down
6 changes: 3 additions & 3 deletions Base/usr/share/man/man1/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ The expression can take any of the following forms:

### File permission checks

* `-r <file>` whether the curent user has read access to the file
* `-w <file>` whether the curent user has write access to the file
* `-x <file>` whether the curent user has execute access to the file
* `-r <file>` whether the current user has read access to the file
* `-w <file>` whether the current user has write access to the file
* `-x <file>` whether the current user has execute access to the file
* `-e <file>` whether the file exists


Expand Down
2 changes: 1 addition & 1 deletion Base/usr/share/man/man1/xargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ xargs [options...] [command [initial-arguments...]]

`xargs` reads items from a stream, delimited by some blank character (`delimiter`), and executes the `command` as many times as there are items, with any processed `initial-arguments`, possibly followed by a number of items read from the input.

If a `placeholder` is explicitly specified, the `max-lines` limit is set to 1, and each argument in `initial-arguments` is processed by replacing any occurence of the `placeholder` with the input item, and treating the entire resulting value as _one_ argument.
If a `placeholder` is explicitly specified, the `max-lines` limit is set to 1, and each argument in `initial-arguments` is processed by replacing any occurrence of the `placeholder` with the input item, and treating the entire resulting value as _one_ argument.

It is to be noted that `command` is also subject to substitution in this mode.

Expand Down
2 changes: 1 addition & 1 deletion Base/usr/share/man/man2/mount.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mounted file system.

If `MS_BIND` is specified in `flags`, `fs_type` is ignored and a bind mount is
performed instead. In this case, the file or directory specified by `source_fd`
is overlayed over `target` — the target appears to be replaced by a copy of the
is overlaid over `target` — the target appears to be replaced by a copy of the
source. This can be used as an alternative to symlinks or hardlinks.

Each bind mount has its own set of flags, independent of the others or the
Expand Down
2 changes: 1 addition & 1 deletion Base/usr/share/man/man2/pipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ writes some data to the pipe which the parent reads:
```c++
#include <AK/Assertions.h>
#include <stdio.h>
#incldue <unistd.h>
#include <unistd.h>

int main()
{
Expand Down
4 changes: 2 additions & 2 deletions Base/usr/share/man/man5/Shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Any sequence of _Double Quoted String Part_ tokens:
* Escaped sequences

##### Variable Reference
Any sequence of _Identifier_ characters, or a _Special Variable_ follwing a `$`
Any sequence of _Identifier_ characters, or a _Special Variable_ following a `$`

##### Evaluate expression
Any expression following a `$` that is not a variable reference:
Expand Down Expand Up @@ -331,7 +331,7 @@ list_expression :: ' '* expression (' '+ list_expression)?
expression :: evaluate expression?
| string_composite expression?
| comment expession?
| comment expression?
| '(' list_expression ')' expression?
evaluate :: '$' '(' pipe_sequence ')'
Expand Down
2 changes: 1 addition & 1 deletion Base/usr/share/man/man8/useradd.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This program must be run as root.
## Files

* `/etc/passwd` - new user information (such as UID and GID) is appended to this file.
* `/home/` - user home directroy is created here if the `-m` flag is specified.
* `/home/` - user home directory is created here if the `-m` flag is specified.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion Base/usr/share/man/man8/userdel.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This program must be run as root.
## Files

* `/etc/passwd` - user information (such as UID and GID) in this file is deleted.
* `/home/` - user home directroy is deleted if the `-r` flag is specified.
* `/home/` - user home directory is deleted if the `-r` flag is specified.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion Demos/DynamicLink/LinkDemo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ int main(int argc, char** argv, char** envp)

printf("I think I called my lib function!\n");

// Test getting a method that takes and returns arugments now
// Test getting a method that takes and returns arguments now
const char* (*other_func)(int) = (const char* (*)(int))dlsym(handle, "other_lib_function");

printf("Found other lib function address %p\n", other_func);
Expand Down
4 changes: 2 additions & 2 deletions DevTools/HackStudio/Debugger/Debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void Debugger::on_breakpoint_change(const String& file, size_t line, BreakpointC
if (!address.has_value()) {
dbg() << "Warning: couldn't get instruction address from source";
// TODO: Currently, the GUI will indicate that a breakpoint was inserted/removed at this line,
// regardless of whether we actually succeeded to insert it. (For example a breakpoint on a comment, or an include statemanet).
// regardless of whether we actually succeeded to insert it. (For example a breakpoint on a comment, or an include statement).
// We should indicate failure via a return value from this function, and not update the breakpoint GUI if we fail.
return;
}
Expand Down Expand Up @@ -180,7 +180,7 @@ int Debugger::debugger_loop()
do_step_over(regs);
return Debug::DebugSession::DebugDecision::Continue;
case DebuggerAction::Exit:
// NOTE: Is detaching from the debugee the best thing to do here?
// NOTE: Is detaching from the debuggee the best thing to do here?
// We could display a dialog in the UI, remind the user that there is
// a live debugged process, and ask whether they want to terminate/detach.
dbg() << "Debugger exiting";
Expand Down
2 changes: 1 addition & 1 deletion DevTools/HackStudio/Git/DiffViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void DiffViewer::setup_properties()

Vector<String> DiffViewer::split_to_lines(const String& text)
{
// NOTE: This is slightly different thatn text.split('\n')
// NOTE: This is slightly different than text.split('\n')
Vector<String> lines;
size_t next_line_start_index = 0;
for (size_t i = 0; i < text.length(); ++i) {
Expand Down
2 changes: 1 addition & 1 deletion DevTools/Inspector/RemoteObjectPropertyModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ GUI::Variant RemoteObjectPropertyModel::data(const GUI::ModelIndex& index, GUI::
if (data.is_array())
return String::format("<Array with %d element%s", data.as_array().size(), data.as_array().size() == 1 ? ">" : "s>");
if (data.is_object())
return String::format("<Object with %d entrie%s", data.as_object().size(), data.as_object().size() == 1 ? ">" : "s>");
return String::format("<Object with %d entr%s", data.as_object().size(), data.as_object().size() == 1 ? "y>" : "ies>");
return data;
}
}
Expand Down
2 changes: 1 addition & 1 deletion DevTools/UserspaceEmulator/Emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ void signal_trampoline_dummy(void)
// then calls the signal handler. We do this because, when interrupting a
// blocking syscall, that syscall may return some special error code in eax;
// This error code would likely be overwritten by the signal handler, so it's
// neccessary to preserve it here.
// necessary to preserve it here.
asm(
".intel_syntax noprefix\n"
"asm_signal_trampoline:\n"
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CodingStyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ UniqueObject& my_unique_object(); // Free function.
### Comments
[](#comments-sentences) Make comments look like sentences by starting with a capital letter and ending with a period (punctation). One exception may be end of line comments like this `if (x == y) // false for NaN`.
[](#comments-sentences) Make comments look like sentences by starting with a capital letter and ending with a period (punctuation). One exception may be end of line comments like this `if (x == y) // false for NaN`.
[](#comments-fixme) Use FIXME: (without attribution) to denote items that need to be addressed in the future.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/NotesOnWSL.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ To run SerenityOS in a WHPX-enabled QEMU VM:
WSL2 filesystem performance for IO heavy tasks (such as compiling a large C++ project) on the host Windows filesystem is terrible.
This is because WSL2 runs as a Hyper-V virtual machine and uses the 9P file system protocol to access host windows files, over Hyper-V sockets.

For a more in depth explaination of the technical limitations of their approach, see [this issue on the WSL github](https://github.com/microsoft/WSL/issues/4197#issuecomment-604592340)
For a more in depth explanation of the technical limitations of their approach, see [this issue on the WSL github](https://github.com/microsoft/WSL/issues/4197#issuecomment-604592340)

The recommendation from the Microsoft team on that issue is:

Expand Down
8 changes: 4 additions & 4 deletions Games/Chess/ChessWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,18 @@ void ChessWidget::mouseup_event(GUI::MouseEvent& event)
case Chess::Board::Result::SeventyFiveMoveRule:
msg = "Draw by 75 move rule.";
break;
case Chess::Board::Result::ThreeFoldRepitition:
case Chess::Board::Result::ThreeFoldRepetition:
update();
if (GUI::MessageBox::show(window(), "The same board state has repeated three times. Claim Draw?", "Claim Draw?",
GUI::MessageBox::Type::Information, GUI::MessageBox::InputType::YesNo)
== GUI::Dialog::ExecYes) {
msg = "Draw by threefold repitition.";
msg = "Draw by threefold repetition.";
} else {
over = false;
}
break;
case Chess::Board::Result::FiveFoldRepitition:
msg = "Draw by fivefold repitition.";
case Chess::Board::Result::FiveFoldRepetition:
msg = "Draw by fivefold repetition.";
break;
case Chess::Board::Result::InsufficientMaterial:
msg = "Draw by insufficient material.";
Expand Down
2 changes: 1 addition & 1 deletion Kernel/API/Syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ struct SC_setkeymap_params {
struct SC_create_thread_params {
unsigned int m_detach_state = 0; // JOINABLE or DETACHED
int m_schedule_priority = 30; // THREAD_PRIORITY_NORMAL
// FIXME: Implment guard pages in create_thread (unreadable pages at "overflow" end of stack)
// FIXME: Implement guard pages in create_thread (unreadable pages at "overflow" end of stack)
// "If an implementation rounds up the value of guardsize to a multiple of {PAGESIZE},
// a call to pthread_attr_getguardsize() specifying attr shall store in the guardsize
// parameter the guard size specified by the previous pthread_attr_setguardsize() function call"
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Arch/i386/CPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ void Processor::initialize_context_switching(Thread& initial_thread)
m_scheduler_initialized = true;

asm volatile(
"movl %[new_esp], %%esp \n" // swich to new stack
"movl %[new_esp], %%esp \n" // switch to new stack
"pushl %[from_to_thread] \n" // to_thread
"pushl %[from_to_thread] \n" // from_thread
"pushl $" __STRINGIFY(GDT_SELECTOR_CODE0) " \n"
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Devices/EBRPartitionTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ RefPtr<DiskPartition> EBRPartitionTable::partition(unsigned index)

auto& header = this->header();
if (header.mbr_signature != MBR_SIGNATURE) {
klog() << "EBRPartitionTable::initialize: bad MBR signature - not initalized? 0x" << String::format("%x", header.mbr_signature);
klog() << "EBRPartitionTable::initialize: bad MBR signature - not initialized? 0x" << String::format("%x", header.mbr_signature);
return nullptr;
}
if (index_is_extended_partition(index))
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Devices/GPTPartitionTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ RefPtr<DiskPartition> GPTPartitionTable::partition(unsigned index)
unsigned lba = header.partition_array_start_lba + (((index - 1) * header.partition_entry_size) / BytesPerSector);

if (header.sig[0] != GPT_SIGNATURE) {
klog() << "GPTPartitionTable::initialize: bad gpt signature - not initalized? 0x" << String::format("%x", header.sig);
klog() << "GPTPartitionTable::initialize: bad gpt signature - not initialized? 0x" << String::format("%x", header.sig);
return nullptr;
}

Expand Down
Loading

0 comments on commit bcfc6f0

Please sign in to comment.