NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/46945: editline(3): el_getc() doesn't document it's setting errno



>Number:         46945
>Category:       lib
>Synopsis:       editline(3): el_getc() doesn't document it's setting errno
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 11 15:30:00 +0000 2012
>Originator:     Steffen Nurpmeso
>Release:        netbsd-6-base
>Organization:
>Environment:
netbsd-6-base, manually patched up
>Description:
Whereas el_gets() already documents that it sets errno on error,
el_getc() does not.
>How-To-Repeat:
Be a greenhorn.  Be undecided.
>Fix:
Applies also to v1.76

diff --git a/src/lib/libedit/editline.3 b/src/lib/libedit/editline.3
index 7540562..80819b2 100644
--- a/src/lib/libedit/editline.3
+++ b/src/lib/libedit/editline.3
@@ -221,7 +221,10 @@ and must be copied if the data is to be retained.
 Read a character from the tty.
 .Fa ch
 is modified to contain the character read.
-Returns the number of characters read if successful, \-1 otherwise.
+Returns the number of characters read if successful, \-1 otherwise,
+in which case
+.Dv errno
+can be inspected for the cause.
 .It Fn el_push
 Pushes
 .Fa str



Home | Main Index | Thread Index | Old Index