]> Savannah Git Hosting - gnulib.git/commit
vasnwprintf: Fix for older platforms without swprintf.
authorBruno Haible <bruno@clisp.org>
Tue, 21 Mar 2023 16:47:04 +0000 (17:47 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 21 Mar 2023 16:53:44 +0000 (17:53 +0100)
commitff3f33eea46cd58b490a88bc90e9e572bff70d0f
tree0fea8b231c362425ac6789b5e92d18552d3ce6a9
parent4d76e28ab57ee53871cda1c3e158bdc380441855
vasnwprintf: Fix for older platforms without swprintf.

* lib/vasnprintf.c (VASNPRINTF): In the %lc handling, ignore the
precision. Convert the snprintf result to a wchar_t[] not by mbsrtowcs,
but by a loop that does not stop at NUL characters.
* tests/test-vasnwprintf-posix.c (test_function): Add more tests for the
%c and %lc directives.
* modules/vasnwprintf (Depends-on): Add mbrtowc. Remove mbsrtowcs.
ChangeLog
lib/vasnprintf.c
modules/vasnwprintf
tests/test-vasnwprintf-posix.c