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
Description:
vswprintf with automatic memory allocation and bounded output size.
Files:
lib/float+.h
lib/printf-args.h
lib/printf-args.c
lib/wprintf-parse.h
lib/wprintf-parse.c
lib/printf-parse.c
lib/vasnwprintf.h
lib/vasnwprintf.c
lib/vasnprintf.c
lib/asnwprintf.c
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/inttypes_h.m4
m4/vasnprintf.m4
m4/printf.m4
m4/mbrtowc.m4
m4/math_h.m4
m4/exponentd.m4
m4/musl.m4
Depends-on:
stdio-h
alloca-opt
attribute
float-h
free-posix
limits-h
stdint-h
xsize
errno-h
memchr
assert-h
wchar-h
localeconv
mbszero
mbrtowc
wmemcpy
wmemset
configure.ac:
AC_REQUIRE([AC_C_RESTRICT])
gl_FUNC_VASNWPRINTF
Makefile.am:
lib_SOURCES += wprintf-parse.c vasnwprintf.c
lib_SOURCES += asnwprintf.c
Include:
"vasnwprintf.h"
Link:
$(MBRTOWC_LIB)
License:
LGPLv2+
Maintainer:
all