summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-05-12 22:35:35 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-05-12 22:35:35 +0000
commit6c2e11e5fa07e05af826c13a9a2f80f5a6f6ce97 (patch)
tree27364eecf6aa8095feb855c6fe8677ececcfca8a /lib/libc/stdio
parent7e69cf3ee2bcbf56e769df7b6f03bcf13df03e23 (diff)
Document errno usage. From Tobias Stoeckmann.
Earlier diff OK jmc@, with nit by otto@.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/putc.318
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/libc/stdio/putc.3 b/lib/libc/stdio/putc.3
index 0d1102c1322..ee046bca430 100644
--- a/lib/libc/stdio/putc.3
+++ b/lib/libc/stdio/putc.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: putc.3,v 1.8 2005/07/26 03:30:25 jaredy Exp $
+.\" $OpenBSD: putc.3,v 1.9 2007/05/12 22:35:34 ray Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -92,13 +92,27 @@ and
return the character written.
If an error occurs, the value
.Dv EOF
-is returned.
+is returned and the global variable
+.Va errno
+is set to indicate the error.
The
.Fn putw
function returns 0 on success;
.Dv EOF
is returned if a write error occurs,
or if an attempt is made to write a read-only stream.
+The global variable
+.Va errno
+may be set to indicate the error.
+.Sh ERRORS
+The function
+.Fn putw
+may also fail and set
+.Va errno
+for any of the errors specified for the routines
+.Xr write 2
+or
+.Xr realloc 3 .
.Sh SEE ALSO
.Xr ferror 3 ,
.Xr fopen 3 ,