Commit 398914eb71

Vallentin <vallentinsource@gmail.com>
2018-11-16 19:33:58
Fixed typos
1 parent fbd6a66
doc/langref.html.in
@@ -954,7 +954,7 @@ a /= b{#endsyntax#}</pre></td>
               <li>{#link|Floats#}</li>
             </ul>
           </td>
-          <td>Divison.
+          <td>Division.
             <ul>
               <li>Can cause {#link|overflow|Default Operations#} for integers.</li>
               <li>Can cause {#link|Division by Zero#} for integers.</li>
@@ -3474,7 +3474,7 @@ fn createFoo(param: i32) !Foo {
         </li>
         <li>
           Since Zig understands error types, it can pre-weight branches in favor of
-          errors not occuring. Just a small optimization benefit that is not available
+          errors not occurring. Just a small optimization benefit that is not available
           in other languages.
         </li>
       </ul>
@@ -7614,7 +7614,7 @@ coding style.
           Open braces on same line, unless you need to wrap.
         </li>
         <li>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.
         </li>
         <li>
           Line length: aim for 100; use common sense.
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);
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);
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
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) {
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 {
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;
 
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{
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;
 
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));