terminal: make the code of disable_echo() reusable
commit94ac3c31f730ab278e1373a942fb4503829f4279
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 14 Jan 2020 18:43:47 +0000 (14 18:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 20:06:17 +0000 (15 12:06 -0800)
treeb26aa319bee4b334f31c958083e0f7d353adefa9
parent08b1ea4c39b08b76fe2d1240ccbf6077ef19226a
terminal: make the code of disable_echo() reusable

We are about to introduce the function `enable_non_canonical()`, which
shares almost the complete code with `disable_echo()`.

Let's prepare for that, by refactoring out that shared code.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/terminal.c