Make numerous improvements

- Python static hello world now 1.8mb
- Python static fully loaded now 10mb
- Python HTTPS client now uses MbedTLS
- Python REPL now completes import stmts
- Increase stack size for Python for now
- Begin synthesizing posixpath and ntpath
- Restore Python \N{UNICODE NAME} support
- Restore Python NFKD symbol normalization
- Add optimized code path for Intel SHA-NI
- Get more Python unit tests passing faster
- Get Python help() pagination working on NT
- Python hashlib now supports MbedTLS PBKDF2
- Make memcpy/memmove/memcmp/bcmp/etc. faster
- Add Mersenne Twister and Vigna to LIBC_RAND
- Provide privileged __printf() for error code
- Fix zipos opendir() so that it reports ENOTDIR
- Add basic chmod() implementation for Windows NT
- Add Cosmo's best functions to Python cosmo module
- Pin function trace indent depth to that of caller
- Show memory diagram on invalid access in MODE=dbg
- Differentiate stack overflow on crash in MODE=dbg
- Add stb_truetype and tools for analyzing font files
- Upgrade to UNICODE 13 and reduce its binary footprint
- COMPILE.COM now logs resource usage of build commands
- Start implementing basic poll() support on bare metal
- Set getauxval(AT_EXECFN) to GetModuleFileName() on NT
- Add descriptions to strerror() in non-TINY build modes
- Add COUNTBRANCH() macro to help with micro-optimizations
- Make error / backtrace / asan / memory code more unbreakable
- Add fast perfect C implementation of μ-Law and a-Law audio codecs
- Make strtol() functions consistent with other libc implementations
- Improve Linenoise implementation (see also github.com/jart/bestline)
- COMPILE.COM now suppresses stdout/stderr of successful build commands
This commit is contained in:
Justine Tunney 2021-09-27 22:58:51 -07:00
parent fa7b4f5bd1
commit 39bf41f4eb
806 changed files with 77494 additions and 63859 deletions

View file

@ -233,7 +233,7 @@ void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) {
static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp,
int req_comp, stbi__result_info *ri, int bpc) {
memset(ri, 0, sizeof(*ri));
bzero(ri, sizeof(*ri));
ri->bits_per_channel = 8;
ri->num_channels = 0;
#ifndef STBI_NO_JPEG
@ -1028,7 +1028,7 @@ static optimizespeed int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64],
t = stbi__jpeg_huff_decode(j, hdc);
if (t < 0) return stbi__err("bad huffman code", "Corrupt JPEG");
// 0 all the ac values now so we can do it 32-bits at a time
memset(data, 0, 64 * sizeof(data[0]));
bzero(data, 64 * sizeof(data[0]));
diff = t ? stbi__extend_receive(j, t) : 0;
dc = j->img_comp[b].dc_pred + diff;
j->img_comp[b].dc_pred = dc;
@ -1077,7 +1077,7 @@ static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64],
if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
if (j->succ_high == 0) {
// first scan for DC coefficient, must be first
memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now
bzero(data, 64 * sizeof(data[0])); // 0 all the ac values now
t = stbi__jpeg_huff_decode(j, hdc);
diff = t ? stbi__extend_receive(j, t) : 0;
dc = j->img_comp[b].dc_pred + diff;
@ -1969,7 +1969,7 @@ static unsigned char *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y,
unsigned char *output;
unsigned char *coutput[4];
stbi__resample res_comp[4];
memset(coutput, 0, sizeof(coutput));
bzero(coutput, sizeof(coutput));
for (k = 0; k < decode_n; ++k) {
stbi__resample *r = &res_comp[k];
@ -2198,8 +2198,8 @@ static int stbi__zbuild_huffman(stbi__zhuffman *z,
int i, k = 0;
int code, next_code[16], sizes[17];
// DEFLATE spec for generating codes
memset(sizes, 0, sizeof(sizes));
memset(z->fast, 0, sizeof(z->fast));
bzero(sizes, sizeof(sizes));
bzero(z->fast, sizeof(z->fast));
for (i = 0; i < num; ++i) ++sizes[sizelist[i]];
sizes[0] = 0;
for (i = 1; i < 16; ++i)
@ -2378,14 +2378,12 @@ static int stbi__parse_huffman_block(stbi__zbuf *a) {
if (dist == 1) { // run of one byte; common in images.
unsigned char v = *p;
if (len) {
do
*zout++ = v;
do *zout++ = v;
while (--len);
}
} else {
if (len) {
do
*zout++ = *p++;
do *zout++ = *p++;
while (--len);
}
}
@ -2404,7 +2402,7 @@ static int stbi__compute_huffman_codes(stbi__zbuf *a) {
int hdist = stbi__zreceive(a, 5) + 1;
int hclen = stbi__zreceive(a, 4) + 4;
int ntot = hlit + hdist;
memset(codelength_sizes, 0, sizeof(codelength_sizes));
bzero(codelength_sizes, sizeof(codelength_sizes));
for (i = 0; i < hclen; ++i) {
int s = stbi__zreceive(a, 3);
codelength_sizes[length_dezigzag[i]] = (unsigned char)s;
@ -3700,11 +3698,11 @@ static unsigned char *stbi__gif_load_next(stbi__context *s, stbi__gif *g,
// the current background; background colour is only used for pixels that
// are not rendered first frame, after that "background" color refers to
// the color that was there the previous frame.
memset(g->out, 0x00, 4 * pcount);
memset(g->background, 0x00,
4 * pcount); // state of the background (starts transparent)
memset(g->history, 0x00,
pcount); // pixels that were affected previous frame
bzero(g->out, 4 * pcount);
bzero(g->background,
4 * pcount); // state of the background (starts transparent)
bzero(g->history,
pcount); // pixels that were affected previous frame
first_frame = 1;
} else {
// second frame - how do we dispoase of the previous one?
@ -3741,8 +3739,8 @@ static unsigned char *stbi__gif_load_next(stbi__context *s, stbi__gif *g,
}
// clear my history;
memset(g->history, 0x00,
g->w * g->h); // pixels that were affected previous frame
bzero(g->history,
g->w * g->h); // pixels that were affected previous frame
for (;;) {
int tag = stbi__get8(s);