diff --git a/doc/langref.html.in b/doc/langref.html.in index 2332841305..c61203dca6 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -954,7 +954,7 @@ a /= b{#endsyntax#}
  • {#link|Floats#}
  • - Divison. + Division. @@ -7614,7 +7614,7 @@ coding style. Open braces on same line, unless you need to wrap.
  • If a list of things is longer than 2, put each item on its own line and - exercise the abilty to put an extra comma at the end. + exercise the ability to put an extra comma at the end.
  • Line length: aim for 100; use common sense. diff --git a/src/cache_hash.cpp b/src/cache_hash.cpp index 0ac7615a3a..7a3c08bc27 100644 --- a/src/cache_hash.cpp +++ b/src/cache_hash.cpp @@ -294,7 +294,7 @@ Error cache_hit(CacheHash *ch, Buf *out_digest) { chf = &ch->files.at(file_i); } else if (any_file_changed) { // cache miss. - // keep the the manifest file open with the rw lock + // keep the manifest file open with the rw lock // reset the hash rc = blake2b_init(&ch->blake, 48); assert(rc == 0); diff --git a/src/os.cpp b/src/os.cpp index ea88a8ef98..5d43e73d8a 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -1536,7 +1536,7 @@ int os_get_win32_ucrt_lib_path(ZigWindowsSDK *sdk, Buf* output_buf, ZigLLVM_Arch buf_append_str(output_buf, "arm\\"); break; default: - zig_panic("Attemped to use vcruntime for non-supported platform."); + zig_panic("Attempted to use vcruntime for non-supported platform."); } Buf* tmp_buf = buf_alloc(); buf_init_from_buf(tmp_buf, output_buf); @@ -1585,7 +1585,7 @@ int os_get_win32_kern32_path(ZigWindowsSDK *sdk, Buf* output_buf, ZigLLVM_ArchTy buf_append_str(output_buf, "arm\\"); break; default: - zig_panic("Attemped to use vcruntime for non-supported platform."); + zig_panic("Attempted to use vcruntime for non-supported platform."); } Buf* tmp_buf = buf_alloc(); buf_init_from_buf(tmp_buf, output_buf); @@ -1608,7 +1608,7 @@ int os_get_win32_kern32_path(ZigWindowsSDK *sdk, Buf* output_buf, ZigLLVM_ArchTy buf_append_str(output_buf, "arm\\"); break; default: - zig_panic("Attemped to use vcruntime for non-supported platform."); + zig_panic("Attempted to use vcruntime for non-supported platform."); } Buf* tmp_buf = buf_alloc(); buf_init_from_buf(tmp_buf, output_buf); diff --git a/std/base64.zig b/std/base64.zig index 97b86e0713..bc0bdb1bd3 100644 --- a/std/base64.zig +++ b/std/base64.zig @@ -180,7 +180,7 @@ pub const Base64DecoderWithIgnore = struct { /// Invalid characters that are not ignored result in error.InvalidCharacter. /// Invalid padding results in error.InvalidPadding. /// Decoding more data than can fit in dest results in error.OutputTooSmall. See also ::calcSizeUpperBound. - /// Returns the number of bytes writen to dest. + /// Returns the number of bytes written to dest. pub fn decode(decoder_with_ignore: *const Base64DecoderWithIgnore, dest: []u8, source: []const u8) !usize { const decoder = &decoder_with_ignore.decoder; diff --git a/std/crypto/x25519.zig b/std/crypto/x25519.zig index bf78511f9a..281813b457 100644 --- a/std/crypto/x25519.zig +++ b/std/crypto/x25519.zig @@ -52,7 +52,7 @@ pub const X25519 = struct { // computes the actual scalar product (the result is in x2 and z2) // Montgomery ladder - // In projective coordinates, to avoid divisons: x = X / Z + // In projective coordinates, to avoid divisions: x = X / Z // We don't care about the y coordinate, it's only 1 bit of information Fe.init1(x2); Fe.init0(z2); // "zero" point diff --git a/std/elf.zig b/std/elf.zig index 904ddf1dad..e95222744d 100644 --- a/std/elf.zig +++ b/std/elf.zig @@ -490,7 +490,7 @@ pub const Elf = struct { if (sh_entry_size != 40) return error.InvalidFormat; for (elf.section_headers) |*elf_section| { - // TODO (multiple occurences) allow implicit cast from %u32 -> %u64 ? + // TODO (multiple occurrences) allow implicit cast from %u32 -> %u64 ? elf_section.name = try in.readInt(elf.endian, u32); elf_section.sh_type = try in.readInt(elf.endian, u32); elf_section.flags = u64(try in.readInt(elf.endian, u32)); diff --git a/std/fmt/errol/index.zig b/std/fmt/errol/index.zig index 9cc5b2c1cd..0fdb1c4ab8 100644 --- a/std/fmt/errol/index.zig +++ b/std/fmt/errol/index.zig @@ -164,7 +164,7 @@ fn errol3u(val: f64, buffer: []u8) FloatDecimal { // digit generation // We generate digits starting at index 1. If rounding a buffer later then it may be - // required to generate a preceeding digit in some cases (9.999) in which case we use + // required to generate a preceding digit in some cases (9.999) in which case we use // the 0-index for this extra digit. var buf_index: usize = 1; while (true) { diff --git a/std/math/big/int.zig b/std/math/big/int.zig index c3f6bbccef..cda2e1419f 100644 --- a/std/math/big/int.zig +++ b/std/math/big/int.zig @@ -169,7 +169,7 @@ pub const Int = struct { return self.fitsInTwosComp(T.is_signed, T.bit_count); } - // Returns the approximate size of the integer in the given base. Negative values accomodate for + // Returns the approximate size of the integer in the given base. Negative values accommodate for // the minus sign. This is used for determining the number of characters needed to print the // value. It is inexact and will exceed the given value by 1-2 digits. pub fn sizeInBase(self: Int, base: usize) usize { diff --git a/std/math/ilogb.zig b/std/math/ilogb.zig index c787ab68f9..e6bdb14012 100644 --- a/std/math/ilogb.zig +++ b/std/math/ilogb.zig @@ -19,7 +19,7 @@ pub fn ilogb(x: var) i32 { }; } -// NOTE: Should these be exposed publically? +// NOTE: Should these be exposed publicly? const fp_ilogbnan = -1 - i32(maxInt(u32) >> 1); const fp_ilogb0 = fp_ilogbnan; diff --git a/std/os/time.zig b/std/os/time.zig index 236111a31c..d9fe046a55 100644 --- a/std/os/time.zig +++ b/std/os/time.zig @@ -124,7 +124,7 @@ pub const s_per_week = s_per_day * 7; /// A monotonic high-performance timer. /// Timer.start() must be called to initialize the struct, which captures /// the counter frequency on windows and darwin, records the resolution, -/// and gives the user an oportunity to check for the existnece of +/// and gives the user an opportunity to check for the existnece of /// monotonic clocks without forcing them to check for error on each read. /// .resolution is in nanoseconds on all platforms but .start_time's meaning /// depends on the OS. On Windows and Darwin it is a hardware counter @@ -152,11 +152,11 @@ pub const Timer = struct { //}; const monotonic_clock_id = posix.CLOCK_MONOTONIC; /// Initialize the timer structure. - //This gives us an oportunity to grab the counter frequency in windows. + //This gives us an opportunity to grab the counter frequency in windows. //On Windows: QueryPerformanceCounter will succeed on anything >= XP/2000. //On Posix: CLOCK_MONOTONIC will only fail if the monotonic counter is not // supported, or if the timespec pointer is out of bounds, which should be - // impossible here barring cosmic rays or other such occurances of + // impossible here barring cosmic rays or other such occurrences of // incredibly bad luck. //On Darwin: This cannot fail, as far as I am able to tell. const TimerError = error{