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>
954954 <li>{#link|Floats#}</li>
955955 </ul>
956956 </td>
957 <td>Divison.
957 <td>Division.
958958 <ul>
959959 <li>Can cause {#link|overflow|Default Operations#} for integers.</li>
960960 <li>Can cause {#link|Division by Zero#} for integers.</li>
......@@ -3474,7 +3474,7 @@ fn createFoo(param: i32) !Foo {
34743474 </li>
34753475 <li>
34763476 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
34783478 in other languages.
34793479 </li>
34803480 </ul>
......@@ -7614,7 +7614,7 @@ coding style.
76147614 Open braces on same line, unless you need to wrap.
76157615 </li>
76167616 <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.
76187618 </li>
76197619 <li>
76207620 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) {
294294 chf = &ch->files.at(file_i);
295295 } else if (any_file_changed) {
296296 // cache miss.
297 // keep the the manifest file open with the rw lock
297 // keep the manifest file open with the rw lock
298298 // reset the hash
299299 rc = blake2b_init(&ch->blake, 48);
300300 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
15361536 buf_append_str(output_buf, "arm\\");
15371537 break;
15381538 default:
1539 zig_panic("Attemped to use vcruntime for non-supported platform.");
1539 zig_panic("Attempted to use vcruntime for non-supported platform.");
15401540 }
15411541 Buf* tmp_buf = buf_alloc();
15421542 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
15851585 buf_append_str(output_buf, "arm\\");
15861586 break;
15871587 default:
1588 zig_panic("Attemped to use vcruntime for non-supported platform.");
1588 zig_panic("Attempted to use vcruntime for non-supported platform.");
15891589 }
15901590 Buf* tmp_buf = buf_alloc();
15911591 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
16081608 buf_append_str(output_buf, "arm\\");
16091609 break;
16101610 default:
1611 zig_panic("Attemped to use vcruntime for non-supported platform.");
1611 zig_panic("Attempted to use vcruntime for non-supported platform.");
16121612 }
16131613 Buf* tmp_buf = buf_alloc();
16141614 buf_init_from_buf(tmp_buf, output_buf);
std/base64.zig+1-1
......@@ -180,7 +180,7 @@ pub const Base64DecoderWithIgnore = struct {
180180 /// Invalid characters that are not ignored result in error.InvalidCharacter.
181181 /// Invalid padding results in error.InvalidPadding.
182182 /// 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.
184184 pub fn decode(decoder_with_ignore: *const Base64DecoderWithIgnore, dest: []u8, source: []const u8) !usize {
185185 const decoder = &decoder_with_ignore.decoder;
186186
std/crypto/x25519.zig+1-1
......@@ -52,7 +52,7 @@ pub const X25519 = struct {
5252 // computes the actual scalar product (the result is in x2 and z2)
5353
5454 // Montgomery ladder
55 // In projective coordinates, to avoid divisons: x = X / Z
55 // In projective coordinates, to avoid divisions: x = X / Z
5656 // We don't care about the y coordinate, it's only 1 bit of information
5757 Fe.init1(x2);
5858 Fe.init0(z2); // "zero" point
std/elf.zig+1-1
......@@ -490,7 +490,7 @@ pub const Elf = struct {
490490 if (sh_entry_size != 40) return error.InvalidFormat;
491491
492492 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 ?
494494 elf_section.name = try in.readInt(elf.endian, u32);
495495 elf_section.sh_type = try in.readInt(elf.endian, u32);
496496 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 {
164164 // digit generation
165165
166166 // 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
168168 // the 0-index for this extra digit.
169169 var buf_index: usize = 1;
170170 while (true) {
std/math/big/int.zig+1-1
......@@ -169,7 +169,7 @@ pub const Int = struct {
169169 return self.fitsInTwosComp(T.is_signed, T.bit_count);
170170 }
171171
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
173173 // the minus sign. This is used for determining the number of characters needed to print the
174174 // value. It is inexact and will exceed the given value by 1-2 digits.
175175 pub fn sizeInBase(self: Int, base: usize) usize {
std/math/ilogb.zig+1-1
......@@ -19,7 +19,7 @@ pub fn ilogb(x: var) i32 {
1919 };
2020}
2121
22// NOTE: Should these be exposed publically?
22// NOTE: Should these be exposed publicly?
2323const fp_ilogbnan = -1 - i32(maxInt(u32) >> 1);
2424const fp_ilogb0 = fp_ilogbnan;
2525
std/os/time.zig+3-3
......@@ -124,7 +124,7 @@ pub const s_per_week = s_per_day * 7;
124124/// A monotonic high-performance timer.
125125/// Timer.start() must be called to initialize the struct, which captures
126126/// 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
128128/// monotonic clocks without forcing them to check for error on each read.
129129/// .resolution is in nanoseconds on all platforms but .start_time's meaning
130130/// depends on the OS. On Windows and Darwin it is a hardware counter
......@@ -152,11 +152,11 @@ pub const Timer = struct {
152152 //};
153153 const monotonic_clock_id = posix.CLOCK_MONOTONIC;
154154 /// 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.
156156 //On Windows: QueryPerformanceCounter will succeed on anything >= XP/2000.
157157 //On Posix: CLOCK_MONOTONIC will only fail if the monotonic counter is not
158158 // 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
160160 // incredibly bad luck.
161161 //On Darwin: This cannot fail, as far as I am able to tell.
162162 const TimerError = error{