| author | |
| committer | |
| log | 398914eb713cf4c279edd4b30fc75e88a3a722b3 |
| tree | ae38e865cde7a7fb5083b11ced635c36032c03c3 |
| parent | fbd6a66ae7116090d74e6366e9bc3b61706ec9af |
10 files changed, 16 insertions(+), 16 deletions(-)
doc/langref.html.in+3-3| ... | ... | @@ -954,7 +954,7 @@ a /= b{#endsyntax#}</pre></td> |
| 954 | 954 | <li>{#link|Floats#}</li> |
| 955 | 955 | </ul> |
| 956 | 956 | </td> |
| 957 | <td>Divison. | |
| 957 | <td>Division. | |
| 958 | 958 | <ul> |
| 959 | 959 | <li>Can cause {#link|overflow|Default Operations#} for integers.</li> |
| 960 | 960 | <li>Can cause {#link|Division by Zero#} for integers.</li> |
| ... | ... | @@ -3474,7 +3474,7 @@ fn createFoo(param: i32) !Foo { |
| 3474 | 3474 | </li> |
| 3475 | 3475 | <li> |
| 3476 | 3476 | Since Zig understands error types, it can pre-weight branches in favor of |
| 3477 | errors not occuring. Just a small optimization benefit that is not available | |
| 3477 | errors not occurring. Just a small optimization benefit that is not available | |
| 3478 | 3478 | in other languages. |
| 3479 | 3479 | </li> |
| 3480 | 3480 | </ul> |
| ... | ... | @@ -7614,7 +7614,7 @@ coding style. |
| 7614 | 7614 | Open braces on same line, unless you need to wrap. |
| 7615 | 7615 | </li> |
| 7616 | 7616 | <li>If a list of things is longer than 2, put each item on its own line and |
| 7617 | exercise the abilty to put an extra comma at the end. | |
| 7617 | exercise the ability to put an extra comma at the end. | |
| 7618 | 7618 | </li> |
| 7619 | 7619 | <li> |
| 7620 | 7620 | Line length: aim for 100; use common sense. |
src/cache_hash.cpp+1-1| ... | ... | @@ -294,7 +294,7 @@ Error cache_hit(CacheHash *ch, Buf *out_digest) { |
| 294 | 294 | chf = &ch->files.at(file_i); |
| 295 | 295 | } else if (any_file_changed) { |
| 296 | 296 | // cache miss. |
| 297 | // keep the the manifest file open with the rw lock | |
| 297 | // keep the manifest file open with the rw lock | |
| 298 | 298 | // reset the hash |
| 299 | 299 | rc = blake2b_init(&ch->blake, 48); |
| 300 | 300 | assert(rc == 0); |
src/os.cpp+3-3| ... | ... | @@ -1536,7 +1536,7 @@ int os_get_win32_ucrt_lib_path(ZigWindowsSDK *sdk, Buf* output_buf, ZigLLVM_Arch |
| 1536 | 1536 | buf_append_str(output_buf, "arm\\"); |
| 1537 | 1537 | break; |
| 1538 | 1538 | default: |
| 1539 | zig_panic("Attemped to use vcruntime for non-supported platform."); | |
| 1539 | zig_panic("Attempted to use vcruntime for non-supported platform."); | |
| 1540 | 1540 | } |
| 1541 | 1541 | Buf* tmp_buf = buf_alloc(); |
| 1542 | 1542 | 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 |
| 1585 | 1585 | buf_append_str(output_buf, "arm\\"); |
| 1586 | 1586 | break; |
| 1587 | 1587 | default: |
| 1588 | zig_panic("Attemped to use vcruntime for non-supported platform."); | |
| 1588 | zig_panic("Attempted to use vcruntime for non-supported platform."); | |
| 1589 | 1589 | } |
| 1590 | 1590 | Buf* tmp_buf = buf_alloc(); |
| 1591 | 1591 | 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 |
| 1608 | 1608 | buf_append_str(output_buf, "arm\\"); |
| 1609 | 1609 | break; |
| 1610 | 1610 | default: |
| 1611 | zig_panic("Attemped to use vcruntime for non-supported platform."); | |
| 1611 | zig_panic("Attempted to use vcruntime for non-supported platform."); | |
| 1612 | 1612 | } |
| 1613 | 1613 | Buf* tmp_buf = buf_alloc(); |
| 1614 | 1614 | buf_init_from_buf(tmp_buf, output_buf); |
std/base64.zig+1-1| ... | ... | @@ -180,7 +180,7 @@ pub const Base64DecoderWithIgnore = struct { |
| 180 | 180 | /// Invalid characters that are not ignored result in error.InvalidCharacter. |
| 181 | 181 | /// Invalid padding results in error.InvalidPadding. |
| 182 | 182 | /// Decoding more data than can fit in dest results in error.OutputTooSmall. See also ::calcSizeUpperBound. |
| 183 | /// Returns the number of bytes writen to dest. | |
| 183 | /// Returns the number of bytes written to dest. | |
| 184 | 184 | pub fn decode(decoder_with_ignore: *const Base64DecoderWithIgnore, dest: []u8, source: []const u8) !usize { |
| 185 | 185 | const decoder = &decoder_with_ignore.decoder; |
| 186 | 186 |
std/crypto/x25519.zig+1-1| ... | ... | @@ -52,7 +52,7 @@ pub const X25519 = struct { |
| 52 | 52 | // computes the actual scalar product (the result is in x2 and z2) |
| 53 | 53 | |
| 54 | 54 | // Montgomery ladder |
| 55 | // In projective coordinates, to avoid divisons: x = X / Z | |
| 55 | // In projective coordinates, to avoid divisions: x = X / Z | |
| 56 | 56 | // We don't care about the y coordinate, it's only 1 bit of information |
| 57 | 57 | Fe.init1(x2); |
| 58 | 58 | Fe.init0(z2); // "zero" point |
std/elf.zig+1-1| ... | ... | @@ -490,7 +490,7 @@ pub const Elf = struct { |
| 490 | 490 | if (sh_entry_size != 40) return error.InvalidFormat; |
| 491 | 491 | |
| 492 | 492 | for (elf.section_headers) |*elf_section| { |
| 493 | // TODO (multiple occurences) allow implicit cast from %u32 -> %u64 ? | |
| 493 | // TODO (multiple occurrences) allow implicit cast from %u32 -> %u64 ? | |
| 494 | 494 | elf_section.name = try in.readInt(elf.endian, u32); |
| 495 | 495 | elf_section.sh_type = try in.readInt(elf.endian, u32); |
| 496 | 496 | elf_section.flags = u64(try in.readInt(elf.endian, u32)); |
std/fmt/errol/index.zig+1-1| ... | ... | @@ -164,7 +164,7 @@ fn errol3u(val: f64, buffer: []u8) FloatDecimal { |
| 164 | 164 | // digit generation |
| 165 | 165 | |
| 166 | 166 | // We generate digits starting at index 1. If rounding a buffer later then it may be |
| 167 | // required to generate a preceeding digit in some cases (9.999) in which case we use | |
| 167 | // required to generate a preceding digit in some cases (9.999) in which case we use | |
| 168 | 168 | // the 0-index for this extra digit. |
| 169 | 169 | var buf_index: usize = 1; |
| 170 | 170 | while (true) { |
std/math/big/int.zig+1-1| ... | ... | @@ -169,7 +169,7 @@ pub const Int = struct { |
| 169 | 169 | return self.fitsInTwosComp(T.is_signed, T.bit_count); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | // Returns the approximate size of the integer in the given base. Negative values accomodate for | |
| 172 | // Returns the approximate size of the integer in the given base. Negative values accommodate for | |
| 173 | 173 | // the minus sign. This is used for determining the number of characters needed to print the |
| 174 | 174 | // value. It is inexact and will exceed the given value by 1-2 digits. |
| 175 | 175 | pub fn sizeInBase(self: Int, base: usize) usize { |
std/math/ilogb.zig+1-1| ... | ... | @@ -19,7 +19,7 @@ pub fn ilogb(x: var) i32 { |
| 19 | 19 | }; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | // NOTE: Should these be exposed publically? | |
| 22 | // NOTE: Should these be exposed publicly? | |
| 23 | 23 | const fp_ilogbnan = -1 - i32(maxInt(u32) >> 1); |
| 24 | 24 | const fp_ilogb0 = fp_ilogbnan; |
| 25 | 25 |
std/os/time.zig+3-3| ... | ... | @@ -124,7 +124,7 @@ pub const s_per_week = s_per_day * 7; |
| 124 | 124 | /// A monotonic high-performance timer. |
| 125 | 125 | /// Timer.start() must be called to initialize the struct, which captures |
| 126 | 126 | /// the counter frequency on windows and darwin, records the resolution, |
| 127 | /// and gives the user an oportunity to check for the existnece of | |
| 127 | /// and gives the user an opportunity to check for the existnece of | |
| 128 | 128 | /// monotonic clocks without forcing them to check for error on each read. |
| 129 | 129 | /// .resolution is in nanoseconds on all platforms but .start_time's meaning |
| 130 | 130 | /// depends on the OS. On Windows and Darwin it is a hardware counter |
| ... | ... | @@ -152,11 +152,11 @@ pub const Timer = struct { |
| 152 | 152 | //}; |
| 153 | 153 | const monotonic_clock_id = posix.CLOCK_MONOTONIC; |
| 154 | 154 | /// Initialize the timer structure. |
| 155 | //This gives us an oportunity to grab the counter frequency in windows. | |
| 155 | //This gives us an opportunity to grab the counter frequency in windows. | |
| 156 | 156 | //On Windows: QueryPerformanceCounter will succeed on anything >= XP/2000. |
| 157 | 157 | //On Posix: CLOCK_MONOTONIC will only fail if the monotonic counter is not |
| 158 | 158 | // supported, or if the timespec pointer is out of bounds, which should be |
| 159 | // impossible here barring cosmic rays or other such occurances of | |
| 159 | // impossible here barring cosmic rays or other such occurrences of | |
| 160 | 160 | // incredibly bad luck. |
| 161 | 161 | //On Darwin: This cannot fail, as far as I am able to tell. |
| 162 | 162 | const TimerError = error{ |