This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problem with Cygwin reading/storing backspace character
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Maria Green <marigren at kau dot se>
- Cc: cygwin at cygwin dot com
- Date: Fri, 15 Oct 2004 11:45:14 -0400 (EDT)
- Subject: Re: Problem with Cygwin reading/storing backspace character
- References: <WorldClient-F200410150944.AA44490090@kau.se>
- Reply-to: cygwin at cygwin dot com
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@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.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/