]> Savannah Git Hosting - gnulib.git/commit
vasnprintf, vasnwprintf: Make '0' flag handling more ISO C compliant.
authorBruno Haible <bruno@clisp.org>
Wed, 3 May 2023 15:09:20 +0000 (17:09 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 3 May 2023 15:09:20 +0000 (17:09 +0200)
commit5826332ae5386719b3f34d3c94b4978910a9c0dc
tree8d55c6a27ca1f4c550b0f549eb495f1cd8404e84
parent18e6a048c8e85b29090cfed503c0d32a28feb090
vasnprintf, vasnwprintf: Make '0' flag handling more ISO C compliant.

* lib/vasnprintf.c (VASNPRINTF): When doing the padding ourselves,
ignore the '0' flag if a precision is specified and the conversion is
one of d, i, o, u, x, X, b, B.
* tests/test-vasnprintf-posix.c (test_function): Update expected results
accordingly.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
ChangeLog
lib/vasnprintf.c
tests/test-snprintf-posix.h
tests/test-sprintf-posix.h
tests/test-vasnprintf-posix.c
tests/test-vasnwprintf-posix.c
tests/test-vasprintf-posix.c