From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: libc-alpha@sourceware.org
Subject: Re: printf %b
Date: Sun, 26 Apr 2020 21:18:46 +0200 [thread overview]
Message-ID: <553f5205-88ea-f417-09d4-3245f384a274@gmail.com> (raw)
In-Reply-To: <6e163d3e-fc4f-7a87-6168-890c21a00dde@gmail.com>
On 4/26/20 4:29 AM, Alejandro Colomar wrote:
> Hmmm. Good point. Maybe, given that binary doesn't have letters such
> as hex does, we don't need both ``%b`` and ``%B``. We could have just
> ``%B`` (if it isn't already taken by some other thing) and use it for
> binary.
I have written the patch to add ``%B`` (not ``%b``) for binary. I added
a few tests to ``stdio-common/tst-printf.c``, which work fine. I also
compiled the extensive test that I had for my library, with the new
glibc, and it worked also fine.
Issues:
- Not yet implemented: Separator for nibbles. (If I implement this, I
would like to also implement it for hex bytes).
- GCC 9 doesn't know of this specifier, so in the tests I had to
disable that diagnostic. When GCC accepts it, those pragmas should
be removed.
- ``stdio-common/tst-printfsz.c`` registers ``%B`` for something else
(it uses ``register_printf_function()``, so it overwrites the
specifier, and shouldn't cause any problems at all).
TODO (I will do them ASAP (when I know howto, actually)):
- Documentation (both glibc and man 3 printf).
- patch GCC to accept the new specifier.
I had some problems following the `contribution checklist`_:
_`contribution checklist`:
https://sourceware.org/glibc/wiki/Contribution%20checklist
- ``find . -name ChangeLog`` shows nothing to me:
::
$ find . -name ChangeLog
$ find . |grep ChangeLog
./ChangeLog.old
./ChangeLog.old/ChangeLog.ports-m68k
./ChangeLog.old/ChangeLog.9
./ChangeLog.old/ChangeLog.4
./ChangeLog.old/ChangeLog.13
./ChangeLog.old/ChangeLog.ports-tile
./ChangeLog.old/ChangeLog.5
./ChangeLog.old/ChangeLog.ports-arm
./ChangeLog.old/ChangeLog.16
./ChangeLog.old/ChangeLog.localedata
./ChangeLog.old/ChangeLog.8
./ChangeLog.old/ChangeLog.ports-microblaze
./ChangeLog.old/ChangeLog.ports-aarch64
./ChangeLog.old/ChangeLog.ports-am33
./ChangeLog.old/ChangeLog.ports-mips
./ChangeLog.old/ChangeLog.ports-aix
./ChangeLog.old/ChangeLog.nptl_db
./ChangeLog.old/ChangeLog.ports-hppa
./ChangeLog.old/ChangeLog.6
./ChangeLog.old/ChangeLog.14
./ChangeLog.old/ChangeLog.1
./ChangeLog.old/ChangeLog.ports-powerpc
./ChangeLog.old/ChangeLog.nptl
./ChangeLog.old/ChangeLog.7
./ChangeLog.old/ChangeLog.19
./ChangeLog.old/ChangeLog.15
./ChangeLog.old/ChangeLog.2
./ChangeLog.old/ChangeLog.ports
./ChangeLog.old/ChangeLog.18
./ChangeLog.old/ChangeLog.libidn
./ChangeLog.old/ChangeLog.12
./ChangeLog.old/ChangeLog.11
./ChangeLog.old/ChangeLog.ports-ia64
./ChangeLog.old/ChangeLog.20
./ChangeLog.old/ChangeLog.ports-cris
./ChangeLog.old/ChangeLog.ports-linux-generic
./ChangeLog.old/ChangeLog.ports-alpha
./ChangeLog.old/ChangeLog.10
./ChangeLog.old/ChangeLog.17
./ChangeLog.old/ChangeLog.3
- I couldn't create an account on http://patchwork.sourceware.org/
because that link is broken (500 Internal server error).
Regards,
Alex.
prev parent reply other threads:[~2020-04-26 19:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-25 13:33 Alejandro Colomar
2020-04-26 0:54 ` Jonathan Nieder
2020-04-26 2:29 ` Alejandro Colomar
2020-04-26 19:18 ` Alejandro Colomar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553f5205-88ea-f417-09d4-3245f384a274@gmail.com \
--to=colomar.6.4.3@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).