Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bit: Add bswap() overloads for every primitive type | Tavian Barnes | 5 days | 1 | -0/+7 |
| | | | | Fixes: https://github.com/tavianator/bfs/issues/145 | ||||
* | Fix includes | Tavian Barnes | 2024-08-29 | 1 | -1/+0 |
| | |||||
* | build: Move feature test macros to prelude.h | Tavian Barnes | 2024-08-28 | 1 | -2/+1 |
| | | | | | | This replaces the explicit CPPFLAGS list in flags.mk with just `-include src/prelude.h`, shortening our compiler command lines and allowing them to be easily documented. | ||||
* | prelude: Split bfs-specific utilities into new bfs.h header | Tavian Barnes | 2024-08-28 | 1 | -1/+4 |
| | |||||
* | diag: Get rid of bfs_static_assert() | Tavian Barnes | 2024-08-28 | 1 | -31/+37 |
| | | | | | In most cases, it's not too annoying to specify a message. For tests/bit.c, we can manually polyfill the 1-argument version. | ||||
* | tests: Simplify unit tests with a global variable | Tavian Barnes | 2024-07-07 | 1 | -58/+54 |
| | | | | | It's a little awkward to thread the test result through manually; much easier to just make bfs_check() update a global variable. | ||||
* | bit: Update to match C23 | Tavian Barnes | 2024-05-29 | 1 | -18/+18 |
| | | | | | | | | | | Based on the latest C23 draft (N3220): - Argument types to generic bit functions should be unsigned - Bit functions return unsigned int - Byte-swapping functions (stdc_memreverse8*()) weren't added - stdc_rotate_{left,right}() weren't added - first_leading_*() counts from the *left* | ||||
* | Rename config.h to prelude.h | Tavian Barnes | 2024-04-19 | 1 | -1/+1 |
| | |||||
* | tests: Add ../src to the include path | Tavian Barnes | 2024-04-19 | 1 | -3/+3 |
| | |||||
* | bit: Check __BYTE_ORDER__ for the native endian | Tavian Barnes | 2024-03-21 | 1 | -0/+13 |
| | | | | __ORDER_NATIVE_ENDIAN__ is not a thing. | ||||
* | Re-run include-what-you-use | Tavian Barnes | 2024-03-11 | 1 | -1/+1 |
| | |||||
* | tests: New bfs_check() macro | Tavian Barnes | 2024-02-29 | 1 | -53/+55 |
| | | | | | We now report failures and continue, rather than aborting after the first failure. | ||||
* | tests: Merge unit test executables into one | Tavian Barnes | 2024-01-12 | 1 | -2/+3 |
| | |||||
* | Revert "bit: Implement a branchless has_single_bit()" | Tavian Barnes | 2023-11-11 | 1 | -0/+1 |
| | | | | | | Doesn't work for the highest bit due to overflow. This reverts commit 208376ef99da243545efcd6fb02d3469b4c068ed. | ||||
* | bit: Implement a branchless has_single_bit() | Tavian Barnes | 2023-11-10 | 1 | -0/+3 |
| | |||||
* | Switch from assert() to bfs_assert()/bfs_verify() | Tavian Barnes | 2023-05-18 | 1 | -50/+50 |
| | |||||
* | bit: Rename int.h to bit.h | Tavian Barnes | 2023-05-18 | 1 | -0/+121 |