Disable line buffering in stdout

In order for local echo to work properly, we have to either call
fflush(stdout) after every character or just disable line buffering.
This change uses setbuf(stdout, NULL) to do the latter.

Closes #92
This commit is contained in:
Lars Kellogg-Stedman 2019-10-08 22:05:07 -04:00
parent 39a8f63640
commit 4d4ee466f7

View file

@ -234,6 +234,10 @@ void stdout_configure(void)
{
int status;
/* Disable line buffering in stdout. This is necessary if we
* want things like local echo to work correctly. */
setbuf(stdout, NULL);
/* Save current stdout settings */
if (tcgetattr(STDOUT_FILENO, &stdout_old) < 0)
{