Home GnuPG

estream: Support the %b conversion specifier from C23

Description

estream: Support the %b conversion specifier from C23

* src/estream-printf.c (CONSSPEC_BIN): New.
(compute_type): Handle it.
(parse_format): Support 'b'.
(do_format): Divert 'b' to pr_integer.
(pr_integer): Print binary format.
* tests/t-printf.c (check_fprintf_sf): Add two simple testcases.

Might be handy in some cases and is easy to implement. Minor drawback
is that this increases a stack based buffer from 100 to 150 bytes.

Details

Provenance
wernerAuthored on Thu, Aug 14, 5:03 PM
Parents
rE7ee191f54c2a: Set build specific variable for zOS
Branches
Unknown
Tags
Unknown
References
HEAD -> master