diff --git a/build-all.sh b/build-all.sh index 4652bd70..f14ca2a3 100755 --- a/build-all.sh +++ b/build-all.sh @@ -15,8 +15,8 @@ # ---------------- -# This script, build-all.sh, is a simple sanity check that the tests pass and -# the example programs (including fuzz programs) compile. +# This script, build-all.sh, is a simple coherence check that the tests pass +# and the example programs (including fuzz programs) compile. # # If you're just looking to get started with Wuffs, running this script isn't # necessary (as Wuffs doesn't have the "configure; make; make install" dance or diff --git a/cmd/ractool/main.go b/cmd/ractool/main.go index 906496c4..41b2ae34 100644 --- a/cmd/ractool/main.go +++ b/cmd/ractool/main.go @@ -461,8 +461,8 @@ func decode(inFile *os.File) error { if !*singlethreadedFlag { n := runtime.NumCPU() - // After 16 workers, we seem to hit diminishing speed returns, but - // still face increasing memory costs. + // After 16 workers, we see diminishing speed returns, but still face + // increasing memory costs. if n > 16 { n = 16 } diff --git a/doc/getting-started.md b/doc/getting-started.md index 6e1e4829..4fac53c7 100644 --- a/doc/getting-started.md +++ b/doc/getting-started.md @@ -71,7 +71,7 @@ libpng for PNG, etc. If your library change is an optimization, run `wuffs bench` or `wuffs bench -mimic` both before and after your change to quantify the improvement. The -mimic benchmark numbers shouldn't change if you're only changing `.wuffs` -code, but seeing zero change in those numbers is a sanity check on any -unrelated system variance, such as software updates or virus checkers running -in the background. +mimic benchmark numbers shouldn't change if you're only changing `.wuffs` code, +but seeing zero change in those numbers is a coherence check on any unrelated +system variance, such as software updates or virus checkers running in the +background. diff --git a/doc/note/hermeticity.md b/doc/note/hermeticity.md index a98fa0bc..30429fa8 100644 --- a/doc/note/hermeticity.md +++ b/doc/note/hermeticity.md @@ -79,13 +79,13 @@ code](https://github.com/google/wuffs/blob/master/doc/benchmarks.md) (albeit requiring re-writing those libraries). -## Termination +## Halting -Wuffs functions are not guaranteed to terminate. We do not solve the [Halting +Wuffs functions are not guaranteed to halt. We do not solve the [Halting Problem](https://en.wikipedia.org/wiki/Halting_problem). Furthermore, while -there is a difference in theory between a function that doesn't terminate and -one that terminates in 99 years, in practice there is not. Systems that already -need to cope with the latter can also cope with the former. +there is a difference in theory between a function that doesn't halt and one +that halts in 99 years, in practice there is not. Systems that already need to +cope with the latter can also cope with the former. ## Timing and Other Attacks diff --git a/example/cbor-to-json/cbor-to-json.cc b/example/cbor-to-json/cbor-to-json.cc index e08e64c0..f29444b0 100644 --- a/example/cbor-to-json/cbor-to-json.cc +++ b/example/cbor-to-json/cbor-to-json.cc @@ -47,8 +47,8 @@ for a C++ compiler $CXX, such as clang++ or g++. #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/example/convert-to-nia/convert-to-nia.c b/example/convert-to-nia/convert-to-nia.c index 0c0f2485..c690f5ef 100644 --- a/example/convert-to-nia/convert-to-nia.c +++ b/example/convert-to-nia/convert-to-nia.c @@ -40,8 +40,8 @@ https://skia-review.googlesource.com/c/skia/+/290618 #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/example/gifplayer/gifplayer.c b/example/gifplayer/gifplayer.c index 039f730b..f692792c 100644 --- a/example/gifplayer/gifplayer.c +++ b/example/gifplayer/gifplayer.c @@ -72,8 +72,8 @@ micros_since_start(struct timespec* now) { #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/example/imageviewer/imageviewer.c b/example/imageviewer/imageviewer.c index f9e3bb9d..87c1779d 100644 --- a/example/imageviewer/imageviewer.c +++ b/example/imageviewer/imageviewer.c @@ -45,8 +45,8 @@ The Escape key quits. #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/example/json-to-cbor/json-to-cbor.cc b/example/json-to-cbor/json-to-cbor.cc index c0408dda..3c533220 100644 --- a/example/json-to-cbor/json-to-cbor.cc +++ b/example/json-to-cbor/json-to-cbor.cc @@ -47,8 +47,8 @@ for a C++ compiler $CXX, such as clang++ or g++. #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/example/jsonfindptrs/jsonfindptrs.cc b/example/jsonfindptrs/jsonfindptrs.cc index bc766a93..332883c4 100644 --- a/example/jsonfindptrs/jsonfindptrs.cc +++ b/example/jsonfindptrs/jsonfindptrs.cc @@ -79,8 +79,8 @@ for a C++ compiler $CXX, such as clang++ or g++. #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/example/jsonptr/jsonptr.cc b/example/jsonptr/jsonptr.cc index d67e5eac..baf2b3f1 100644 --- a/example/jsonptr/jsonptr.cc +++ b/example/jsonptr/jsonptr.cc @@ -115,8 +115,8 @@ for a C++ compiler $CXX, such as clang++ or g++. #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/example/zcat/zcat.c b/example/zcat/zcat.c index d1cefba0..7ff327da 100644 --- a/example/zcat/zcat.c +++ b/example/zcat/zcat.c @@ -36,8 +36,8 @@ for a C compiler $CC, such as clang or gcc. #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/fuzz/c/std/bmp_fuzzer.c b/fuzz/c/std/bmp_fuzzer.c index 7be150a3..139e1093 100644 --- a/fuzz/c/std/bmp_fuzzer.c +++ b/fuzz/c/std/bmp_fuzzer.c @@ -22,7 +22,7 @@ This fuzzer (the fuzz function) is typically run indirectly, by a framework such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput. -When working on the fuzz implementation, or as a sanity check, defining +When working on the fuzz implementation, or as a coherence check, defining WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files: gcc -DWUFFS_CONFIG__FUZZLIB_MAIN bmp_fuzzer.c @@ -43,8 +43,8 @@ It should print "PASS", amongst other information, and exit(0). #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/fuzz/c/std/cbor_fuzzer.c b/fuzz/c/std/cbor_fuzzer.c index 4dd65068..1df5b555 100644 --- a/fuzz/c/std/cbor_fuzzer.c +++ b/fuzz/c/std/cbor_fuzzer.c @@ -22,7 +22,7 @@ This fuzzer (the fuzz function) is typically run indirectly, by a framework such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput. -When working on the fuzz implementation, or as a sanity check, defining +When working on the fuzz implementation, or as a coherence check, defining WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files: gcc -DWUFFS_CONFIG__FUZZLIB_MAIN cbor_fuzzer.c @@ -43,8 +43,8 @@ It should print "PASS", amongst other information, and exit(0). #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such @@ -401,7 +401,7 @@ fuzz(wuffs_base__io_buffer* full_src, uint64_t hash) { // // The fuzz_simple implementation shows how easy decoding with Wuffs is when // all you want is to run LLVMFuzzerTestOneInput's built-in (Wuffs API - // agnostic) checks (e.g. the ASan address sanitizer) and you don't really + // independent) checks (e.g. the ASan address sanitizer) and you don't really // care what the output is, just that it doesn't crash. // // The fuzz_complex implementation adds many more Wuffs API specific checks diff --git a/fuzz/c/std/gif_fuzzer.c b/fuzz/c/std/gif_fuzzer.c index 0f5de60a..cf58b33c 100644 --- a/fuzz/c/std/gif_fuzzer.c +++ b/fuzz/c/std/gif_fuzzer.c @@ -22,7 +22,7 @@ This fuzzer (the fuzz function) is typically run indirectly, by a framework such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput. -When working on the fuzz implementation, or as a sanity check, defining +When working on the fuzz implementation, or as a coherence check, defining WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files: gcc -DWUFFS_CONFIG__FUZZLIB_MAIN gif_fuzzer.c @@ -43,8 +43,8 @@ It should print "PASS", amongst other information, and exit(0). #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/fuzz/c/std/json_fuzzer.c b/fuzz/c/std/json_fuzzer.c index 2e1fa2c3..0c226784 100644 --- a/fuzz/c/std/json_fuzzer.c +++ b/fuzz/c/std/json_fuzzer.c @@ -22,7 +22,7 @@ This fuzzer (the fuzz function) is typically run indirectly, by a framework such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput. -When working on the fuzz implementation, or as a sanity check, defining +When working on the fuzz implementation, or as a coherence check, defining WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files: gcc -DWUFFS_CONFIG__FUZZLIB_MAIN json_fuzzer.c @@ -43,8 +43,8 @@ It should print "PASS", amongst other information, and exit(0). #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such @@ -421,7 +421,7 @@ fuzz(wuffs_base__io_buffer* full_src, uint64_t hash) { // // The fuzz_simple implementation shows how easy decoding with Wuffs is when // all you want is to run LLVMFuzzerTestOneInput's built-in (Wuffs API - // agnostic) checks (e.g. the ASan address sanitizer) and you don't really + // independent) checks (e.g. the ASan address sanitizer) and you don't really // care what the output is, just that it doesn't crash. // // The fuzz_complex implementation adds many more Wuffs API specific checks diff --git a/fuzz/c/std/png_fuzzer.c b/fuzz/c/std/png_fuzzer.c index 33b4d2e1..1191fda0 100644 --- a/fuzz/c/std/png_fuzzer.c +++ b/fuzz/c/std/png_fuzzer.c @@ -22,7 +22,7 @@ This fuzzer (the fuzz function) is typically run indirectly, by a framework such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput. -When working on the fuzz implementation, or as a sanity check, defining +When working on the fuzz implementation, or as a coherence check, defining WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files: gcc -DWUFFS_CONFIG__FUZZLIB_MAIN png_fuzzer.c @@ -43,8 +43,8 @@ It should print "PASS", amongst other information, and exit(0). #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/fuzz/c/std/zlib_fuzzer.c b/fuzz/c/std/zlib_fuzzer.c index c6167b91..428c5e7e 100644 --- a/fuzz/c/std/zlib_fuzzer.c +++ b/fuzz/c/std/zlib_fuzzer.c @@ -22,7 +22,7 @@ This fuzzer (the fuzz function) is typically run indirectly, by a framework such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput. -When working on the fuzz implementation, or as a sanity check, defining +When working on the fuzz implementation, or as a coherence check, defining WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files: gcc -DWUFFS_CONFIG__FUZZLIB_MAIN zlib_fuzzer.c @@ -43,8 +43,8 @@ It should print "PASS", amongst other information, and exit(0). #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/internal/cgen/cgen.go b/internal/cgen/cgen.go index 8973e58d..74da71e7 100644 --- a/internal/cgen/cgen.go +++ b/internal/cgen/cgen.go @@ -678,7 +678,7 @@ func (g *gen) genIncludes(b *buffer) error { useDirname := g.tm.ByID(tld.AsUse().Path()) useDirname, _ = t.Unescape(useDirname) - // TODO: sanity check useDirname via commonflags.IsValidUsePath? + // TODO: coherence check useDirname via commonflags.IsValidUsePath? if _, ok := usesMap[useDirname]; ok { continue diff --git a/lang/generate/generate.go b/lang/generate/generate.go index 65441770..108dfd1e 100644 --- a/lang/generate/generate.go +++ b/lang/generate/generate.go @@ -86,7 +86,7 @@ func checkPackageName(s string) string { return "" } s = strings.ToLower(s) - // Blacklist certain package names. + // Deny certain package names. switch s { case "base", "base_private", "base_private_header", "base_public", "base_public_header", "config", "implementation", "include_guard", "initialize", "version": diff --git a/lang/token/list.go b/lang/token/list.go index ea3af927..ae05d9c1 100644 --- a/lang/token/list.go +++ b/lang/token/list.go @@ -808,7 +808,7 @@ var builtInsByID = [nBuiltInIDs]string{ // specifically non-ASCII so that no user-defined (non built-in) identifier // will conflict with them. - // IDDaggerN is used by the type checker as a dummy-valued built-in ID to + // IDDaggerN is used by the type checker as a placeholder built-in ID to // represent a generic type. IDT1: "T1", IDT2: "T2", diff --git a/lib/compression/compression.go b/lib/compression/compression.go index e22a7975..3f68f6f9 100644 --- a/lib/compression/compression.go +++ b/lib/compression/compression.go @@ -75,7 +75,7 @@ const ( gap = 1 << 10 ) -// Interpolate translates from Level (a codec-agnostic concept) to a +// Interpolate translates from Level (a codec-independent concept) to a // codec-specific compression level numbering scheme. For exampe, a zlib // package might translate LevelFastest to 1 and LevelSmallest to 9 by calling // Interpolate(1, 2, 6, 9, 9). diff --git a/lib/rac/reader.go b/lib/rac/reader.go index 8b2c89b1..5c1273ba 100644 --- a/lib/rac/reader.go +++ b/lib/rac/reader.go @@ -114,7 +114,7 @@ type Reader struct { // // - "State B" (decompressor is non-zero, inImplicitZeroes is zero): a RAC // chunk is loaded, but not fully exhausted: decompressing the e.g. zlib - // stream has not hit io.EOF yet. + // stream has not seen io.EOF yet. // // - "State C" (decompressor is zero, inImplicitZeroes is non-zero): a RAC // chunk was exhausted, and we now serve the implicit NUL bytes after a diff --git a/script/bench-rust-gif-dot-rs/src/main.rs b/script/bench-rust-gif-dot-rs/src/main.rs index 9210093c..e3d2e99f 100644 --- a/script/bench-rust-gif-dot-rs/src/main.rs +++ b/script/bench-rust-gif-dot-rs/src/main.rs @@ -98,7 +98,7 @@ fn main() { } fn decode(dst: &mut [u8], src: &[u8]) { - // Set up the hard-coded sanity check, executed below. + // Set up the hard-coded coherence check, executed below. dst[0] = 0xFE; dst[NUM_BYTES - 1] = 0xFE; @@ -123,7 +123,7 @@ fn decode(dst: &mut [u8], src: &[u8]) { panic!("wrong num_bytes") } - // A hard-coded sanity check that we decoded the pixel data correctly. + // A hard-coded coherence check that we decoded the pixel data correctly. if (dst[0] != FIRST_PIXEL) || (dst[NUM_BYTES - 1] != LAST_PIXEL) { panic!("wrong dst pixels") } diff --git a/script/crawl.go b/script/crawl.go index 4d2ef403..d82dc34c 100644 --- a/script/crawl.go +++ b/script/crawl.go @@ -101,7 +101,7 @@ func main1() error { urlsChan <- u } close(urlsChan) - log.Printf("master: no more work (inlimit is %d)", *inlimitFlag) + log.Printf("controller: no more work (inlimit is %d)", *inlimitFlag) wg.Wait() return flush(global.manifest.m) diff --git a/script/extract-deflate-offsets.go b/script/extract-deflate-offsets.go index 645b6486..3215d1fa 100644 --- a/script/extract-deflate-offsets.go +++ b/script/extract-deflate-offsets.go @@ -110,7 +110,7 @@ func decode(filename string) error { return fmt.Errorf("TODO: support gzip HCRC flag") } - // As a sanity check, the result should be valid deflate. + // As a coherence check, the result should be valid deflate. uncompressed, err := checkDeflate(src[i:]) if err != nil { return err @@ -161,7 +161,7 @@ func doWriteZlib(deflateCompressed []byte, uncompressed []byte, filename string) asZlib := buf.Bytes() - // As a sanity check, the result should be valid zlib. + // As a coherence check, the result should be valid zlib. if _, err := checkZlib(asZlib); err != nil { return err } diff --git a/script/manual-test-parse-number-f64.cc b/script/manual-test-parse-number-f64.cc index efe7c6df..c11f27dc 100644 --- a/script/manual-test-parse-number-f64.cc +++ b/script/manual-test-parse-number-f64.cc @@ -38,8 +38,8 @@ #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/script/print-deflate-huff-table-size.go b/script/print-deflate-huff-table-size.go index 7082f5a8..90e6c6b9 100644 --- a/script/print-deflate-huff-table-size.go +++ b/script/print-deflate-huff-table-size.go @@ -453,7 +453,7 @@ func (a *nAssignedCodes) fillPrimaryValues(primLen uint32) { panic("did not finish with one unassigned zero-length code") } - // As a sanity check of the "negative two's complement" theory, loop + // As a coherence check of the "negative two's complement" theory, loop // forwards to calculate the number of unassigned primLen length codes, // which should match nUnassignedPrimLen. nUnassigned := uint32(1) diff --git a/script/print-json-token-debug-format.c b/script/print-json-token-debug-format.c index 79a7bb72..14af8178 100644 --- a/script/print-json-token-debug-format.c +++ b/script/print-json-token-debug-format.c @@ -74,8 +74,8 @@ #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/script/process-json-numbers.c b/script/process-json-numbers.c index f4a781f2..e44a6dcc 100644 --- a/script/process-json-numbers.c +++ b/script/process-json-numbers.c @@ -53,8 +53,8 @@ #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/std/bmp/decode_bmp.wuffs b/std/bmp/decode_bmp.wuffs index 9115b084..18cfa08a 100644 --- a/std/bmp/decode_bmp.wuffs +++ b/std/bmp/decode_bmp.wuffs @@ -1157,8 +1157,8 @@ pub func decoder.tell_me_more?(dst: base.io_writer, minfo: nptr base.more_inform y: this.io_redirect_pos, z: 0xFFFF_FFFF_FFFF_FFFF) } - // Setting io_redirect_fourcc to a dummy value of 1 will cause future calls - // to return an error. + // Setting io_redirect_fourcc to a placeholder value of 1 will cause future + // calls to return an error. this.io_redirect_fourcc = 1 } diff --git a/std/lzw/README.md b/std/lzw/README.md index 1d3bab37..3e2a439b 100644 --- a/std/lzw/README.md +++ b/std/lzw/README.md @@ -175,7 +175,7 @@ When copying the suffix to a buffer (either an intermediate buffer or a final buffer), it is often unnecessary to copy *exactly* suffix length bytes, provided that there is enough destination buffer space for all Q bytes. Even if we write excess bytes, decoding subsequent codes will overwrite the excess, or -else we'll hit an end code and the excess will be ignored. Again, on modern +else we'll get an end code and the excess will be ignored. Again, on modern CPUs, it can be faster to write *at least 7* bytes (i.e. *exactly 8*) than to write *exactly 7*. diff --git a/test/c/std/adler32.c b/test/c/std/adler32.c index 61140244..a6e141ec 100644 --- a/test/c/std/adler32.c +++ b/test/c/std/adler32.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/bmp.c b/test/c/std/bmp.c index 1a8cc74a..fbb8f022 100644 --- a/test/c/std/bmp.c +++ b/test/c/std/bmp.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/cbor.c b/test/c/std/cbor.c index fdf6603a..8592280f 100644 --- a/test/c/std/cbor.c +++ b/test/c/std/cbor.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/crc32.c b/test/c/std/crc32.c index f3df3678..f4f8967e 100644 --- a/test/c/std/crc32.c +++ b/test/c/std/crc32.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/deflate.c b/test/c/std/deflate.c index 42242cd1..022534cd 100644 --- a/test/c/std/deflate.c +++ b/test/c/std/deflate.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/gif.c b/test/c/std/gif.c index 6880eece..f20f596f 100644 --- a/test/c/std/gif.c +++ b/test/c/std/gif.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/gzip.c b/test/c/std/gzip.c index 0ae81580..fe4745ea 100644 --- a/test/c/std/gzip.c +++ b/test/c/std/gzip.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/json.c b/test/c/std/json.c index 739f63d3..59ddd9b4 100644 --- a/test/c/std/json.c +++ b/test/c/std/json.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/lzw.c b/test/c/std/lzw.c index 53df1b84..6cc411f7 100644 --- a/test/c/std/lzw.c +++ b/test/c/std/lzw.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/nie.c b/test/c/std/nie.c index c6c3be8c..8958ce15 100644 --- a/test/c/std/nie.c +++ b/test/c/std/nie.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/png.c b/test/c/std/png.c index 7d3e7b32..278dfa30 100644 --- a/test/c/std/png.c +++ b/test/c/std/png.c @@ -52,8 +52,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/std/wbmp.c b/test/c/std/wbmp.c index cfcbebf4..388297c8 100644 --- a/test/c/std/wbmp.c +++ b/test/c/std/wbmp.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such @@ -107,7 +107,7 @@ test_wuffs_pixel_swizzler_swizzle() { const uint32_t width = 22; const uint32_t height = 5; - uint8_t dummy_palette_array[1024]; + uint8_t fallback_palette_array[1024]; wuffs_base__pixel_swizzler swizzler; const struct { @@ -221,8 +221,8 @@ test_wuffs_pixel_swizzler_swizzle() { wuffs_base__pixel_buffer__palette(&dst_pixbuf); if (dst_palette.len == 0) { dst_palette = wuffs_base__make_slice_u8( - &dummy_palette_array[0], - WUFFS_TESTLIB_ARRAY_SIZE(dummy_palette_array)); + &fallback_palette_array[0], + WUFFS_TESTLIB_ARRAY_SIZE(fallback_palette_array)); } int b; diff --git a/test/c/std/zlib.c b/test/c/std/zlib.c index e36e6a43..5107a359 100644 --- a/test/c/std/zlib.c +++ b/test/c/std/zlib.c @@ -48,8 +48,8 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the #define WUFFS_IMPLEMENTATION // Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of -// release/c/etc.c whitelist which parts of Wuffs to build. That file contains -// the entire Wuffs standard library, implementing a variety of codecs and file +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file // formats. Without this macro definition, an optimizing compiler or linker may // very well discard Wuffs code for unused codecs, but listing the Wuffs // modules we use makes that process explicit. Preprocessing means that such diff --git a/test/c/testlib/testlib.c b/test/c/testlib/testlib.c index ac0325d8..d3a90ea3 100644 --- a/test/c/testlib/testlib.c +++ b/test/c/testlib/testlib.c @@ -677,18 +677,18 @@ read_file(wuffs_base__io_buffer* dst, const char* path) { errno); } - uint8_t dummy[1]; + uint8_t placeholder[1]; uint8_t* ptr = dst->data.ptr + dst->meta.wi; size_t len = dst->data.len - dst->meta.wi; while (true) { if (!len) { // We have read all that dst can hold. Check that we have read the full // file by trying to read one more byte, which should fail with EOF. - ptr = dummy; + ptr = placeholder; len = 1; } size_t n = fread(ptr, 1, len, f); - if (ptr != dummy) { + if (ptr != placeholder) { ptr += n; len -= n; dst->meta.wi += n;