fflush() after putchar() for print_hex and print_normal

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 calls fflush() after putchar().

Closes #92
This commit is contained in:
Lars Kellogg-Stedman 2019-10-16 22:48:44 -04:00
parent 39a8f63640
commit c6af6c0804

View file

@ -70,11 +70,13 @@ static bool map_o_del_bs = false;
static void print_hex(char c)
{
printf("%02x ", (unsigned char) c);
fflush(stdout);
}
static void print_normal(char c)
{
putchar(c);
fflush(stdout);
}
void handle_command_sequence(char input_char, char previous_char, char *output_char, bool *forward)