]> 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 def25bd613fe2f580d44f92578c5e1fe73d351a0..12a3bea71af3a2904f0d45264e73ac952c202ef1 100644 (file)
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
 .\" 4. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
@@ -35,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
-.\" $FreeBSD: src/lib/libc/stdio/wprintf.3,v 1.5 2003/07/05 07:55:34 tjr Exp $
+.\" $FreeBSD$
 .\"
 .Dd July 5, 2003
 .Dt WPRINTF 3
@@ -87,6 +83,12 @@ and
 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
@@ -96,16 +98,25 @@ are converted for output.
 .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
-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
-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
@@ -380,7 +391,7 @@ The
 .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
@@ -456,7 +467,7 @@ The
 .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.
@@ -595,6 +606,9 @@ field is expanded to contain the conversion result.
 .Sh SECURITY CONSIDERATIONS
 Refer to
 .Xr printf 3 .
+.Sh ERRORS
+Refer to
+.Xr printf 3 .
 .Sh SEE ALSO
 .Xr btowc 3 ,
 .Xr fputws 3 ,
@@ -602,6 +616,7 @@ Refer to
 .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