mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
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:
parent
39a8f63640
commit
4d4ee466f7
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue