=== modified file 'termkey.c' --- termkey.c 2012-01-18 10:36:50 +0000 +++ termkey.c 2012-01-18 10:07:36 +0000 @@ -949,12 +949,6 @@ tk->buffstart = 0; } - /* Not expecting it ever to be greater but doesn't hurt to handle that */ - if(tk->buffcount >= tk->buffsize) { - errno = ENOMEM; - return TERMKEY_RES_ERROR; - } - retry: len = read(tk->fd, tk->buffer + tk->buffcount, tk->buffsize - tk->buffcount); === modified file 'termkey_advisereadable.3' --- termkey_advisereadable.3 2012-01-18 10:36:50 +0000 +++ termkey_advisereadable.3 2011-08-25 09:48:41 +0000 @@ -10,7 +10,7 @@ .sp Link with \fI-ltermkey\fP. .SH DESCRIPTION -\fBtermkey_advisereadable\fP() informs the instance that new input may be available on the underlying file descriptor and so it should call \fBread\fP(2) to obtain it. If at least one more byte was read it will return \fBTERMKEY_RES_AGAIN\fP to indicate it may be useful to call \fBtermkey_getkey\fP(3) again. If no more input was read then \fBTERMKEY_RES_NONE\fP is returned. If there was no buffer space remaining, then \fBTERMKEY_RES_ERROR\fP is returned with \fIerrno\fP set to \fBENOMEM\fP. +\fBtermkey_advisereadable\fP() informs the instance that new input may be available on the underlying file descriptor and so it should call \fBread\fP(2) to obtain it. If at least one more byte was read it will return \fBTERMKEY_RES_AGAIN\fP to indicate it may be useful to call \fBtermkey_getkey\fP(3) again. If no more input was read then \fBTERMKEY_RES_NONE\fP is returned. .PP This function, along with \fBtermkey_getkey\fP(3) make it possible to use the termkey instance in an asynchronous program. .PP