]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/wprintf.3
Libc-1439.100.3.tar.gz
[apple/libc.git] / stdio / FreeBSD / wprintf.3
index 39713e217e69e02c11676cab717e89cf4f396bd0..12a3bea71af3a2904f0d45264e73ac952c202ef1 100644 (file)
@@ -31,7 +31,7 @@
 .\"
 .\"     @(#)printf.3   8.1 (Berkeley) 6/4/93
 .\" FreeBSD: src/lib/libc/stdio/printf.3,v 1.47 2002/09/06 11:23:55 tjr Exp
 .\"
 .\"     @(#)printf.3   8.1 (Berkeley) 6/4/93
 .\" FreeBSD: src/lib/libc/stdio/printf.3,v 1.47 2002/09/06 11:23:55 tjr Exp
-.\" $FreeBSD: src/lib/libc/stdio/wprintf.3,v 1.6 2007/01/09 00:28:08 imp Exp $
+.\" $FreeBSD$
 .\"
 .Dd July 5, 2003
 .Dt WPRINTF 3
 .\"
 .Dd July 5, 2003
 .Dt WPRINTF 3
@@ -83,6 +83,12 @@ and
 write to the wide character string
 .Fa ws .
 .Pp
 write to the wide character string
 .Fa ws .
 .Pp
+Extended locale versions of these functions are documented in
+.Xr wprintf_l 3 .
+See
+.Xr xlocale 3
+for more information.
+.Pp
 These functions write the output under the control of a
 .Fa format
 string that specifies how subsequent arguments
 These functions write the output under the control of a
 .Fa format
 string that specifies how subsequent arguments
@@ -92,16 +98,25 @@ are converted for output.
 .Pp
 These functions return the number of characters printed
 (not including the trailing
 .Pp
 These functions return the number of characters printed
 (not including the trailing
-.Ql \e0
+.Ql \e0 ,
 used to end output to strings).
 .Pp
 The
 .Fn swprintf
 and
 .Fn vswprintf
 used to end output to strings).
 .Pp
 The
 .Fn swprintf
 and
 .Fn vswprintf
-functions will fail if
+functions return the number of characters written (not including the terminating
+null wide character).
+These functions will fail (returning a negative value and setting
+.Va errno
+appropriately) if
 .Fa n
 .Fa n
-or more wide characters were requested to be written,
+or more wide characters were requested to be written.
+.Pp
+The other functions return the number of wide characters printed on success, or
+a negative value on faiure, setting
+.Va errno
+to indicate the error.
 .Pp
 The format string is composed of zero or more directives:
 ordinary
 .Pp
 The format string is composed of zero or more directives:
 ordinary
@@ -376,7 +391,7 @@ The
 .Vt double
 argument is rounded and converted in the style
 .Sm off
 .Vt double
 argument is rounded and converted in the style
 .Sm off
-.Oo \- Oc Ar d Li \&. Ar ddd Li e \\*[Pm] Ar dd
+.Oo \- Oc Ar d Li \&. Ar ddd Li e \(+- Ar dd
 .Sm on
 where there is one digit before the
 decimal-point character
 .Sm on
 where there is one digit before the
 decimal-point character
@@ -452,7 +467,7 @@ The
 .Vt double
 argument is converted to hexadecimal notation in the style
 .Sm off
 .Vt double
 argument is converted to hexadecimal notation in the style
 .Sm off
-.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \\*[Pm] Oc Ar d ,
+.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \(+- Oc Ar d ,
 .Sm on
 where the number of digits after the hexadecimal-point character
 is equal to the precision specification.
 .Sm on
 where the number of digits after the hexadecimal-point character
 is equal to the precision specification.
@@ -591,6 +606,9 @@ field is expanded to contain the conversion result.
 .Sh SECURITY CONSIDERATIONS
 Refer to
 .Xr printf 3 .
 .Sh SECURITY CONSIDERATIONS
 Refer to
 .Xr printf 3 .
+.Sh ERRORS
+Refer to
+.Xr printf 3 .
 .Sh SEE ALSO
 .Xr btowc 3 ,
 .Xr fputws 3 ,
 .Sh SEE ALSO
 .Xr btowc 3 ,
 .Xr fputws 3 ,
@@ -598,6 +616,7 @@ Refer to
 .Xr putwc 3 ,
 .Xr setlocale 3 ,
 .Xr wcsrtombs 3 ,
 .Xr putwc 3 ,
 .Xr setlocale 3 ,
 .Xr wcsrtombs 3 ,
+.Xr wprintf_l 3 ,
 .Xr wscanf 3
 .Sh STANDARDS
 Subject to the caveats noted in the
 .Xr wscanf 3
 .Sh STANDARDS
 Subject to the caveats noted in the