Sun Dec 26 12:39:54 2010 UTC ()
vsnprintf_ss does NOT handle floating point formats


(jnemeth)
diff -r1.57 -r1.58 src/lib/libc/stdio/printf.3

cvs diff -r1.57 -r1.58 src/lib/libc/stdio/printf.3 (expand / switch to unified diff)

--- src/lib/libc/stdio/printf.3 2010/12/22 17:06:03 1.57
+++ src/lib/libc/stdio/printf.3 2010/12/26 12:39:54 1.58
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: printf.3,v 1.57 2010/12/22 17:06:03 wiz Exp $ 1.\" $NetBSD: printf.3,v 1.58 2010/12/26 12:39:54 jnemeth Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1991, 1993 3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to Berkeley by 6.\" This code is derived from software contributed to Berkeley by
7.\" Chris Torek and the American National Standards Committee X3, 7.\" Chris Torek and the American National Standards Committee X3,
8.\" on Information Processing Systems. 8.\" on Information Processing Systems.
9.\" 9.\"
10.\" Redistribution and use in source and binary forms, with or without 10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions 11.\" modification, are permitted provided that the following conditions
12.\" are met: 12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright 13.\" 1. Redistributions of source code must retain the above copyright
14.\" notice, this list of conditions and the following disclaimer. 14.\" notice, this list of conditions and the following disclaimer.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE. 32.\" SUCH DAMAGE.
33.\" 33.\"
34.\" @(#)printf.3 8.1 (Berkeley) 6/4/93 34.\" @(#)printf.3 8.1 (Berkeley) 6/4/93
35.\" 35.\"
36.Dd December 22, 2010 36.Dd December 26, 2010
37.Dt PRINTF 3 37.Dt PRINTF 3
38.Os 38.Os
39.Sh NAME 39.Sh NAME
40.Nm printf , 40.Nm printf ,
41.Nm fprintf , 41.Nm fprintf ,
42.Nm dprintf 42.Nm dprintf
43.Nm sprintf , 43.Nm sprintf ,
44.Nm snprintf , 44.Nm snprintf ,
45.Nm asprintf , 45.Nm asprintf ,
46.Nm vprintf , 46.Nm vprintf ,
47.Nm vfprintf , 47.Nm vfprintf ,
48.Nm vsprintf , 48.Nm vsprintf ,
49.Nm vdprintf , 49.Nm vdprintf ,
@@ -119,27 +119,28 @@ and @@ -119,27 +119,28 @@ and
119and 119and
120.Fn vasprintf 120.Fn vasprintf
121write to a dynamically allocated string that is stored in 121write to a dynamically allocated string that is stored in
122.Fa ret . 122.Fa ret .
123.Pp 123.Pp
124These functions write the output under the control of a 124These functions write the output under the control of a
125.Fa format 125.Fa format
126string that specifies how subsequent arguments 126string that specifies how subsequent arguments
127(or arguments accessed via the variable-length argument facilities of 127(or arguments accessed via the variable-length argument facilities of
128.Xr stdarg 3 ) 128.Xr stdarg 3 )
129are converted for output. 129are converted for output.
130.Pp 130.Pp
131.Fn vsnprintf_ss 131.Fn vsnprintf_ss
132is a signal-safe standalone version that does handle floating point formats. 132is a signal-safe standalone version that does not handle
 133floating point formats.
133.Pp 134.Pp
134.Fn asprintf 135.Fn asprintf
135and 136and
136.Fn vasprintf 137.Fn vasprintf
137return a pointer to a buffer sufficiently large to hold the 138return a pointer to a buffer sufficiently large to hold the
138string in the 139string in the
139.Fa ret 140.Fa ret
140argument. 141argument.
141This pointer should be passed to 142This pointer should be passed to
142.Xr free 3 143.Xr free 3
143to release the allocated storage when it is no longer needed. 144to release the allocated storage when it is no longer needed.
144If sufficient space cannot be allocated, these functions 145If sufficient space cannot be allocated, these functions
145will return \-1 and set 146will return \-1 and set