Commit Graph
30 Commits
Author SHA1 Message Date
Patrick Georgi f563f32f82 Add SPDX identifier to license headers
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.
2023-10-06 20:52:36 +02:00
Nigel Tao 74a6ea2fcd all: relicense from Apache2 to dual Apache2/MIT
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).
2023-10-06 10:00:59 +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 50bfab9998 Tweak example/*/*.cc compile instructions 2020-08-05 11:39:09 +10:00
Nigel Tao 721190afff Have example C++ program check for -std=c++11 2020-04-03 22:25:21 +11:00
Nigel Tao d60815c93f Have example/* global variable names start with g_ 2020-03-26 14:32:35 +11:00
Nigel Tao fdac24a425 Rename FOO_BUFFER_SIZE to FOO_BUFFER_ARRAY_SIZE 2020-03-06 21:53:08 +11:00
Nigel Tao 2914bae3b2 Re-format C function signatures 2020-02-26 09:40:30 +11:00
Nigel Tao 1b07349144 Add example/jsonptr 2020-02-16 22:19:12 +11:00
Nigel Tao e6db7f6a40 Make wuffs_base__status a struct 2020-01-05 10:48:20 +11:00
Nigel Tao 355a95eeea Add wuffs_base__status__message 2019-12-15 13:31:17 +11:00
Nigel Tao 8ff9cdb9a6 Rename hasher update_u32 method 2019-11-20 21:07:22 +11:00
Nigel Tao 7e384e079e Take some unistd.h dependencies out of examples 2019-03-09 11:06:26 +11:00
Nigel Tao c4b8a6a4cc Don't use designated initializers
Some C/C++ compilers, such as MSVC, don't always support them. They're
also not supported by GCC's "g++ -std=c++11 -Wpedantic".
2019-03-09 10:08:00 +11:00
Nigel Tao 53760ce0fd Call initialize instead of check_wuffs_version 2019-02-16 14:18:25 +11:00
Nigel Tao 670b45be53 Add some "horizontal rule" comment lines 2019-02-02 08:10:08 +11:00
Nigel Tao dd94ad3821 Rename z variable to status, in C code 2018-12-28 16:14:03 +11:00
Nigel Tao 04c91f1410 Generate .c files instead of .h files
The files' contents haven't changed (other than some relative #include's
that refer to other .c files).

Some build systems have difficulty recognizing .h files as things to be
compiled, instead of just things referred to by things to be compiled.
2018-12-22 15:29:00 +11:00
Nigel Tao b840c80040 Make the status type a const char*, not a struct 2018-08-12 16:05:14 +10:00
Nigel Tao 2a32a86a6c Make the status type a struct, not an int32_t 2018-08-11 13:27:29 +10:00
Nigel Tao fd43e777bc Have check_wuffs_version return a status code 2018-08-05 22:29:54 +10:00
Jimmy Casey 3c50ada2c6 Fixed Spelling. 2018-07-26 17:12:19 +00:00
Nigel Tao bc82e51371 Rename wuffs-unsupported-snapshot.h 2018-07-21 09:20:10 +10:00
Nigel Tao 8a6e177701 Add WUFFS_CONFIG__STATIC_FUNCTIONS 2018-07-14 10:16:10 +10:00
Nigel Tao a0bafff465 Ship as a "single file C library" 2018-07-14 08:59:36 +10:00
Nigel Tao 13d2814519 Raise example/crc32's buffer size from 16K to 32K
This matches the 32K buffer size used by
https://github.com/redhotpenguin/perl-Archive-Zip/blob/master/script/crc32
as shipped as /usr/bin/crc32 on Debian
2018-06-30 16:49:13 +10:00
Nigel Tao 30cfaa5db7 Add C++ convenience methods 2018-06-30 13:02:16 +10:00
Nigel Tao 6183aba9d7 Capitalize the $CC and $CXX environment variables 2018-06-30 10:43:26 +10:00
Nigel Tao f3538d9117 Add example/crc32 2018-06-30 10:41:04 +10:00