]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
printf.3: Clarify details of the %n conversion specifier
authorMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 31 Jul 2014 10:29:12 +0000 (12:29 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 1 Aug 2014 06:57:00 +0000 (08:57 +0200)
See http://bugs.debian.org/756602

Reported-by: Jakub Wilk <jwilk@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/printf.3

index dcb7f0987720c63e36565553c878e474880fbb09..47fdf2c0477404d73382ecf5ed30fa190ffee21c 100644 (file)
@@ -332,9 +332,7 @@ For other conversions, the behavior is undefined.
 .B \-
 The converted value is to be left adjusted on the field boundary.
 (The default is right justification.)
-Except for
-.B n
-conversions, the converted value is padded on the right with blanks, rather
+The converted value is padded on the right with blanks, rather
 than on the left with blanks or zeros.
 A
 .B \-
@@ -788,10 +786,14 @@ or
 .TP
 .B n
 The number of characters written so far is stored into the integer
-indicated by the
-.I "int\ *"
-(or variant) pointer argument.
+pointed to by the corresponding argument.
+That argument shall be an
+.I "int\ *",
+or variant whose size matches the (optionally)
+supplied integer length modifier.
 No argument is converted.
+The behavior is undefined if the conversion specification includes
+any flags, a field width, or a precision.
 .TP
 .B m
 (Glibc extension.)