lists.zerezo.com


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

***BOGO*** Re: [Mingw-users] ANSI escape sequences problem



Thanks,

That did clear some part. The pseudo terminal concept was new for me although I have used it but without realizing how it actually worked. I still feel like some parts are a bit unclear. The main problem now is how do I disable all the IO buffering?

/Bengt

-----Original Message-----
From: mingw-users-bounces@xxxxxxxxxxxxxxxxxxxxx [mailto:mingw-users-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Brian Dessent
Sent: den 24 juni 2008 12:19
To: MinGW Users List
Subject: Re: [Mingw-users] ANSI escape sequences problem

Bengt Werstén wrote:

> My application use stdin, stderr and stdout only using read (not really but almost) and write/fprintf so I guess this makes it a pty-aware application right?

No.  MinGW applications see ptys as pipes, not as ptys.  They are not
equipped to deal with ptys because they just don't have the concepts. 
They know of Windows consoles only.

> get writing to a stream to work. What I'm trying to do is a shell like behaviour of the input/output. I need to read without local echo and print data (also escape sequences) to create a custom way to enter a string. The output part now works in rxvt but the input part that worked before no longer operate. Since termios.h (used for echo disable and other good edit related stuff) is not avaialable I used kbhit() and getch() to read without echo nor any blocking. Any solution would be greatly appreciated.

To a MinGW application with input connected to a pty, there is no
console so things like isatty() returns false and any console related
APIs like kbhit() will fail.  You can probably make it work if you stay
away from all console APIs and disable all buffering of stdin/stdout.

Brian

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users