diff options
author | 2016-05-26 12:53:28 +0000 | |
---|---|---|
committer | 2016-05-26 12:53:28 +0000 | |
commit | fe1226923d9e6ba5832a761fc878fe74456033cb (patch) | |
tree | f21b3f977e61080622ecdf1e1b6f8f46fda8e577 /lib/libc/stdio | |
parent | Just nuke environ instead of trying to unsetenv everything because that (diff) | |
download | wireguard-openbsd-fe1226923d9e6ba5832a761fc878fe74456033cb.tar.xz wireguard-openbsd-fe1226923d9e6ba5832a761fc878fe74456033cb.zip |
fputs(3) now returns a non-negative number (as opposed to 0) on successful
completion, just like puts(3). Found the hard way in portable code.
OK jmc@
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/fputs.3 | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/libc/stdio/fputs.3 b/lib/libc/stdio/fputs.3 index 661aea55a69..1e98ecaba11 100644 --- a/lib/libc/stdio/fputs.3 +++ b/lib/libc/stdio/fputs.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fputs.3,v 1.11 2015/01/13 14:02:30 schwarze Exp $ +.\" $OpenBSD: fputs.3,v 1.12 2016/05/26 12:53:28 millert Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: January 13 2015 $ +.Dd $Mdocdate: May 26 2016 $ .Dt FPUTS 3 .Os .Sh NAME @@ -60,15 +60,13 @@ and a terminating newline character, to the stream .Em stdout . .Sh RETURN VALUES -The -.Fn fputs -function returns 0 on success and +Upon successful completion a non-negative integer is returned. +Otherwise, .Dv EOF -on error; -.Fn puts -returns a non-negative integer on success and -.Dv EOF -on error. +is returned, the global variable +.Va errno +is set to indicate the error, +and the error indicator is set for the stream. .Sh ERRORS .Bl -tag -width Er .It Bq Er EBADF |