From fb126459ec628f2bb9b250b79a6213d9e17c7e67 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Sun, 8 Aug 2021 15:27:52 +1000 Subject: [PATCH] docs: Fix a few typos There are small typos in: - libc/stdio/appendr.c - third_party/infozip/zip/api.c - third_party/quickjs/qjscalc.js - third_party/stb/stb_image.c Fixes: - Should read `occurrence` rather than `occurance`. - Should read `guaranteed` rather than `guarranteed`. - Should read `guarantee` rather than `guarante`. - Should read `function` rather than `fonction`. --- libc/stdio/appendr.c | 2 +- third_party/infozip/zip/api.c | 4 ++-- third_party/quickjs/qjscalc.js | 2 +- third_party/stb/stb_image.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libc/stdio/appendr.c b/libc/stdio/appendr.c index c49b216a2..6e3a365fb 100644 --- a/libc/stdio/appendr.c +++ b/libc/stdio/appendr.c @@ -39,7 +39,7 @@ * If `i` is greater than the current length then the extra bytes are * filled with NUL characters. * - * The resulting buffer is guarranteed to be NUL-terminated, i.e. + * The resulting buffer is guaranteed to be NUL-terminated, i.e. * `!b[appendz(b).i]` will be the case. * * @return `i` or -1 if `ENOMEM` diff --git a/third_party/infozip/zip/api.c b/third_party/infozip/zip/api.c index 8a013e5bb..d34e329b6 100644 --- a/third_party/infozip/zip/api.c +++ b/third_party/infozip/zip/api.c @@ -99,7 +99,7 @@ if ((szRootDir != NULL) && (szRootDir[0] != '\0')) else root_flag = FALSE; -str2 = strchr(str1, '\"'); /* get first occurance of double quote */ +str2 = strchr(str1, '\"'); /* get first occurrence of double quote */ while ((str3 = strchr(str1, '\t')) != NULL) { @@ -151,7 +151,7 @@ while ((str2 = strchr(str1, '\"')) != NULL) lstrcat(str1, str3); } /* end while */ -/* points to first occurance of a space */ +/* points to first occurrence of a space */ str2 = strchr(str1, ' '); /* Go through the string character by character, looking for instances diff --git a/third_party/quickjs/qjscalc.js b/third_party/quickjs/qjscalc.js index b1ad1e895..ec8301da8 100644 --- a/third_party/quickjs/qjscalc.js +++ b/third_party/quickjs/qjscalc.js @@ -1615,7 +1615,7 @@ var Integer, Float, Fraction, Complex, Mod, Polynomial, PolyMod, RationalFunctio return v1; v2_emin = 0; } else if (v2 instanceof RationalFunction) { - /* compute the emin of the rational fonction */ + /* compute the emin of the rational function */ i = get_emin(v2.num) - get_emin(v2.den); if (d <= i) return v1; diff --git a/third_party/stb/stb_image.c b/third_party/stb/stb_image.c index e80805b10..5bf29602f 100644 --- a/third_party/stb/stb_image.c +++ b/third_party/stb/stb_image.c @@ -2908,7 +2908,7 @@ static int stbi__create_png_image_raw(stbi__png *a, unsigned char *raw, unsigned char *cur = a->out + stride * j; unsigned char *in = a->out + stride * j + x * out_n - img_width_bytes; // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common - // 8-bit path optimal at minimal cost for 1/2/4-bit png guarante byte + // 8-bit path optimal at minimal cost for 1/2/4-bit png guarantee byte // alignment, if width is not multiple of 8/4/2 we'll decode dummy // trailing data that will be skipped in the later loop unsigned char scale = (color == 0)