Branch
Hash :
7d870553
Author :
Date :
2025-04-13T17:58:40
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
Description:
Formatted output to UTF-8 strings.
Files:
lib/unistdio/u8-u8-vasnprintf.c
lib/vasnprintf.c
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/inttypes_h.m4
m4/exponentd.m4
Depends-on:
unistdio/base
unistdio/u8-printf-parse
unistdio/u-printf-args
uniconv/u8-conv-from-enc
unistr/u8-cpy
unistr/u8-set
unistr/u8-mbsnlen
unistr/u16-to-u8
unistr/u32-to-u8
unistr/u8-strlen
unistr/u8-strmblen
unistr/u16-strlen
unistr/u16-strmblen
unistr/u32-strlen
unistr/u32-strmblen
attribute
stdint-h
mixin/printf-posix
nocrash
printf-safe
alloca-opt
localcharset
xsize
errno-h
free-posix
localeconv
memchr
multiarch
assert-h
mbszero
configure.ac:
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-vasnprintf])
Makefile.am:
if LIBUNISTRING_COMPILE_UNISTDIO_U8_U8_VASNPRINTF
lib_SOURCES += unistdio/u8-u8-vasnprintf.c
endif
Include:
"unistdio.h"
License:
LGPLv3+ or GPLv2+
Maintainer:
all