hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 11c58d83ee941564b73fcb806e0e57ed1ec75459
parent 98bbc15a8c926aaf58c78489c5e4ab4acce1f7ea
Author: Sebastian <sebastian@sebsite.pw>
Date:   Fri,  8 Sep 2023 00:22:15 -0400

unix::tty+freebsd: add noecho

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Munix/tty/+freebsd/termios.ha | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/unix/tty/+freebsd/termios.ha b/unix/tty/+freebsd/termios.ha @@ -61,3 +61,10 @@ export fn makeraw(termios: *termios) (void | errors::error) = { termios_set(termios)?; }; + +// Disables "echo" on this terminal. Users should call [[termios_restore]] to +// restore settings. +export fn noecho(termios: *termios) (void | errors::error) = { + termios.current.c_lflag &= ~rt::tcflag::ECHO; + termios_set(termios)?; +};