-#ifndef IUCLC
-# define IUCLC 0
-#endif
- tio.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY);
- tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|TOSTOP);
- tcsetattr_stdin_TCSANOW(&tio);
+ /* Switch off echo. ECHOxyz meaning:
+ * ECHO echo input chars
+ * ECHOE echo BS-SP-BS on erase character
+ * ECHOK echo kill char specially, not as ^c (ECHOKE controls how exactly)
+ * ECHOKE erase all input via BS-SP-BS on kill char (else go to next line)
+ * ECHOCTL Echo ctrl chars as ^c (else echo verbatim:
+ * e.g. up arrow emits "ESC-something" and thus moves cursor up!)
+ * ECHONL Echo NL even if ECHO is not set
+ * ECHOPRT On erase, echo erased chars
+ * [qwe<BS><BS><BS> input looks like "qwe\ewq/" on screen]
+ */
+ tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL);
+ tcsetattr(fd, TCSANOW, &tio);