Correct more typos (#500)

This commit is contained in:
Jared Miller 2022-07-21 23:53:30 -04:00 committed by GitHub
parent 8b469389f6
commit d4000bb8f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 39 additions and 39 deletions

View file

@ -54,7 +54,7 @@
jmp 297f jmp 297f
.byte 0xbf # mov $0x????xxxx,%edi .byte 0xbf # mov $0x????xxxx,%edi
.long \address .long \address
297: 297:
.endm .endm
// Loads 16-bit CONSTEXPR into Qw-register w/ optional zero-extend. // Loads 16-bit CONSTEXPR into Qw-register w/ optional zero-extend.

View file

@ -185,7 +185,7 @@ typedef float __m128_u _Vector_size(16) forcealign(1) mayalias;
#define _mm_movehl_ps(M128_0, M128_1) \ #define _mm_movehl_ps(M128_0, M128_1) \
((__m128)__builtin_shufflevector((__v4sf)(__m128)(M128_0), \ ((__m128)__builtin_shufflevector((__v4sf)(__m128)(M128_0), \
(__v4sf)(__m128)(M128_1), 6, 7, 2, 3)) (__v4sf)(__m128)(M128_1), 6, 7, 2, 3))
/* instrinsics unstable & constantly breaking, consider ansi c or asm. */ /* intrinsics unstable & constantly breaking, consider ansi c or asm. */
/* each version of llvm has a different incompatible impl for this one */ /* each version of llvm has a different incompatible impl for this one */
#else #else
#define _mm_movehl_ps(M128_0, M128_1) \ #define _mm_movehl_ps(M128_0, M128_1) \

View file

@ -8,7 +8,7 @@ LIBC_LOG = $(LIBC_LOG_A_DEPS) $(LIBC_LOG_A)
LIBC_LOG_A = o/$(MODE)/libc/log/log.a LIBC_LOG_A = o/$(MODE)/libc/log/log.a
LIBC_LOG_A_FILES := \ LIBC_LOG_A_FILES := \
$(wildcard libc/log/thunks/*) \ $(wildcard libc/log/thunks/*) \
$(wildcard libc/log/*) $(wildcard libc/log/*)
LIBC_LOG_A_HDRS = $(filter %.h,$(LIBC_LOG_A_FILES)) LIBC_LOG_A_HDRS = $(filter %.h,$(LIBC_LOG_A_FILES))
LIBC_LOG_A_SRCS_C = $(filter %.c,$(LIBC_LOG_A_FILES)) LIBC_LOG_A_SRCS_C = $(filter %.c,$(LIBC_LOG_A_FILES))
LIBC_LOG_A_SRCS_S = $(filter %.S,$(LIBC_LOG_A_FILES)) LIBC_LOG_A_SRCS_S = $(filter %.S,$(LIBC_LOG_A_FILES))

View file

@ -63,7 +63,7 @@ _ZdaPvSt11align_val_t:
nop nop
// 𝑠𝑙𝑖𝑑𝑒 // 𝑠𝑙𝑖𝑑𝑒
.endfn _ZdaPvSt11align_val_t,weak .endfn _ZdaPvSt11align_val_t,weak
_ZdaPvm: _ZdaPvm:
// operator delete[](void*, unsigned long): // operator delete[](void*, unsigned long):
nop nop
// 𝑠𝑙𝑖𝑑𝑒 // 𝑠𝑙𝑖𝑑𝑒

View file

@ -48,11 +48,11 @@
// //
// //
// //
// //
// //
// //
// //
// //
// THERE WILL BE BLOCKS march 01 2017 // THERE WILL BE BLOCKS march 01 2017
// //
// @see libc/str/str.h // @see libc/str/str.h

View file

@ -47,7 +47,7 @@ htobe32:
htole32: htole32:
be32toh: be32toh:
le32toh: le32toh:
ntohl: ntohl:
htonl: mov %edi,%eax htonl: mov %edi,%eax
bswap %eax bswap %eax
ret ret
@ -64,7 +64,7 @@ htobe16:
htole16: htole16:
be16toh: be16toh:
le16toh: le16toh:
ntohs: ntohs:
htons: movzwl %di,%eax htons: movzwl %di,%eax
xchg %al,%ah xchg %al,%ah
ret ret

View file

@ -75,7 +75,7 @@ Tim Chen <tim.c.chen@linux.intel.com>\n"
// void sha256_transform_ni(uint32_t digest[static 8], // void sha256_transform_ni(uint32_t digest[static 8],
// const void *data, // const void *data,
// int32_t numBlocks); // int32_t numBlocks);
// //
// @param %rdi points to output digest // @param %rdi points to output digest
// @param %rsi points to input data // @param %rsi points to input data
// @param %rdx is number of blocks to process // @param %rdx is number of blocks to process

View file

@ -64,7 +64,7 @@ NtStatus NtWriteFile(int64_t FileHandle, void *opt_Event,
NtStatus NtDuplicateObject(int64_t SourceProcessHandle, void *SourceHandle, NtStatus NtDuplicateObject(int64_t SourceProcessHandle, void *SourceHandle,
void *TargetProcessHandle, void *TargetProcessHandle,
void **opt_out_TargetHandle, uint32_t DesiredAcess, void **opt_out_TargetHandle, uint32_t DesiredAcess,
uint32_t Atrributes, uint32_t options_t); uint32_t Attributes, uint32_t options_t);
NtStatus NtQueryInformationFile(int64_t FileHandle, NtStatus NtQueryInformationFile(int64_t FileHandle,
struct NtIoStatusBlock *out_IoStatusBlock, struct NtIoStatusBlock *out_IoStatusBlock,

View file

@ -83,7 +83,7 @@ poz(const double z) /*VAR normal z value */
#define BIGX 20.0 /* max value to represent exp (x) */ #define BIGX 20.0 /* max value to represent exp (x) */
#define ex(x) (((x) < -BIGX) ? 0.0 : exp(x)) #define ex(x) (((x) < -BIGX) ? 0.0 : exp(x))
/*FUNCTION pochisq: probability of chi sqaure value */ /*FUNCTION pochisq: probability of chi square value */
/*ALGORITHM Compute probability of chi square value. /*ALGORITHM Compute probability of chi square value.
Adapted from: Adapted from:
Hill, I. D. and Pike, M. C. Algorithm 299 Hill, I. D. and Pike, M. C. Algorithm 299

View file

@ -26,7 +26,7 @@
#include "libc/sysv/errfuns.h" #include "libc/sysv/errfuns.h"
/** /**
* Returns path of executable interperter. * Returns path of executable interpreter.
* *
* Unlike `program_executable_name` which is designed to figure out the * Unlike `program_executable_name` which is designed to figure out the
* absolute path of the first argument passed to `execve()`, what we do * absolute path of the first argument passed to `execve()`, what we do

View file

@ -64,7 +64,7 @@ static privileged void __morph_mprotect(void *addr, size_t size, int prot,
} }
/** /**
* Begins code morphing execuatble. * Begins code morphing executable.
* *
* @return 0 on success, or -1 w/ errno * @return 0 on success, or -1 w/ errno
*/ */
@ -97,7 +97,7 @@ privileged void __morph_begin(void) {
} }
/** /**
* Begins code morphing execuatble. * Begins code morphing executable.
*/ */
privileged void __morph_end(void) { privileged void __morph_end(void) {
int ax; int ax;

View file

@ -30,7 +30,7 @@
#define VERSION 0x0202 /* Windows Vista+ */ #define VERSION 0x0202 /* Windows Vista+ */
/** /**
* Information about underyling Windows Sockets implemmentation. * Information about underlying Windows Sockets implementation.
* *
* Cosmopolitan automatically calls YOINK() on this symbol when its * Cosmopolitan automatically calls YOINK() on this symbol when its
* Berkeley Socket wrappers are linked. The latest version of Winsock * Berkeley Socket wrappers are linked. The latest version of Winsock

View file

@ -41,7 +41,7 @@
* filled with NUL characters. If `i` is less than the current length * filled with NUL characters. If `i` is less than the current length
* then memory is released to the system. * then memory is released to the system.
* *
* 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 even if both params are 0. * `!b[appendz(b).i]` will be the case even if both params are 0.
* *
* @return `i` or -1 if `ENOMEM` * @return `i` or -1 if `ENOMEM`

View file

@ -27,7 +27,7 @@
* *
* @param s is output buffer * @param s is output buffer
* @param size is capacity of s * @param size is capacity of s
* @param f is non-null file oject stream pointer * @param f is non-null file object stream pointer
* @return s on success, NULL on error, or NULL if EOF happens when * @return s on success, NULL on error, or NULL if EOF happens when
* zero characters have been read * zero characters have been read
* @see fgets_unlocked() * @see fgets_unlocked()

View file

@ -28,7 +28,7 @@
* *
* @param s is output buffer * @param s is output buffer
* @param size is capacity of s * @param size is capacity of s
* @param f is non-null file oject stream pointer * @param f is non-null file object stream pointer
* @return s on success, NULL on error, or NULL if EOF happens when * @return s on success, NULL on error, or NULL if EOF happens when
* zero characters have been read * zero characters have been read
*/ */

View file

@ -23,7 +23,7 @@
// This is intended for security-conscious applications. // This is intended for security-conscious applications.
// //
// @param rdi is dest // @param rdi is dest
// @param rsi is the number of bytes to set // @param rsi is the number of bytes to set
explicit_bzero: explicit_bzero:
jmp bzero jmp bzero
.endfn explicit_bzero,globl .endfn explicit_bzero,globl

View file

@ -20,7 +20,7 @@
// Magic words to unbreak build if GCOV flags are passed. // Magic words to unbreak build if GCOV flags are passed.
__gcov_init: __gcov_init:
ret ret
.endfn __gcov_init,globl,weak .endfn __gcov_init,globl,weak
@ -28,7 +28,7 @@ __gcov_exit:
ret ret
.endfn __gcov_exit,globl,weak .endfn __gcov_exit,globl,weak
__gcov_merge_add: __gcov_merge_add:
ret ret
.endfn __gcov_merge_add,globl,weak .endfn __gcov_merge_add,globl,weak

View file

@ -581,8 +581,8 @@ syscon sicode SYS_USER_DISPATCH 2 -1 -1 -1 -1 -1 # SIGSYS; syscall
# sigaltstack() values # sigaltstack() values
# #
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary # group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
syscon ss SIGSTKSZ 8192 131072 34816 28672 28672 8192 # overlayed with STACKSIZE; you need to #undef SIGSTKSZ to access this symbol syscon ss SIGSTKSZ 8192 131072 34816 28672 28672 8192 # overlaid with STACKSIZE; you need to #undef SIGSTKSZ to access this symbol
syscon ss MINSIGSTKSZ 2048 32768 2048 12288 8192 2048 # overlayed with 32768; you need to #undef MINSIGSTKSZ to access this symbol syscon ss MINSIGSTKSZ 2048 32768 2048 12288 8192 2048 # overlaid with 32768; you need to #undef MINSIGSTKSZ to access this symbol
syscon ss SS_ONSTACK 1 1 1 1 1 1 # unix consensus syscon ss SS_ONSTACK 1 1 1 1 1 1 # unix consensus
syscon ss SS_DISABLE 2 4 4 4 4 2 # bsd consensus syscon ss SS_DISABLE 2 4 4 4 4 2 # bsd consensus

View file

@ -41,7 +41,7 @@ char *_mktls(char **out_tib) {
// organized _Thread_local data, as well as Cosmpolitan Libc (64) // organized _Thread_local data, as well as Cosmpolitan Libc (64)
if (!(tls = calloc(1, _MEMZ))) return 0; if (!(tls = calloc(1, _MEMZ))) return 0;
// set up thread informaiton block // set up thread information block
tib = (cthread_t)(tls + _MEMZ - _TIBZ); tib = (cthread_t)(tls + _MEMZ - _TIBZ);
tib->self = tib; tib->self = tib;
tib->self2 = tib; tib->self2 = tib;

View file

@ -52,7 +52,7 @@ double __cbrt(double x) {
* error of about 1 in 16. Adding a bias of -0.03306235651 to the * error of about 1 in 16. Adding a bias of -0.03306235651 to the
* (e%3+m)/3 term reduces the error to about 1 in 32. With the IEEE * (e%3+m)/3 term reduces the error to about 1 in 32. With the IEEE
* floating point representation, for finite positive normal values, * floating point representation, for finite positive normal values,
* ordinary integer divison of the value in bits magically gives * ordinary integer division of the value in bits magically gives
* almost exactly the RHS of the above provided we first subtract the * almost exactly the RHS of the above provided we first subtract the
* exponent bias (1023 for doubles) and later add it back. We do the * exponent bias (1023 for doubles) and later add it back. We do the
* subtraction virtually to keep e >= 0 so that ordinary integer * subtraction virtually to keep e >= 0 so that ordinary integer

View file

@ -63,7 +63,7 @@ asm(".include \"libc/disclaimer.inc\"");
* = log(6.3*5.3) + lgamma(5.3) * = log(6.3*5.3) + lgamma(5.3)
* = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3) * = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3)
* 2. Polynomial approximation of lgamma around its * 2. Polynomial approximation of lgamma around its
* minimun ymin=1.461632144968362245 to maintain monotonicity. * minimum ymin=1.461632144968362245 to maintain monotonicity.
* On [ymin-0.23, ymin+0.27] (i.e., [1.23164,1.73163]), use * On [ymin-0.23, ymin+0.27] (i.e., [1.23164,1.73163]), use
* Let z = x-ymin; * Let z = x-ymin;
* lgamma(x) = -1.214862905358496078218 + z^2*poly(z) * lgamma(x) = -1.214862905358496078218 + z^2*poly(z)

View file

@ -63,7 +63,7 @@ asm(".include \"libc/disclaimer.inc\"");
* = log(6.3*5.3) + lgamma(5.3) * = log(6.3*5.3) + lgamma(5.3)
* = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3) * = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3)
* 2. Polynomial approximation of lgamma around its * 2. Polynomial approximation of lgamma around its
* minimun ymin=1.461632144968362245 to maintain monotonicity. * minimum ymin=1.461632144968362245 to maintain monotonicity.
* On [ymin-0.23, ymin+0.27] (i.e., [1.23164,1.73163]), use * On [ymin-0.23, ymin+0.27] (i.e., [1.23164,1.73163]), use
* Let z = x-ymin; * Let z = x-ymin;
* lgamma(x) = -1.214862905358496078218 + z^2*poly(z) * lgamma(x) = -1.214862905358496078218 + z^2*poly(z)

View file

@ -79,14 +79,14 @@ asm(".include \"libc/disclaimer.inc\"");
* z = (z-x[i])*2**24 * z = (z-x[i])*2**24
* *
* *
* y[] ouput result in an array of double precision numbers. * y[] output result in an array of double precision numbers.
* The dimension of y[] is: * The dimension of y[] is:
* 24-bit precision 1 * 24-bit precision 1
* 53-bit precision 2 * 53-bit precision 2
* 64-bit precision 2 * 64-bit precision 2
* 113-bit precision 3 * 113-bit precision 3
* The actual value is the sum of them. Thus for 113-bit * The actual value is the sum of them. Thus for 113-bit
* precison, one may have to do something like: * precision, one may have to do something like:
* *
* long double t,w,r_head, r_tail; * long double t,w,r_head, r_tail;
* t = (long double)y[2] + (long double)y[1]; * t = (long double)y[2] + (long double)y[1];
@ -117,7 +117,7 @@ asm(".include \"libc/disclaimer.inc\"");
* jk+1 must be 2 larger than you might expect so that our * jk+1 must be 2 larger than you might expect so that our
* recomputation test works. (Up to 24 bits in the integer * recomputation test works. (Up to 24 bits in the integer
* part (the 24 bits of it that we compute) and 23 bits in * part (the 24 bits of it that we compute) and 23 bits in
* the fraction part may be lost to cancelation before we * the fraction part may be lost to cancellation before we
* recompute.) * recompute.)
* *
* jz local integer variable indicating the number of * jz local integer variable indicating the number of

View file

@ -43,7 +43,7 @@ int(xsigaction)(int sig, void *handler, uint64_t flags, uint64_t mask,
struct sigaction *old) { struct sigaction *old) {
/* This API is superior to sigaction() because (1) it offers feature /* This API is superior to sigaction() because (1) it offers feature
parity; (2) compiler emits 1/3rd as much binary code at call-site; parity; (2) compiler emits 1/3rd as much binary code at call-site;
and (3) it removes typing that just whines without added saftey. */ and (3) it removes typing that just whines without added safety. */
struct sigaction sa; struct sigaction sa;
bzero(&sa, sizeof(sa)); bzero(&sa, sizeof(sa));
sa.sa_handler = handler; sa.sa_handler = handler;

View file

@ -47,7 +47,7 @@ TEST(fcntl_getfl, testRemembersAccessMode) {
TEST(fcntl_setfl, testChangeAppendStatus) { TEST(fcntl_setfl, testChangeAppendStatus) {
if (IsWindows()) { if (IsWindows()) {
// no obivous way to do fcntl(fd, F_SETFL, O_APPEND) // no obvious way to do fcntl(fd, F_SETFL, O_APPEND)
return; return;
} }
int fd; int fd;

View file

@ -606,7 +606,7 @@ BENCH(memcmp, bench) {
volatile char *copy = gc(strdup(kHyperion)); volatile char *copy = gc(strdup(kHyperion));
EZBENCH2("memcmp big", donothing, EZBENCH2("memcmp big", donothing,
EXPROPRIATE(memcmp(kHyperion, copy, kHyperionSize))); EXPROPRIATE(memcmp(kHyperion, copy, kHyperionSize)));
copy = gc(strdup("tought little ship")); copy = gc(strdup("tough little ship"));
EZBENCH2("memcmp 19", donothing, EZBENCH2("memcmp 19", donothing,
EXPROPRIATE(memcmp("tought little ship", copy, 19))); EXPROPRIATE(memcmp("tough little ship", copy, 19)));
} }

View file

@ -108,7 +108,7 @@ TEST(ParseHttpRange, testInvalidRange) {
EXPECT_EQ(0, length); EXPECT_EQ(0, length);
} }
TEST(ParseHttpRange, testOverflow_duringIntepretation_doesntSetRanges) { TEST(ParseHttpRange, testOverflow_duringInterpretation_doesntSetRanges) {
long start, length; long start, length;
const char *s = "bytes=99-9223372036854775808"; const char *s = "bytes=99-9223372036854775808";
EXPECT_FALSE(ParseHttpRange(s, strlen(s), 100, &start, &length)); EXPECT_FALSE(ParseHttpRange(s, strlen(s), 100, &start, &length));

View file

@ -257,7 +257,7 @@ TEST(ParseUrl, testEmptyParams_absentCanBeDiscerned) {
ASSERT_NE(NULL, h.params.p); ASSERT_NE(NULL, h.params.p);
} }
TEST(ParseUrl, testWeirdAmps_areReprodicible) { TEST(ParseUrl, testWeirdAmps_areReproducible) {
struct Url h; struct Url h;
gc(ParseUrl("?&&", -1, &h)); gc(ParseUrl("?&&", -1, &h));
gc(h.params.p); gc(h.params.p);

View file

@ -217,6 +217,6 @@
(lambda (x) (lambda (x)
(lambda () (lambda ()
x)))))) x))))))
((error '(enclosed memory failed to propogate upward)))) ((error '(enclosed memory failed to propagate upward))))
(ignore)) (ignore))

View file

@ -13,10 +13,10 @@
Terse mode output, getopt() command line processing, Terse mode output, getopt() command line processing,
optional stdin input, and HTML documentation added in optional stdin input, and HTML documentation added in
October 1998. October 1998.
Documentation for the -t (terse output) option added Documentation for the -t (terse output) option added
in July 2006. in July 2006.
Replaced table look-up for chi square to probability Replaced table look-up for chi square to probability
conversion with algorithmic computation in January 2008. conversion with algorithmic computation in January 2008.