]> Savannah Git Hosting - gnulib.git/commit
vasnprintf: Consider the grouping rule.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Apr 2025 15:58:40 +0000 (17:58 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Apr 2025 15:58:40 +0000 (17:58 +0200)
commit7d8705539af0c8555badacbdbe9c92ae0abca6f5
tree744133bb3cdd6f6e24514b9de527f9d0375f2a4b
parent3fe7fc5c1e407c6fb7d26da602528c71e25f41bb
vasnprintf: Consider the grouping rule.

Reported by Pádraig Brady.

* lib/vasnprintf.c (grouping_rule, num_thousands_separators): New
functions.
(MAX_ROOM_NEEDED): Adjust worst-case guess for FLAG_GROUP.
(VASNPRINTF): Likewise. Invoke grouping_rule, num_thousands_separators.
Use the grouping rule to determine where to insert the thousands
separators.
* modules/vasnprintf (Depends-on): Add localeconv.
* modules/vasnwprintf (Depends-on): Likewise.
* modules/c-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
12 files changed:
ChangeLog
lib/vasnprintf.c
modules/c-vasnprintf
modules/unistdio/u16-u16-vasnprintf
modules/unistdio/u16-vasnprintf
modules/unistdio/u32-u32-vasnprintf
modules/unistdio/u32-vasnprintf
modules/unistdio/u8-u8-vasnprintf
modules/unistdio/u8-vasnprintf
modules/unistdio/ulc-vasnprintf
modules/vasnprintf
modules/vasnwprintf