Nigel Tao
f4c2d4652e
Fix test/data/animated-red-blue.apng loop count
...
The diff of the "hd" hex dump shows that the acTL chunk's nominal loop
count changed from 2 to 3. The 4-byte CRC-32 checksum was also updated.
00000000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 |.PNG........IHDR|
00000010 00 00 00 40 00 00 00 30 08 02 00 00 00 2e 29 eb |...@...0......).|
00000020 48 00 00 00 08 61 63 54 4c 00 00 00 04 00 00 00 |H....acTL.......|
-00000030 02 92 c3 07 fc 00 00 00 06 74 52 4e 53 00 00 00 |.........tRNS...|
+00000030 03 e5 c4 37 6a 00 00 00 06 74 52 4e 53 00 00 00 |...7j....tRNS...|
00000040 00 00 10 73 11 17 f5 00 00 00 1a 66 63 54 4c 00 |...s.......fcTL.|
00000050 00 00 00 00 00 00 40 00 00 00 30 00 00 00 00 00 |......@...0.....|
00000060 00 00 00 00 0a 00 64 00 00 80 50 f1 a2 00 00 03 |......d...P.....|
2021-11-07 10:43:32 +11:00
Nigel Tao
ca76a01ac2
Have std/png support remapped transparency
2021-11-07 09:51:04 +11:00
Nigel Tao
00b329872a
Tighten png.INTERLACING type refinement
2021-11-06 09:54:56 +11:00
Nigel Tao
0a7168fd64
Add test/data/*.apng
2021-11-05 22:28:08 +11:00
Nigel Tao
f854646586
Fix -Wshadow warnings
2021-11-05 17:51:22 +11:00
Nigel Tao
f148f5c5b3
Make "// - etc" bullet point comments consistent
2021-11-05 16:50:38 +11:00
Nigel Tao
750df217dd
Rename deprecated ETC__FLAVOR__METADATA
2021-11-05 16:48:58 +11:00
Nigel Tao
744fbdd732
Have std/png decode iCCP chunks
...
Updates #39
2021-11-05 16:29:11 +11:00
Nigel Tao
0854344580
Add wuffs_aux::sync_io::DynIOBuffer
2021-11-04 22:58:45 +11:00
Nigel Tao
d5075c7e94
Push "int i" into "for (int i = etc; etc; etc)"
2021-11-02 14:07:58 +11:00
Nigel Tao
16b51dd2a4
Fix -Wshadow warnings
2021-10-31 16:27:47 +11:00
Nigel Tao
badce3ffa4
Tweak magic_number_guess_fourcc negative codes
2021-10-31 16:27:17 +11:00
Nigel Tao
f40ef01244
Have make-red-blue-gradient use iCCP profile name
2021-10-31 15:35:14 +11:00
Nigel Tao
8f9a4f40c2
Rename METADATA_RAW as METADATA_RAW_PASSTHROUGH
2021-10-31 15:17:46 +11:00
Nigel Tao
c754f81634
Have wuffs_aux::DecodeImage report ICCP, XMP
2021-10-31 15:09:55 +11:00
Nigel Tao
a9a6332be2
Have etc__magic_number_guess_fourcc find ICO
2021-10-22 15:51:44 +11:00
Nigel Tao
d557bc3836
Embiggen test/data/red-blue-gradient.*.png
2021-10-22 09:23:49 +11:00
Nigel Tao
01a5b8842b
Update test/nia-checksums-of-data.txt
2021-10-20 19:38:43 +11:00
Nigel Tao
35cb4df973
Rename test/data/red-blue-gradient.dcip3d65.png
2021-10-20 19:38:24 +11:00
Nigel Tao
15b6285d1c
Add example/imageviewer -screen_gamma=N.N flag
2021-10-20 15:42:26 +11:00
Nigel Tao
6ea3144379
Add test/data/checkerboard.*.png
2021-10-20 09:58:42 +11:00
Nigel Tao
b003f9fe65
Let wuffs_aux::DecodeImage handle metadata
...
Updates #39
2021-10-19 22:09:21 +11:00
Nigel Tao
d259f7a579
Fix json_fuzzer for wuffs_aux::FooArgBar types
2021-10-18 00:46:50 +11:00
Nigel Tao
2b7b6e12ea
Add wuffs_aux::DecodeImageArgQuirks
2021-10-18 00:40:11 +11:00
Nigel Tao
ca33506c01
Add wuffs_aux::FooArgBar types for optional args
...
Prior to this commit, with a "wuffs_aux::Foo(x, y, 0, 0, 4, 5)" call,
with arguments after "y" optional, it was not a compile-time error to
give the wrong number of "0"s or to transpose "4" and "5".
2021-10-18 00:25:13 +11:00
Nigel Tao
0460bfcd7a
Add FourCC comment
2021-10-17 23:18:58 +11:00
Nigel Tao
9437d1a265
Tighten magic number guessing for WBMP
2021-10-17 22:57:42 +11:00
Nigel Tao
2e821791a9
Update test/nia-checksums-of-data.txt
2021-10-17 13:08:24 +11:00
Nigel Tao
e317f04bfd
Add defined(__clang__) to defined(__GNUC__) checks
2021-10-17 12:14:54 +11:00
Nigel Tao
db5a407bab
Have std/png decode sRGB chunks
...
Updates #39
2021-10-16 09:27:30 +11:00
Nigel Tao
9323549eeb
Update doc/changelog.md
2021-10-15 16:34:04 +11:00
Nigel Tao
911049e9f9
Have std/png decode cHRM and gAMA chunks
...
Updates #39
2021-10-15 15:08:47 +11:00
Nigel Tao
ae9ca94501
Fix etc__more_information__metadata_parsed__chrm
2021-10-15 14:15:39 +11:00
Nigel Tao
d8ad363ef5
Tweak png.decoder.decode_image_config indentation
2021-10-15 13:35:15 +11:00
Nigel Tao
e6733aec19
Add test/data/red-blue-gradient.dcip3d65.png
2021-10-15 11:29:26 +11:00
Nigel Tao
ad1d983698
Add ETC__MORE_INFORMATION__FLAVOR__METADATA_PARSED
2021-10-14 17:17:11 +11:00
Nigel Tao
dbc209dd7e
Add test/data/red-blue-gradient.*.png
2021-10-14 15:58:03 +11:00
Nigel Tao
1a94a6f1b3
Choose fuzzer's static-ness on program vs library
...
Some sanitizers don't work well with static functions.
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39767
2021-10-10 10:46:05 +11:00
Nigel Tao
34e2786dd2
wuffs gen -version=0.3.0-beta.10
2021-10-07 17:03:51 +11:00
Nigel Tao
5a4dd303f0
Remove hippopotamus.interlaced.png "wuffs test"
...
Coverage now comes from build-all.sh's nia-checksums-of-data.txt test.
2021-10-07 16:52:17 +11:00
Nigel Tao
62125d8967
Add test/nia-checksums-of-data.txt
2021-10-07 16:49:38 +11:00
Nigel Tao
eb6703425a
Tweak build-*.sh "Wuffs root directory" check
2021-10-07 14:59:13 +11:00
Nigel Tao
6fb7697b4a
Have scripts use WUFFS_CONFIG__STATIC_FUNCTIONS
2021-10-07 14:36:35 +11:00
Nigel Tao
55784030e4
Have fuzzers use WUFFS_CONFIG__STATIC_FUNCTIONS
...
Compile time:
$ time ./build-fuzz.sh
Before: user 0m36.656s
After: user 0m18.534s
2021-10-07 14:26:08 +11:00
Nigel Tao
feb050b418
Add CFLAGS, CXXFLAGS, LDFLAGS to build-fuzz.sh
2021-10-07 14:12:16 +11:00
Nigel Tao
f9c029c788
Fix std/png history_position for interlacing
2021-10-07 13:52:40 +11:00
Nigel Tao
90d3232eae
Let example/imageviewer minify (negative zoom)
2021-10-07 12:59:38 +11:00
Nigel Tao
2945ef2b29
Have example/imageviewer avoid big xcb_image_put's
2021-10-07 12:35:12 +11:00
Nigel Tao
ea4c85bfa2
Add comment re previous commit (strip examples)
2021-10-04 23:37:37 +11:00
Nigel Tao
41fce8a8de
Strip examples of unused data and functions
...
Compile time:
$ time ./build-example.sh
Before: user 0m40.885s
After: user 0m41.011s
Binary size (for example-toy-genlib):
$ ls -l gen/bin/example-toy-genlib) | awk '{print $5}'
Before: 830168
After: 809896
Note that the majority of this is a statically linked libc.
Binary size (excluding the statically linked example-toy-genlib):
$ ls -l gen/bin/example-* | awk '{print $5 " " $9}'
Before:
85280 gen/bin/example-cbor-to-json
242216 gen/bin/example-convert-to-nia
37112 gen/bin/example-crc32
53328 gen/bin/example-gifplayer
282840 gen/bin/example-imageviewer
95152 gen/bin/example-json-to-cbor
122720 gen/bin/example-jsonfindptrs
60448 gen/bin/example-jsonptr
267672 gen/bin/example-sdl-imageviewer
64792 gen/bin/example-zcat
After:
73104 gen/bin/example-cbor-to-json
231560 gen/bin/example-convert-to-nia
34640 gen/bin/example-crc32
47632 gen/bin/example-gifplayer
269632 gen/bin/example-imageviewer
83032 gen/bin/example-json-to-cbor
118664 gen/bin/example-jsonfindptrs
58040 gen/bin/example-jsonptr
253424 gen/bin/example-sdl-imageviewer
58200 gen/bin/example-zcat
Before total: 1311560
After total: 1227928
2021-10-04 13:28:42 +11:00
Nigel Tao
9699c49f55
Have example/crc32 use WUFFS_CONFIG__MODULES
...
Compile time:
$ time ./build-example.sh example/crc32
Before: user 10.637s
After: user 1.314s
Binary size:
$ ls -l gen/bin/example-crc32 | awk '{print $5}'
Before: 344744
After: 37112
2021-10-04 13:03:27 +11:00
Nigel Tao
7f9f37ce5a
Have examples use WUFFS_CONFIG__STATIC_FUNCTIONS
...
Compile time:
$ time ./build-example.sh
Before: user 1m15.750s
After: user 0m50.343s
Binary size (excluding the statically linked example-toy-genlib):
$ ls -l gen/bin/example-* | awk '{print $5 " " $9}'
Before:
212624 gen/bin/example-cbor-to-json
284192 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
184304 gen/bin/example-gifplayer
324952 gen/bin/example-imageviewer
209632 gen/bin/example-json-to-cbor
241432 gen/bin/example-jsonfindptrs
196320 gen/bin/example-jsonptr
309768 gen/bin/example-sdl-imageviewer
200704 gen/bin/example-zcat
After:
85280 gen/bin/example-cbor-to-json
242216 gen/bin/example-convert-to-nia
344744 gen/bin/example-crc32
53328 gen/bin/example-gifplayer
282840 gen/bin/example-imageviewer
95152 gen/bin/example-json-to-cbor
122720 gen/bin/example-jsonfindptrs
60448 gen/bin/example-jsonptr
267672 gen/bin/example-sdl-imageviewer
64792 gen/bin/example-zcat
Before total: 2508672
After total: 1619192
2021-10-04 12:35:32 +11:00
Nigel Tao
774340ae27
Add CFLAGS, CXXFLAGS, LDFLAGS to build-example.sh
2021-10-04 12:31:34 +11:00
Nigel Tao
7753368324
Add const to example/imageviewer zooms variable
2021-10-04 09:33:33 +11:00
Nigel Tao
8eaa222592
Add example/imageviewer zoom and filter
2021-10-03 16:42:58 +11:00
Nigel Tao
1cf0df9da4
Tweak example{,sdl-}imageviewer
2021-10-03 15:30:04 +11:00
Nigel Tao
68acf24515
Remove Makefiles
...
They don't work for me (on Debian bullseye). For example, from the
example/sdl-imageviewer directory:
$ make
g++ -lSDL2 -lSDL2_image sdl-imageviewer.cc -o sdl-imageviewer
/usr/bin/ld: /tmp/cciX1mj2.o: in function `draw(SDL_Window*)':
sdl-imageviewer.cc:(.text+0x36e44): undefined reference to `SDL_GetWindowSurface'
/usr/bin/ld: sdl-imageviewer.cc:(.text+0x36e69): undefined reference to `SDL_CreateRenderer'
/usr/bin/ld: sdl-imageviewer.cc:(.text+0x36e79): undefined reference to `SDL_RenderClear'
etc
collect2: error: ld returned 1 exit status
make: *** [<builtin>: sdl-imageviewer] Error 1
Swapping the g++ args around to
g++ sdl-imageviewer.cc -lSDL2 -lSDL2_image -o sdl-imageviewer
works, but the recommended approach is to use the existing top-level
build-example.sh script instead.
2021-10-03 14:06:16 +11:00
Nigel Tao
2453a8d52a
Run "clang-format-9 -style=Chromium"
...
Also replace /*...*/ comments with //... comments. The former don't nest
when using /*...*/ to comment out blocks of code.
2021-10-03 13:53:27 +11:00
Nigel Tao
bb7b75ff86
Add Přemysl Eric Janouch to A+C
2021-10-03 13:34:48 +11:00
Nigel Tao
66bcef6fff
Merge pull request #54 from pjanx/main
...
Fix both imageviewers on X.org with DefaultDepth 30
2021-10-03 13:33:29 +11:00
Nigel Tao
de45ab1d2b
Add archive.password-is-asdf.zip
...
$ zip --password asdf archive.password-is-asdf.zip etc etc
2021-09-21 11:54:02 +10:00
Nigel Tao
c8592d2b7a
Remove obsolete comments re s/gAMA/hAMA/ PNG chunk
...
The one-byte patch was added in commit 88616cc9 but no longer applied as
of commit 54771322 .
2021-09-06 23:14:29 +10:00
Nigel Tao
9d10438914
Add test/data/bricks-dither.no-ancillary.png
2021-09-06 22:57:55 +10:00
Nigel Tao
0d57d6a2e1
Add internal/cgen/base/README.md
2021-09-04 15:54:31 +10:00
Nigel Tao
26d9ec41fd
Fix some markdown links to /doc/glossary.md
2021-09-04 15:48:25 +10:00
Nigel Tao
a66a083e82
Have X86_FAMILY allow 32-bit x86, not just x86_64
...
Fixes #53
2021-08-22 22:37:48 +10:00
Nigel Tao
cb2e49ab09
Rename CPU arch macro s/X86_64/X86_FAMILY/
2021-08-22 22:23:49 +10:00
Nigel Tao
75faea996d
Add parse "122.416294033786585" test case
2021-08-22 16:02:44 +10:00
Nigel Tao
1d19157668
Remove After editing... run "go generate" lines
2021-08-22 12:57:39 +10:00
Nigel Tao
bdfee5053c
Delete obsolete ".../internal/cgen/data" package
2021-08-22 12:54:07 +10:00
Nigel Tao
2f65d6fc74
Use go:embed instead of ".../internal/cgen/data"
2021-08-22 12:52:52 +10:00
Nigel Tao
226c476994
Remove calls to Go's deprecated "io/ioutil"
2021-08-22 11:17:34 +10:00
Nigel Tao
788479dd64
Run "gofmt -w ." for new "//go:build" lines
2021-08-22 10:53:06 +10:00
Nigel Tao
d3c7d103ca
Update script/*.go module dependencies
2021-08-22 10:49:18 +10:00
Nigel Tao
17b624c038
Bump go.mod from "go 1.13" to "go 1.16"
2021-08-22 09:58:58 +10:00
Nigel Tao
786fc74b92
wuffs gen -version=0.3.0-beta.9
2021-08-15 13:49:26 +10:00
Nigel Tao
a86fd7fa79
Fix -Werror=sign-conversion in intconv-submodule.c
2021-08-15 13:48:04 +10:00
Nigel Tao
341dd50800
Add more internal errors to wuffs_aux Cbor, Json
2021-08-15 13:40:17 +10:00
Nigel Tao
a83b5cabaf
Fix "-(int64_t)0x8000000000000000" undef behavior
...
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37191
2021-08-15 12:39:01 +10:00
Nigel Tao
8a4f61501b
Add NULL-check for io_{read,writ}er.position()
2021-08-15 11:13:26 +10:00
Nigel Tao
592bc14ed1
Have std/deflate allow non-compact dst history
...
Fixes #52
On a mid-range x86_64 laptop (2016, Skylake):
name old speed new speed delta
wuffs_deflate_decode_1k_full_init/clang9 101MB/s ± 1% 100MB/s ± 1% -1.22% (p=0.000 n=9+9)
wuffs_deflate_decode_1k_part_init/clang9 119MB/s ± 1% 119MB/s ± 1% ~ (p=0.139 n=8+9)
wuffs_deflate_decode_10k_full_init/clang9 221MB/s ± 1% 210MB/s ± 1% -4.94% (p=0.000 n=9+9)
wuffs_deflate_decode_10k_part_init/clang9 225MB/s ± 3% 215MB/s ± 1% -4.33% (p=0.000 n=10+8)
wuffs_deflate_decode_100k_just_one_read/clang9 290MB/s ± 0% 284MB/s ± 1% -2.26% (p=0.000 n=8+9)
wuffs_deflate_decode_100k_many_big_reads/clang9 188MB/s ± 3% 177MB/s ± 1% -5.78% (p=0.000 n=9+10)
wuffs_deflate_decode_1k_full_init/gcc10 101MB/s ± 0% 97MB/s ± 1% -3.65% (p=0.000 n=8+9)
wuffs_deflate_decode_1k_part_init/gcc10 119MB/s ± 1% 113MB/s ± 2% -4.65% (p=0.000 n=9+9)
wuffs_deflate_decode_10k_full_init/gcc10 214MB/s ± 3% 224MB/s ± 1% +4.83% (p=0.000 n=10+10)
wuffs_deflate_decode_10k_part_init/gcc10 222MB/s ± 1% 231MB/s ± 1% +4.03% (p=0.000 n=9+10)
wuffs_deflate_decode_100k_just_one_read/gcc10 281MB/s ± 2% 297MB/s ± 0% +5.78% (p=0.000 n=9+9)
wuffs_deflate_decode_100k_many_big_reads/gcc10 184MB/s ± 0% 194MB/s ± 0% +5.85% (p=0.000 n=10+8)
mimic_deflate_decode_1k_full_init 138MB/s ± 1% 138MB/s ± 0% ~ (p=0.546 n=9+9)
mimic_deflate_decode_10k_full_init 156MB/s ± 2% 156MB/s ± 0% ~ (p=0.387 n=9+9)
mimic_deflate_decode_100k_just_one_read 191MB/s ± 1% 190MB/s ± 2% -0.94% (p=0.004 n=9+10)
mimic_deflate_decode_100k_many_big_reads 147MB/s ± 1% 147MB/s ± 1% ~ (p=0.356 n=9+10)
wuffs_gzip_decode_10k/clang9 220MB/s ± 1% 209MB/s ± 1% -5.29% (p=0.000 n=10+9)
wuffs_gzip_decode_100k/clang9 283MB/s ± 2% 279MB/s ± 1% -1.47% (p=0.002 n=10+10)
wuffs_gzip_decode_10k/gcc10 218MB/s ± 1% 214MB/s ± 2% -1.76% (p=0.000 n=9+10)
wuffs_gzip_decode_100k/gcc10 274MB/s ± 0% 264MB/s ± 2% -3.61% (p=0.000 n=7+10)
mimic_gzip_decode_10k 131MB/s ± 2% 132MB/s ± 0% +0.81% (p=0.000 n=10+8)
mimic_gzip_decode_100k 156MB/s ± 0% 156MB/s ± 1% ~ (p=0.423 n=8+9)
wuffs_zlib_decode_10k/clang9 223MB/s ± 2% 209MB/s ± 2% -6.41% (p=0.000 n=10+10)
wuffs_zlib_decode_100k/clang9 285MB/s ± 0% 280MB/s ± 0% -1.87% (p=0.000 n=8+9)
wuffs_zlib_decode_10k/gcc10 235MB/s ± 0% 215MB/s ± 1% -8.22% (p=0.000 n=10+9)
wuffs_zlib_decode_100k/gcc10 293MB/s ± 0% 268MB/s ± 1% -8.38% (p=0.000 n=8+10)
mimic_zlib_decode_10k 145MB/s ± 1% 145MB/s ± 1% -0.45% (p=0.004 n=9+9)
mimic_zlib_decode_100k 175MB/s ± 1% 174MB/s ± 0% ~ (p=0.055 n=10+8)
wuffs_png_decode_image_19k_8bpp/clang9 142MB/s ± 1% 152MB/s ± 1% +6.98% (p=0.000 n=9+9)
wuffs_png_decode_image_40k_24bpp/clang9 172MB/s ± 0% 170MB/s ± 0% -1.63% (p=0.000 n=8+9)
wuffs_png_decode_image_77k_8bpp/clang9 504MB/s ± 2% 540MB/s ± 1% +7.28% (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9 462MB/s ± 1% 470MB/s ± 0% +1.57% (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9 445MB/s ± 1% 451MB/s ± 0% +1.49% (p=0.000 n=8+10)
wuffs_png_decode_image_4002k_24bpp/clang9 175MB/s ± 3% 175MB/s ± 1% ~ (p=0.356 n=9+10)
wuffs_png_decode_image_19k_8bpp/gcc10 150MB/s ± 0% 153MB/s ± 1% +2.03% (p=0.000 n=10+10)
wuffs_png_decode_image_40k_24bpp/gcc10 186MB/s ± 0% 186MB/s ± 0% ~ (p=0.408 n=10+8)
wuffs_png_decode_image_77k_8bpp/gcc10 543MB/s ± 0% 542MB/s ± 0% -0.23% (p=0.019 n=9+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10 478MB/s ± 1% 498MB/s ± 0% +4.12% (p=0.000 n=10+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10 451MB/s ± 4% 476MB/s ± 0% +5.37% (p=0.000 n=10+9)
wuffs_png_decode_image_4002k_24bpp/gcc10 185MB/s ± 2% 190MB/s ± 1% +2.78% (p=0.000 n=10+9)
mimic_png_decode_image_19k_8bpp 63.0MB/s ± 0% 62.9MB/s ± 1% ~ (p=0.673 n=8+9)
mimic_png_decode_image_40k_24bpp 78.7MB/s ± 0% 78.9MB/s ± 0% ~ (p=0.059 n=9+8)
mimic_png_decode_image_77k_8bpp 192MB/s ± 1% 193MB/s ± 3% +0.44% (p=0.028 n=10+9)
mimic_png_decode_image_552k_32bpp_verify_checksum 157MB/s ± 0% 158MB/s ± 1% ~ (p=0.053 n=10+9)
mimic_png_decode_image_4002k_24bpp 113MB/s ± 1% 113MB/s ± 1% ~ (p=0.053 n=10+9)
2021-08-15 10:50:41 +10:00
Nigel Tao
f73f95b698
Rename from ast.IOBind to ast.IOManip
2021-08-15 08:40:05 +10:00
Nigel Tao
28a54baa19
Add io_bind history_position arg
2021-08-15 08:36:14 +10:00
Nigel Tao
b60a2cacd9
Add io_writer.history_position
2021-08-15 08:19:40 +10:00
Nigel Tao
f7b1b87c70
Fix "-Wnarrowing -m32" warning for some fuzzers
2021-08-14 12:49:04 +10:00
Nigel Tao
13f2e44aca
Have JSON fuzzer segfault on internal errors
2021-08-13 17:45:23 +10:00
Nigel Tao
128d0386bd
Fuzz wuffs_aux::DecodeJson
2021-08-12 23:07:26 +10:00
Nigel Tao
1b9a6cb85b
wuffs gen -version=0.3.0-beta.8
2021-07-20 14:21:21 +10:00
Nigel Tao
77f855206d
Have JSON line-comment tokens exclude the "\n"
...
Before this commit, line-comment token chains included the final "\n"
the way block-comments included the final "*/". The "\n" was mandatory.
However, when parsing with both QUIRK_ALLOW_COMMENT_LINE and
QUIRK_ALLOW_TRAILING_FILLER, input like "123//xyz" (without a "\n"
before the EOF) was rejected before and accepted after this commit.
So that line-comments are consistent, in that they either always or
never include the final "\n", they now never include the final "\n".
An input fragment (parsed with QUIRK_ALLOW_COMMENT_LINE) like
"//abc\n\t\t" was, before this commit, parsed as a 6 byte comment token
and a 2 byte other-filler token. That split is now 5+3.
2021-07-20 14:17:09 +10:00
Nigel Tao
40ffa334ee
Add more json allow_trailing_comments test cases
2021-07-18 23:27:56 +10:00
Nigel Tao
e88e28259e
wuffs gen -version=0.3.0-beta.7
2021-07-18 11:36:39 +10:00
Nigel Tao
6a30c1ede0
Inline wuffs_aux::DecodeJson work_buf variable
2021-07-18 11:25:46 +10:00
Nigel Tao
9c07523a84
Have wuffs_aux::DecodeJson consume trailing filler
...
Prior to this commit, wuffs_aux::DecodeJson would almost always consume
(optional) trailing filler, but in rare coincidences, it might not if a
wuffs_base__suspension__short_write coroutine suspension was needed
between the last token of the actual JSON value and the first token of
the filler after that JSON value.
This commit should change behavior only if the wuffs_aux::DecodeJson
caller had opted into WUFFS_JSON__QUIRK_ALLOW_TRAILING_FILLER or
WUFFS_JSON__QUIRK_EXPECT_TRAILING_NEW_LINE_OR_EOF.
Also remove an unnecessary std::move on a size_t typed value.
2021-07-18 11:12:41 +10:00
Nigel Tao
816475b285
Add "b" (for "binary") to fopen calls
...
Updates #50
2021-07-07 20:28:35 +10:00
Nigel Tao
d0451190ca
wuffs gen -version=0.3.0-beta.6
2021-07-05 21:51:37 +10:00
Nigel Tao
3842c519c9
Delete the WUFFS_BASE__FALLTHROUGH macro
...
Getting it to work on various compilers has been more trouble than it's
worth. The previous commit ignores "-Wimplicit-fallthrough" instead.
2021-07-05 21:40:25 +10:00
Nigel Tao
ea50956b5a
Ignore "-Wimplicit-fallthrough"
2021-07-05 21:40:25 +10:00
Nigel Tao
fd90553a8f
Tweak the WUFFS_BASE__FALLTHROUGH macro
...
When compiling with "-Werror,-Wimplicit-fallthrough", commit c90cc7b6
tweaked WUFFS_BASE__FALLTHROUGH to work with newer clang compilers, when
defined(__cplusplus) is false, but inadvertently broke older clang
compilers, when __has_attribute(fallthrough) is false.
This commit reverts some of c90cc7b6 to handle more cases. The next two
commits will delete the WUFFS_BASE__FALLTHROUGH macro entirely and
render this commit redundant, as the whole business is proving more
trouble than it's worth. But it's checked into the commit history in
case somebody in the future wants to revive WUFFS_BASE__FALLTHROUGH.
2021-07-05 21:40:18 +10:00
Nigel Tao
963a574f7d
wuffs gen -version=0.3.0-beta.5
2021-07-02 13:44:55 +10:00
Nigel Tao
edd87f0eda
Merge pull request #49 from pkasting/main
...
Fix -Wunreachable-code-aggressive.
2021-06-30 10:10:05 +10:00