authorgravatar for vallentinsource@gmail.comVallentin <vallentinsource@gmail.com> 2018-11-16 19:33:58+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-11-16 14:03:39-05:00
log398914eb713cf4c279edd4b30fc75e88a3a722b3
treeae38e865cde7a7fb5083b11ced635c36032c03c3
parentfbd6a66ae7116090d74e6366e9bc3b61706ec9af

Fixed typos


10 files changed, 16 insertions(+), 16 deletions(-)

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