Subject: More curses
To: NetBSD current-users mailing list <current-users@NetBSD.ORG>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: current-users
Date: 07/09/1998 14:41:15
I've recently been hacking a little on the curses library. In addition to
Brett Lymn's nodelay() and notimeout(), I've also added wtimeout().
While testing, I noticed an oddity. Basically, calling noecho() without
either raw() or cbreak() leaves the terminal in canonical mode, so wgetch
only returns when EOL (presumably EOF too) is pressed. This seems a little
strange ('violates the principle of least astonishment'?).
Looking at getch.c (lines 64-68), cbreak() is automatically set if noecho()
hasn't been called. Shouldn't cbreak() be set regardless of echo()/noecho().
J
PS. If anyone wants a copy of the modified library, let me know and I'll
put it up for ftp somewhere.
--
1024/55A5BC19 0F 3F 62 56 18 10 8B 84 43 8F F4 94 93 37 76 AA
S.E.P.