sacc

sacc (saccomys): simple gopher client.
Log | Files | Refs | LICENSE

commit c0a79c0424a99180ed4c79e3335dc3f7ced2322c
parent f1432f5a5c56bad44485d9dee8fe92e6d09e1f4c
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Wed, 19 Aug 2020 22:57:57 +0200

ui_ti: explicitly define VMIN and VTIME values for read()

VMIN represents the minimum number of bytes that should be received when the
read(2) function successfully returns.

VTIME is a timer of 0.1 second granularity that is used to time out bursty and
short term data transmissions.

On some systems VMIN is not 1 causing input processing issues.

Diffstat:
Mui_ti.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/ui_ti.c b/ui_ti.c @@ -24,6 +24,8 @@ uisetup(void) tcgetattr(0, &tsave); tsacc = tsave; tsacc.c_lflag &= ~(ECHO|ICANON); + tsacc.c_cc[VMIN] = 1; + tsacc.c_cc[VTIME] = 0; tcsetattr(0, TCSANOW, &tsacc); setupterm(NULL, 1, NULL);