aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/wprintf.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2025-03-14 18:33:41 +0100
committerAlejandro Colomar <alx@kernel.org>2025-03-14 18:55:19 +0100
commitd2c2db8830f8fcbb736bdea52b398257447bef6b (patch)
tree13a38ceaeaa6bc257994d91027d42ca187fd2c21 /man/man3/wprintf.3
parent44930b7b8eacbfff12acd1dcfbb66dd818e35254 (diff)
downloadman-pages-d2c2db8830f8fcbb736bdea52b398257447bef6b.tar.gz
man/: SYNOPSIS: Use GNU forward-declarations of parameters for sizes of array parameters
This syntax has been proposed for standardization in N3433. Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3433.pdf> Cc: Christopher Bazley <chris.bazley.wg14@gmail.com> Cc: Martin Uecker <uecker@tugraz.at> Cc: Joseph Myers <josmyers@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man3/wprintf.3')
-rw-r--r--man/man3/wprintf.312
1 files changed, 7 insertions, 5 deletions
diff --git a/man/man3/wprintf.3 b/man/man3/wprintf.3
index dbb39a0d6d..f41b15538d 100644
--- a/man/man3/wprintf.3
+++ b/man/man3/wprintf.3
@@ -24,13 +24,15 @@ Standard C library
.BI "int wprintf(const wchar_t *restrict " format ", ...);"
.BI "int fwprintf(FILE *restrict " stream ,
.BI " const wchar_t *restrict " format ", ...);"
-.BI "int swprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen ,
+.BI "int swprintf(size_t " n ;
+.BI " wchar_t " wcs "[restrict " n "], size_t " n ,
.BI " const wchar_t *restrict " format ", ...);"
.P
.BI "int vwprintf(const wchar_t *restrict " format ", va_list " args );
.BI "int vfwprintf(FILE *restrict " stream ,
.BI " const wchar_t *restrict " format ", va_list " args );
-.BI "int vswprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen ,
+.BI "int vswprintf(size_t " n ;
+.BI " wchar_t " wcs "[restrict " n "], size_t " n ,
.BI " const wchar_t *restrict " format ", va_list " args );
.fi
.P
@@ -93,7 +95,7 @@ perform wide-character output
to an array of wide characters.
The programmer must ensure that there is
room for at least
-.I maxlen
+.I n
wide
characters at
.IR wcs .
@@ -122,7 +124,7 @@ The output consists of wide characters, not bytes.
and
.BR vswprintf ()
take a
-.I maxlen
+.I n
argument,
.BR sprintf (3)
and
@@ -132,7 +134,7 @@ do not.
and
.BR vsnprintf (3)
take a
-.I maxlen
+.I n
argument, but these functions do not return \-1 upon
buffer overflow on Linux.)
.P