lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
***BOGO*** Re: [Mingw-users] ANSI escape sequences problem
- Date: Wed, 25 Jun 2008 12:27:38 -0700
- From: Brian Dessent <brian@xxxxxxxxxxx>
- Subject: ***BOGO*** Re: [Mingw-users] ANSI escape sequences problem
Bengt Werstén wrote:
> Now it almost works perfect, even the left and right arrows are sent as the correct escape sequences when read with getc. Only one very annoying problem left, when Enter is pressed nothing is read by getc. When the next key is pressed the value 13 (fine but too late) is read but not the key I pressed. Pressing the third key will get both the second and the third key read by getc.
Hmm, that sounds like the C runtime is operating in textmode on that fd,
where it has to scan for the CR/LF sequence to convert to LF. You
should make sure the fd is in binary mode, e.g. by _setmode (fd,
_O_BINARY).
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