This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit b1691cff80cd7bfcbe81f0dfd510fbfca869d789 Author: Marco Casaroli <[email protected]> AuthorDate: Fri Oct 23 23:17:23 2026 +0200 libs/libc/stream: Accept the ' flag of printf(). The XSI flag "'" groups the integer digits of %d, %i, %u, %f, %F, %g and %G with the thousands separator of the locale. printf() did not know the flag, stopped at it and printed the rest of the conversion specification as text: "%'d" printed "%'d". Accept the flag and print the number without grouping: the C locale has no thousands separator. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- libs/libc/stream/lib_libvsprintf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/libc/stream/lib_libvsprintf.c b/libs/libc/stream/lib_libvsprintf.c index 72af74e4311..d22c1931c3e 100644 --- a/libs/libc/stream/lib_libvsprintf.c +++ b/libs/libc/stream/lib_libvsprintf.c @@ -238,6 +238,13 @@ static int vsprintf_internal(FAR struct lib_outstream_s *stream, case '#': flags |= FL_ALT; continue; + + /* XSI thousands grouping: the C locale has no + * separator, so ignore the flag. + */ + + case '\'': + continue; } }
