Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers

2023-03-22 Thread Bruno Haible
Some details of the %b implementation that I added on 2023-03-17 were incorrect. This patch fixes them, while adding new unit tests. 2023-03-22 Bruno Haible *printf-posix: Fix implementation of %b directive. * lib/vasnprintf.c (VASNPRINTF): In the %b directive implementation,

Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers

2023-03-18 Thread Eric Blake
On Sat, Mar 18, 2023 at 11:50:47AM +, Pádraig Brady wrote: > On 17/03/2023 21:51, Bruno Haible wrote: > > This set of patches adds support for the %b format string directive, > > required > > by ISO C 23, to the *printf family of functions. > > > > So far, only glibc implements it (since

Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers

2023-03-18 Thread Pádraig Brady
On 17/03/2023 21:51, Bruno Haible wrote: This set of patches adds support for the %b format string directive, required by ISO C 23, to the *printf family of functions. So far, only glibc implements it (since version 2.35). For portability to the other platforms, use the *printf-posix modules.

*printf-posix: ISO C 23: Add %b directive for binary output of integers

2023-03-17 Thread Bruno Haible
*printf-posix: ISO C 23: Add %b directive for binary output of integers. * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'b' directive. * lib/printf-parse.h: Update comment. * lib/wprintf-parse.h: Likewise. * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Add support