diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-01-12 06:14:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-01-12 06:14:33 +0000 |
commit | cf7ccc9cb187d0627ce9f7a884e9de25b123975e (patch) | |
tree | 67db59d2fcf1a3ffefdfa49f40c1a931b6137823 /lib/libc/stdio/printf.3 | |
parent | bec95d96c1daca750433ebfaa73a057be3022cf6 (diff) |
Based on some FreeBSD changes:
For *s*printf, set f._file to -1 like the comments in stdio.h say.
Use '\0', not 0, where appropriate.
Don't error out on size of '0' for v?snprintf().
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r-- | lib/libc/stdio/printf.3 | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index f43672a901e..a6ff5ecb6f0 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.5 1997/11/29 19:54:49 millert Exp $ +.\" $OpenBSD: printf.3,v 1.6 1998/01/12 06:14:30 millert Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -117,12 +117,6 @@ the number of characters printed (not including the trailing .Ql \e0 used to end output to strings). -.Fn Snprintf -and -.Fn vsnprintf -will return -1 if the -.Fa size -parameter is 0. .Pp .Fn Asprintf and @@ -130,14 +124,11 @@ and return a pointer to a buffer sufficiently large to hold the string in the .Fa ret -argument; +argument. This pointer should be passed to .Xr free 3 to release the allocated storage when it is no longer needed. -If sufficient space cannot be allocated, -.Fn asprintf -and -.Fn vasprintf +If sufficient space cannot be allocated, these functions will return -1 and set .Fa ret to be a NULL pointer. @@ -667,7 +658,7 @@ this is often impossible to assure. For safety, programmers should use the .Fn snprintf and -.Fn vasprintf +.Fn asprintf family of interfaces instead. Unfortunately, the .Fn snprintf |