[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *printf-posix: ISO C 23: Add %b directive for binary output of integ
From: |
Eric Blake |
Subject: |
Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers |
Date: |
Sat, 18 Mar 2023 07:47:38 -0500 |
User-agent: |
NeoMutt/20220429 |
On Sat, Mar 18, 2023 at 11:50:47AM +0000, 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 version 2.35). For portability to
> > the
> > other platforms, use the *printf-posix modules.
>
> For my reference mainly...
>
> It's interesting that this conflicts with the POSIX specified %b directive
> for the printf(1) utility.
Another consideration: C23 admits that %#B is not available for
portable use of outputting uppercase '0B...', you would have to
manually write 0B%b instead. However, since glibc DOES support %B as
the uppercase counterpart to %b, should we add that in gnulib (but
this time under the auspices of *printf-gnu, rather than
*printf-posix)?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- *printf-posix: ISO C 23: Add %b directive for binary output of integers, Bruno Haible, 2023/03/17
- Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers, Pádraig Brady, 2023/03/18
- Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers,
Eric Blake <=
- new modules *printf-gnu, Bruno Haible, 2023/03/24
- Re: new modules *printf-gnu, Eric Blake, 2023/03/24
- Re: new modules *printf-gnu, Bruno Haible, 2023/03/24
- Re: new modules *printf-gnu, Paul Eggert, 2023/03/24
- Re: new modules *printf-gnu, Bruno Haible, 2023/03/24
Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers, Bruno Haible, 2023/03/22