Mail Archives: cygwin/2004/10/15/11:45:27
On Fri, 15 Oct 2004, Maria Green wrote:
> Hi,
>
> I program in C++ and have a problem while reading characters from the
> stdin. Cygwin doesn't behave the same way as my Linux do and I don't
> know if it's supposed to or not. I've searched the web for several hours
> but I can't find any informtion about this so I will be very thankful
> for some help.
>
> My problem
> I use readline
istream::readline, to be exact. There's also a library called 'readline'
that lets you do input editing -- you're obviously not using that.
> to read one line and store the characters in an array. If I write
> something wrong and removes it with backspace, both the character
> deleted and the backspace character is stored in the array as well. This
> does not happen when you use Linux.
This is not Cygwin-specific, BTW.
> My questions
> Is Cygwin supposed to behave like this?
Yes, but it's not Cygwin that's causing this behavior, it's your terminal
settings.
> If so, is there anyway to make it behave like Linux instead?
Yes. 'stty erase ^H'. "man stty" for more info.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing." -- Dr. Jubal Harshaw
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -