|
From: | ROBERT SOLOMON |
Subject: | [Gm2] WindowsDevices and ncurses |
Date: | Thu, 03 Oct 2013 15:23:44 -0400 |
>>> Gaius Mulley <address@hidden> 10/3/2013 9:55 AM >>> ROBERT SOLOMON <address@hidden> writes: > Hi. I am looking at the ncurses interface and WindowsDevices module. I > noticed that this is an output only module. > > How do I do ncurses input? > > Thanks Hi Robert, you could use Terminal.Read from the pim libraries. I would make this procedure the default by using StdIO.PushInput and then use StrIO.Read, StrIO.ReadString and friends. You might want to put your terminal session (on Linux) into noecho and raw mode - by using the command line program: stty. I sometimes run this from with my application by: libc.system(ADR('stty -echo -raw')) libc.system(ADR('reset')) For an example of how PushInput/PushOutput might be used see http://cvs.savannah.gnu.org/viewvc/*checkout*/gm2/examples/executive/winexec.mod?revision=1.6&root=gm2 although ignore the Executive related calls. regards, Gaius Why is that better than using the ncurses input routines?
|
[Prev in Thread] | Current Thread | [Next in Thread] |