cosmopolitan/test/libc
Gabriel Ravier 8f8145105c
Add POSIX's C conversion specifier to printf funcs (#1276)
POSIX specifies the C conversion specifier as being "equivalent to %lc",
i.e. printf("%C", arg) is equivalent in behaviour to printf("%lc", arg).

This patch implements this conversion specifier, and adds a test for it,
alongside another test, which ensures that va_arg uses the correct size,
even though we set signbit to 63 in the code (which one might think will
result in the wrong size of argument being va_arg-ed, but having signbit
set to 63 is in fact what __fmt_stoa expects and is a requirement for it
properly formatting the wchar_t argument - this does not result in wrong
usage of va_arg because the implementation of the c conversion specifier
(which the implementation of the C conversion specifier fallsthrough to)
always calls va_arg with an argument type of int, to avoid the very same
bug occuring with %lc, as the l length modifier also sets signbit to 63)
2024-09-03 00:33:55 -07:00
..
calls Make Cosmo mutexes competitive with Apple Libc 2024-09-02 19:03:11 -07:00
fmt Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
intrin Make improvements 2024-09-01 01:27:47 -07:00
log Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
mem Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
nexgen32e Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
proc Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
runtime Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
sock Fix bugs in poll(), select(), ppoll(), and pselect() 2024-09-02 00:29:52 -07:00
stdio Add POSIX's C conversion specifier to printf funcs (#1276) 2024-09-03 00:33:55 -07:00
str Make improvements 2024-09-01 01:27:47 -07:00
thread Introduce pthread_condattr_setclock() 2024-09-02 23:45:42 -07:00
time Update Musl Libc code 2024-07-30 22:51:29 -07:00
tinymath Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
x Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
xed Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
BUILD.mk Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00