LLVM/clang is not used for any compilation due to it not supporting the
8-bit architectures we use (MCS-51, AVR). This means we are effectively
installing 250+ MiB of dependencies for a C formatting tool.
Replace it with uncrustify, which uses only ~600 KiB of space and has
more granular control of formatting (800+ options).
Signed-off-by: Tim Crawford <tcrawford@system76.com>
SDCC 4.3.3 complains about the declaration not matching the prototype:
error 283: function declarator with no prototype
Add `void` to the AVR functions as well, even though no warning is
issued by GCC.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Update .clang-format for LLVM 14.0, available on Ubuntu 22.04.
There is still plenty that clang-format sucks at or does wrong, so
either add some more blocks to disable it, or just put up with it.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Replace bare int types with stdint types. This was done with:
grep -rwl 'int' src/ | xargs sed -i 's/\<int\>/int16_t/g'
grep -rwl 'unsigned long' src/ | xargs sed -i 's/\<unsigned long\>/uint32_t/g'
grep -rwl 'unsigned char' src/ | xargs sed -i 's/\<unsigned char\>/uint8_t/g'
Then reverted for *main(), putchar(), and getchar().
The Arduino declarations for parallel_main() were also corrected to
match their definitions.
SDCC does *not* generate the same code in all instances, due to `int`
being treated different than `short int`.
Signed-off-by: Tim Crawford <tcrawford@system76.com>