diff --git a/ape/macros.internal.h b/ape/macros.internal.h index f620f8261..973602a60 100644 --- a/ape/macros.internal.h +++ b/ape/macros.internal.h @@ -54,7 +54,7 @@ jmp 297f .byte 0xbf # mov $0x????xxxx,%edi .long \address -297: +297: .endm // Loads 16-bit CONSTEXPR into Qw-register w/ optional zero-extend. diff --git a/libc/bits/xmmintrin.internal.h b/libc/bits/xmmintrin.internal.h index bcdf2942a..3ea24c713 100644 --- a/libc/bits/xmmintrin.internal.h +++ b/libc/bits/xmmintrin.internal.h @@ -185,7 +185,7 @@ typedef float __m128_u _Vector_size(16) forcealign(1) mayalias; #define _mm_movehl_ps(M128_0, M128_1) \ ((__m128)__builtin_shufflevector((__v4sf)(__m128)(M128_0), \ (__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 */ #else #define _mm_movehl_ps(M128_0, M128_1) \ diff --git a/libc/log/log.mk b/libc/log/log.mk index 57e8523bd..34a3b4338 100644 --- a/libc/log/log.mk +++ b/libc/log/log.mk @@ -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_FILES := \ $(wildcard libc/log/thunks/*) \ - $(wildcard libc/log/*) + $(wildcard libc/log/*) 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_S = $(filter %.S,$(LIBC_LOG_A_FILES)) diff --git a/libc/mem/cxx/free.S b/libc/mem/cxx/free.S index 9d3264658..aeb057bb3 100644 --- a/libc/mem/cxx/free.S +++ b/libc/mem/cxx/free.S @@ -63,7 +63,7 @@ _ZdaPvSt11align_val_t: nop // 𝑠𝑙𝑖𝑑𝑒 .endfn _ZdaPvSt11align_val_t,weak -_ZdaPvm: +_ZdaPvm: // operator delete[](void*, unsigned long): nop // 𝑠𝑙𝑖𝑑𝑒 diff --git a/libc/nexgen32e/kcp437.S b/libc/nexgen32e/kcp437.S index 59f0e0bf9..e25ccf861 100644 --- a/libc/nexgen32e/kcp437.S +++ b/libc/nexgen32e/kcp437.S @@ -48,11 +48,11 @@ // ▄██▀▄▄░░▀▐▄████▄ █████▀▄░░█▀▄▀░░ ▄██░ // █████▄▄▄███▀░█▌██▄▀▀█████▄▄░░░▄▄███▀██▄ ▄▀▀▀▄▄ // ▀██████▀■▄█▄▄ ░▀███████████████▓▓░░▄██▀▄████▄▄▀▄ -// +// // █▀█ █ █▀█ █▀█ █▄▀ ▐▀█▀▌█▀█ █▀█ █▄ █ ▀█▀ █▀█ █▀▀ // █▀▄ █ █ █ █ █ ▀▄ █ █▀▄ █ █ █ ▀█ █ █ ▀▀█ // █▄█ █▄▌█▄█ █▄█ █ █ █ █ █ █▄█ █ █ ▄█▄ █▄█ █▄█ -// +// // THERE WILL BE BLOCKS march 01 2017 // // @see libc/str/str.h diff --git a/libc/nexgen32e/lolendian.S b/libc/nexgen32e/lolendian.S index b1c9b9b34..c15e47fc2 100644 --- a/libc/nexgen32e/lolendian.S +++ b/libc/nexgen32e/lolendian.S @@ -47,7 +47,7 @@ htobe32: htole32: be32toh: le32toh: -ntohl: +ntohl: htonl: mov %edi,%eax bswap %eax ret @@ -64,7 +64,7 @@ htobe16: htole16: be16toh: le16toh: -ntohs: +ntohs: htons: movzwl %di,%eax xchg %al,%ah ret diff --git a/libc/nexgen32e/sha256ni.S b/libc/nexgen32e/sha256ni.S index 8f09478ec..018d90f01 100644 --- a/libc/nexgen32e/sha256ni.S +++ b/libc/nexgen32e/sha256ni.S @@ -75,7 +75,7 @@ Tim Chen \n" // void sha256_transform_ni(uint32_t digest[static 8], // const void *data, // int32_t numBlocks); -// +// // @param %rdi points to output digest // @param %rsi points to input data // @param %rdx is number of blocks to process diff --git a/libc/nt/nt/file.h b/libc/nt/nt/file.h index 2fb214b79..051f3bae3 100644 --- a/libc/nt/nt/file.h +++ b/libc/nt/nt/file.h @@ -64,7 +64,7 @@ NtStatus NtWriteFile(int64_t FileHandle, void *opt_Event, NtStatus NtDuplicateObject(int64_t SourceProcessHandle, void *SourceHandle, void *TargetProcessHandle, 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, struct NtIoStatusBlock *out_IoStatusBlock, diff --git a/libc/rand/poz.c b/libc/rand/poz.c index b8d6113d7..f96065696 100644 --- a/libc/rand/poz.c +++ b/libc/rand/poz.c @@ -83,7 +83,7 @@ poz(const double z) /*VAR normal z value */ #define BIGX 20.0 /* max value to represent 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. Adapted from: Hill, I. D. and Pike, M. C. Algorithm 299 diff --git a/libc/runtime/getinterpreterexecutablename.c b/libc/runtime/getinterpreterexecutablename.c index 51aa209e3..f9262f07a 100644 --- a/libc/runtime/getinterpreterexecutablename.c +++ b/libc/runtime/getinterpreterexecutablename.c @@ -26,7 +26,7 @@ #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 * absolute path of the first argument passed to `execve()`, what we do diff --git a/libc/runtime/morph.greg.c b/libc/runtime/morph.greg.c index 06135ad19..3538dc844 100644 --- a/libc/runtime/morph.greg.c +++ b/libc/runtime/morph.greg.c @@ -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 */ @@ -97,7 +97,7 @@ privileged void __morph_begin(void) { } /** - * Begins code morphing execuatble. + * Begins code morphing executable. */ privileged void __morph_end(void) { int ax; diff --git a/libc/sock/kntwsadata.c b/libc/sock/kntwsadata.c index b078756b1..9c635dce1 100644 --- a/libc/sock/kntwsadata.c +++ b/libc/sock/kntwsadata.c @@ -30,7 +30,7 @@ #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 * Berkeley Socket wrappers are linked. The latest version of Winsock diff --git a/libc/stdio/appendr.c b/libc/stdio/appendr.c index b29f0e067..ca64ac593 100644 --- a/libc/stdio/appendr.c +++ b/libc/stdio/appendr.c @@ -41,7 +41,7 @@ * filled with NUL characters. If `i` is less than the current length * 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. * * @return `i` or -1 if `ENOMEM` diff --git a/libc/stdio/fgets.c b/libc/stdio/fgets.c index 7bcb05ada..3c6040838 100644 --- a/libc/stdio/fgets.c +++ b/libc/stdio/fgets.c @@ -27,7 +27,7 @@ * * @param s is output buffer * @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 * zero characters have been read * @see fgets_unlocked() diff --git a/libc/stdio/fgets_unlocked.c b/libc/stdio/fgets_unlocked.c index 85d7ebc57..9870a22b0 100644 --- a/libc/stdio/fgets_unlocked.c +++ b/libc/stdio/fgets_unlocked.c @@ -28,7 +28,7 @@ * * @param s is output buffer * @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 * zero characters have been read */ diff --git a/libc/str/explicit_bzero.S b/libc/str/explicit_bzero.S index 96a707de0..85bceff5c 100644 --- a/libc/str/explicit_bzero.S +++ b/libc/str/explicit_bzero.S @@ -23,7 +23,7 @@ // This is intended for security-conscious applications. // // @param rdi is dest -// @param rsi is the number of bytes to set +// @param rsi is the number of bytes to set explicit_bzero: jmp bzero .endfn explicit_bzero,globl diff --git a/libc/stubs/gcov.S b/libc/stubs/gcov.S index c7f0598dd..8f7261345 100644 --- a/libc/stubs/gcov.S +++ b/libc/stubs/gcov.S @@ -20,7 +20,7 @@ // Magic words to unbreak build if GCOV flags are passed. -__gcov_init: +__gcov_init: ret .endfn __gcov_init,globl,weak @@ -28,7 +28,7 @@ __gcov_exit: ret .endfn __gcov_exit,globl,weak -__gcov_merge_add: +__gcov_merge_add: ret .endfn __gcov_merge_add,globl,weak diff --git a/libc/sysv/consts.sh b/libc/sysv/consts.sh index 6689a02fa..3d24dfe05 100755 --- a/libc/sysv/consts.sh +++ b/libc/sysv/consts.sh @@ -581,8 +581,8 @@ syscon sicode SYS_USER_DISPATCH 2 -1 -1 -1 -1 -1 # SIGSYS; syscall # sigaltstack() values # # 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 MINSIGSTKSZ 2048 32768 2048 12288 8192 2048 # overlayed with 32768; you need to #undef MINSIGSTKSZ 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 # 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_DISABLE 2 4 4 4 4 2 # bsd consensus diff --git a/libc/thread/mktls.c b/libc/thread/mktls.c index c6f1498c5..d527b4f0f 100644 --- a/libc/thread/mktls.c +++ b/libc/thread/mktls.c @@ -41,7 +41,7 @@ char *_mktls(char **out_tib) { // organized _Thread_local data, as well as Cosmpolitan Libc (64) if (!(tls = calloc(1, _MEMZ))) return 0; - // set up thread informaiton block + // set up thread information block tib = (cthread_t)(tls + _MEMZ - _TIBZ); tib->self = tib; tib->self2 = tib; diff --git a/libc/tinymath/cbrtc.c b/libc/tinymath/cbrtc.c index 011487f8e..066c6a392 100644 --- a/libc/tinymath/cbrtc.c +++ b/libc/tinymath/cbrtc.c @@ -52,7 +52,7 @@ double __cbrt(double x) { * 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 * 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 * exponent bias (1023 for doubles) and later add it back. We do the * subtraction virtually to keep e >= 0 so that ordinary integer diff --git a/libc/tinymath/gamma.c b/libc/tinymath/gamma.c index 39d0c2471..40b67b171 100644 --- a/libc/tinymath/gamma.c +++ b/libc/tinymath/gamma.c @@ -63,7 +63,7 @@ asm(".include \"libc/disclaimer.inc\""); * = log(6.3*5.3) + lgamma(5.3) * = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3) * 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 * Let z = x-ymin; * lgamma(x) = -1.214862905358496078218 + z^2*poly(z) diff --git a/libc/tinymath/lgamma_r.c b/libc/tinymath/lgamma_r.c index ac35db779..6f0a464c7 100644 --- a/libc/tinymath/lgamma_r.c +++ b/libc/tinymath/lgamma_r.c @@ -63,7 +63,7 @@ asm(".include \"libc/disclaimer.inc\""); * = log(6.3*5.3) + lgamma(5.3) * = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3) * 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 * Let z = x-ymin; * lgamma(x) = -1.214862905358496078218 + z^2*poly(z) diff --git a/libc/tinymath/rempio2large.c b/libc/tinymath/rempio2large.c index 93f2c8d49..f55dbdd12 100644 --- a/libc/tinymath/rempio2large.c +++ b/libc/tinymath/rempio2large.c @@ -79,14 +79,14 @@ asm(".include \"libc/disclaimer.inc\""); * 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: * 24-bit precision 1 * 53-bit precision 2 * 64-bit precision 2 * 113-bit precision 3 * 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; * 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 * recomputation test works. (Up to 24 bits in the integer * 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.) * * jz local integer variable indicating the number of diff --git a/libc/x/xsigaction.c b/libc/x/xsigaction.c index 3a64fda0f..dfd4a3596 100644 --- a/libc/x/xsigaction.c +++ b/libc/x/xsigaction.c @@ -43,7 +43,7 @@ int(xsigaction)(int sig, void *handler, uint64_t flags, uint64_t mask, struct sigaction *old) { /* This API is superior to sigaction() because (1) it offers feature 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; bzero(&sa, sizeof(sa)); sa.sa_handler = handler; diff --git a/test/libc/calls/fcntl_test.c b/test/libc/calls/fcntl_test.c index d368ca3a8..0292da9ec 100644 --- a/test/libc/calls/fcntl_test.c +++ b/test/libc/calls/fcntl_test.c @@ -47,7 +47,7 @@ TEST(fcntl_getfl, testRemembersAccessMode) { TEST(fcntl_setfl, testChangeAppendStatus) { 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; } int fd; diff --git a/test/libc/str/strcmp_test.c b/test/libc/str/strcmp_test.c index 61db28ee4..9863bf5ac 100644 --- a/test/libc/str/strcmp_test.c +++ b/test/libc/str/strcmp_test.c @@ -606,7 +606,7 @@ BENCH(memcmp, bench) { volatile char *copy = gc(strdup(kHyperion)); EZBENCH2("memcmp big", donothing, EXPROPRIATE(memcmp(kHyperion, copy, kHyperionSize))); - copy = gc(strdup("tought little ship")); + copy = gc(strdup("tough little ship")); EZBENCH2("memcmp 19", donothing, - EXPROPRIATE(memcmp("tought little ship", copy, 19))); + EXPROPRIATE(memcmp("tough little ship", copy, 19))); } diff --git a/test/net/http/parsehttprange_test.c b/test/net/http/parsehttprange_test.c index 27801b314..6a3f7e323 100644 --- a/test/net/http/parsehttprange_test.c +++ b/test/net/http/parsehttprange_test.c @@ -108,7 +108,7 @@ TEST(ParseHttpRange, testInvalidRange) { EXPECT_EQ(0, length); } -TEST(ParseHttpRange, testOverflow_duringIntepretation_doesntSetRanges) { +TEST(ParseHttpRange, testOverflow_duringInterpretation_doesntSetRanges) { long start, length; const char *s = "bytes=99-9223372036854775808"; EXPECT_FALSE(ParseHttpRange(s, strlen(s), 100, &start, &length)); diff --git a/test/net/http/parseurl_test.c b/test/net/http/parseurl_test.c index c4767de27..6011a8af5 100644 --- a/test/net/http/parseurl_test.c +++ b/test/net/http/parseurl_test.c @@ -257,7 +257,7 @@ TEST(ParseUrl, testEmptyParams_absentCanBeDiscerned) { ASSERT_NE(NULL, h.params.p); } -TEST(ParseUrl, testWeirdAmps_areReprodicible) { +TEST(ParseUrl, testWeirdAmps_areReproducible) { struct Url h; gc(ParseUrl("?&&", -1, &h)); gc(h.params.p); diff --git a/test/tool/plinko/library_test.lisp b/test/tool/plinko/library_test.lisp index 0661f9b32..62a56887e 100644 --- a/test/tool/plinko/library_test.lisp +++ b/test/tool/plinko/library_test.lisp @@ -217,6 +217,6 @@ (lambda (x) (lambda () x)))))) - ((error '(enclosed memory failed to propogate upward)))) + ((error '(enclosed memory failed to propagate upward)))) (ignore)) diff --git a/tool/decode/ent.c b/tool/decode/ent.c index 856989371..e4b9fab11 100644 --- a/tool/decode/ent.c +++ b/tool/decode/ent.c @@ -13,10 +13,10 @@ Terse mode output, getopt() command line processing, optional stdin input, and HTML documentation added in October 1998. - + Documentation for the -t (terse output) option added in July 2006. - + Replaced table look-up for chi square to probability conversion with algorithmic computation in January 2008.