gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] WindowsDevices and ncurses


From: Gaius Mulley
Subject: Re: [Gm2] WindowsDevices and ncurses
Date: Thu, 03 Oct 2013 22:02:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

ROBERT SOLOMON <address@hidden> writes:

>>>> 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?

Hi Robert,

it probably isn't - you could use those if you wished.  The ncurses
routines look pretty thorough - and you could still bundle them up
to produce a:

PROCEDURE Read (VAR ch: CHAR) ;

and push this procedure onto the ReadInput.  Then use standard M2
input routines,

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]