commit 2b9d0ef804cbb44d9caf580ee53b1241b6904aa0 Author: Steffen Daode Nurpmeso Date: 2012-09-10 15:24:29 +0200 Document errno behaviour of el_getc()/el_gets() diff --git a/lib/libedit/editline.3 b/lib/libedit/editline.3 index a08a0f0..1f26b39 100644 --- a/lib/libedit/editline.3 +++ b/lib/libedit/editline.3 @@ -174,7 +174,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 +is set. .It Fn el_push Pushes .Fa str @@ -397,7 +400,8 @@ will return immediately after processing a single character. Define the character reading function as .Fa f , which is to return the number of characters read and store them in -.Fa c . +.Fa c , +and -1 on failure with errno set to the failure. This function is called internally by .Fn el_gets and @@ -788,6 +792,7 @@ is a NUL terminated string to tokenize. .\"XXX: provide some examples .Sh SEE ALSO .Xr sh 1 , +.Xr intro 2 , .Xr signal 3 , .Xr termcap 3 , .Xr editrc 5 ,