diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2016-05-26 12:53:29 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2016-05-26 12:53:29 +0000 |
commit | 705733ebcb9c26e2d2e1881f9943d112f2331c1c (patch) | |
tree | 28207f7b74f1f8460df33e8700caf4366f567c05 /lib | |
parent | 16b687c9134b1b16f5f96f89b9ed5772e91087f2 (diff) |
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')
-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 |