% limb manual
% term_echo(3)
% limb 0.1.0
% 2023-07-24
# NAME
term\_echo - enable/disable echoing of input characters from a terminal
# SYNOPSIS
#include <limb/term.h>
```pre hl
int term_echo(int <em>fd</em>, int <em>want</em>)
```
# DESCRIPTION
The `term_echo`() function will disable or enable echoing of input characters,
depending or whether `want` is zero or not respectively, for the terminal
referred by `fd`.
It will first check whether or not the current state of echoing is as requested,
and if so returns 0 to indicate nothing had to be done.
# RETURN VALUE
The `term_echo`() function returns 1 when echoing was successfully set according
to `want`. If the echoing state of the terminal referred by `fd` was already as
requested (and nothing was changed), it returns 0.
Otherwise it returns -1 and sets `errno` to indicate the error.
# ERRORS
The `term_echo`() function may fail and set `errno` for any of the errors
described for [tcgetattr](3) and [tcsetattr](3).
# SEE ALSO
[ask_password](3)