gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] WindowsDevices and ncurses


From: ROBERT SOLOMON
Subject: Re: [Gm2] WindowsDevices and ncurses
Date: Fri, 04 Oct 2013 08:38:39 -0400



>>> Gaius Mulley <address@hidden> 10/3/2013 5:02 PM >>>
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

I don't know if you saw that I posted to comp.lang.modula2 that there is still an issue w/ crti, crtn, etc having to be copied into the opt/m2 tree for any compilation to succeed.  I am using Ubuntu 13.04  64 bit
 

reply via email to

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