]> git.ipfire.org Git - thirdparty/curl.git/commit
mprintf: overhaul and bugfixes
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 Dec 2023 08:51:20 +0000 (09:51 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Dec 2023 08:51:57 +0000 (09:51 +0100)
commitef2cf58c77fc92960695d6669648f92ca4792e9c
tree746cb316e9729f43959d3fac630b438efb047de0
parent2d4d0c1fd32f5cc3f946c407c8eccd5477b287df
mprintf: overhaul and bugfixes

In a test case using lots of snprintf() calls using many commonly used
%-codes per call, this version is around 30% faster than previous
version.

It also fixes the #12561 bug which made it not behave correctly when
given unknown %-sequences. Fixing that flaw required a different take on
the problem, which resulted in the new two-arrays model.

lib557: extended - Verify the #12561 fix and test more printf features

unit1398: fix test: It used a <num>$ only for one argument, which is not
supported.

Fixes #12561
Closes #12563
lib/mprintf.c
tests/libtest/lib557.c
tests/unit/unit1398.c