mirror_frr/lib/printf
David Lamparter 212e04e5a7 lib: rework printfrr extensions to output directly
Allowing printfrr extensions to directly write to the output buffer has
a few advantages:
- there is no arbitrary length limit imposed (previously 64)
- the output doesn't need to be copied another time
- the extension can directly use bprintfrr() to put together pieces

The downside is that the theoretical length (regardless of available
buffer space) must be computed correctly.

Extended unit tests to test these paths a bit more thoroughly.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-27 16:56:55 +01:00
..
glue.c lib: rework printfrr extensions to output directly 2021-03-27 16:56:55 +01:00
printf-pos.c lib/printf: disable %n specifier 2021-02-01 18:33:18 +01:00
printfcommon.h lib/printf: integrate 2019-06-03 16:44:51 +02:00
printflocal.h lib: rework printfrr extensions to output directly 2021-03-27 16:56:55 +01:00
README lib: import FreeBSD's printf 2019-06-03 16:43:11 +02:00
vfprintf.c lib: rework printfrr extensions to output directly 2021-03-27 16:56:55 +01:00

This is the printf implementation from FreeBSD.  It was imported on 2019-05-12,
from SVN revision 347514 (but the code hadn't been touched for 2 years before
that.)

Please don't reindent or otherwise mangle the files to make importing fixes
easy (not that there are significant changes likely to happen...)

The changes to this code are published under FreeBSD's license as listed in the
file headers.  If you change license, please make that as obvious as possible.