NAME
term_echo - enable/disable echoing of input characters from a terminal
SYNOPSIS
#include <limb/term.h>
int term_echo(int fd, int want)
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).