NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/53642: noecho(3) in curses(3) does not disable echoing



On Sat, Sep 29, 2018 at 14:40:00 +0000, n54%gmx.com@localhost wrote:

> In the NetBSD version of noecho(3) there is still performed echoing
> of user entered input onto the screen.
>
> A work around to disable echoing bytes is to combine noecho(3) with
> cbreak(3).

This is not a workaroud.

The same quoted SUS document later says:

  Initialised Curses Environment

  [...] To get character-at-a-time input without echoing (most
  interactive, screen-oriented programs want this), the following
  sequence should be used:

      initscr()
      cbreak()
      noecho()

SCO curses docs ("SCO UNIX Development System.  User Interfaces
Guide."  Date: 10 December 1991.  Document Version: 3.2.4D) say in
"Controlling the terminal" on p.42

  Do not use the combination of nocbreak() and echo(). If you use it
  in a program and also use getch(), the program will go in and out of
  cbreak() mode to get each character. Depending on the state of the
  tty driver when each character is typed, the program may produce
  undesirable output.

There seems to be a copy available from

https://computerarchive.org/files/comp/manuals/unix/sco_unix_dev_sys_user_interfaces_guide_324d.pdf

-uwe


Home | Main Index | Thread Index | Old Index