SPDX is an ISO standard for describing licenses in a computer readable
format, which is useful when applying license compliance tools and the
like to source code.
In addition to ensuring that the Wuffs C distribution is properly
annotated to the benefit of projects using Wuffs and SPDX-supporting
tools, add it everywhere else where there's a license in this repo for
consistency, too.
The LICENSE has changed from a single license (Apache2) to a dual
license (Apache2 or MIT, at your option).
If you've previously used Wuffs under the Apache2 license, you are able
to keep doing so. No further action required by you.
The two files listed below (previous releases) are exceptions, as they
are older snapshots, frozen in time. Their license has not changed:
release/c/wuffs-v0.2.c
release/c/wuffs-v0.3.c
Every name in the AUTHORS file, other than Google Inc., has signed
Google's CLA (Contributor License Agreement).
A follow-up commit will remove the -cformatter flag entirely.
Formatting the generated C code is now a small fraction of where "wuffs
gen" spends its time.
----
$ # Before.
$ time wuffs gen > /dev/null
real 0m0.932s
user 0m0.837s
sys 0m0.187s
$ # After.
$ time wuffs gen > /dev/null
real 0m0.186s
user 0m0.170s
sys 0m0.069s
$ time wuffs gen -cformatter= > /dev/null
real 0m0.184s
user 0m0.170s
sys 0m0.059s
----
genrelease essentially concatenates the individual packages' generated C
files, which should already be formatted.
----
$ # Before.
$ time wuffs gen > /dev/null
real 0m2.622s
user 0m2.457s
sys 0m0.266s
$ # After.
$ time wuffs gen > /dev/null
real 0m1.433s
user 0m1.335s
sys 0m0.191s
----
Reinforcing the previous commit's (e5cc4a42) observation, over 93% of
compilation time (converting foo.wuffs into foo.c) is spent piping the
generated C code through clang-format.
----
$ time wuffs gen -cformatter=clang-format-5.0 > /dev/null
real 0m2.855s
user 0m2.680s
sys 0m0.286s
$ time wuffs gen -cformatter= > /dev/null
real 0m0.175s
user 0m0.172s
sys 0m0.050s
----
----
$ time wuffs gen
1 milliseconds generating the C code
753 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-base.c
0 milliseconds generating the C code
19 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-adler32.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/adler32.wuffs
1 milliseconds generating the C code
61 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-bmp.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/bmp.wuffs
1 milliseconds generating the C code
78 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-crc32.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/crc32.wuffs
2 milliseconds generating the C code
93 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-deflate.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/deflate.wuffs
0 milliseconds generating the C code
34 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-lzw.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/lzw.wuffs
4 milliseconds generating the C code
203 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-gif.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/gif.wuffs
0 milliseconds generating the C code
33 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-gzip.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/gzip.wuffs
4 milliseconds generating the C code
135 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-json.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/json.wuffs
0 milliseconds generating the C code
44 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-wbmp.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/wbmp.wuffs
0 milliseconds generating the C code
32 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/gen/c/wuffs-std-zlib.c
gen unchanged: /etcetera/wuffs/gen/wuffs/std/zlib.wuffs
3 milliseconds collecting the C code
1173 milliseconds formatting the C code via "clang-format-5.0"
gen unchanged: /etcetera/wuffs/release/c/wuffs-unsupported-snapshot.c
real 0m2.849s
user 0m2.674s
sys 0m0.278s
----