From 398914eb713cf4c279edd4b30fc75e88a3a722b3 Mon Sep 17 00:00:00 2001 From: Vallentin Date: Fri, 16 Nov 2018 19:33:58 +0100 Subject: [PATCH] Fixed typos --- doc/langref.html.in | 6 +++--- src/cache_hash.cpp | 2 +- src/os.cpp | 6 +++--- std/base64.zig | 2 +- std/crypto/x25519.zig | 2 +- std/elf.zig | 2 +- std/fmt/errol/index.zig | 2 +- std/math/big/int.zig | 2 +- std/math/ilogb.zig | 2 +- std/os/time.zig | 6 +++--- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 2332841305d286db3c458710a17355161447b6cc..c61203dca67a0d632cd0b3292c211ca4f953810a 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 0ac7615a3ae6f196537a1c566565039ef3754727..7a3c08bc2735d666081001d64557822a6302fdef 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 ea88a8ef98f62561f9b3112350d22dc88c53c90b..5d43e73d8aeedaa651d7080931e8c7104f4636ae 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 97b86e07136c7d16cb3663e4c3e3dcb35d332be8..bc0bdb1bd371a8bc4b26621bd8cd0e3d3a03c0a2 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 bf78511f9a1daf26708a5349faeae0716cc82fc0..281813b45798efe03b8fa25921c1ed162c64b787 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 904ddf1dad13ec55dd5e36d0f9775bd5efe38f14..e95222744d5af685721fc057afb0540c1f22d659 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 9cc5b2c1cd6ca0641f2bc4cf29656e5d42cb0d42..0fdb1c4ab89b23dda123258f68b7b9cd94361e1d 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 c3f6bbccefa4444b050b0018d710539886abe108..cda2e1419fe0c9527b49674abbd1dadf528a907c 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 c787ab68f904edfdd1c27dc7157d9c870380be20..e6bdb14012c0689ae71e808094d2421b45830cc9 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 236111a31cf816c67ec454047298dde86916cfdf..d9fe046a55708940ac8235f868e5ce4e673b52b6 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{ -- 2.54.0