This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [readline-mingw] backspace key and TUI size


> Date: Wed, 08 Feb 2006 09:02:57 +0100
> From: Denis PILAT <denis.pilat@st.com>
> Cc: bash-maintainers@gnu.org
> 
> - In the gdb.exe version, the backspace key do not behave correctly.

Like Daniel, I don't see this problem on my system.

> +/* For mingw version, we get console size from windows API*/
> +#if defined (__MINGW32__)
> +  HANDLE hConOut = GetStdHandle(STD_OUTPUT_HANDLE);
> +  CONSOLE_SCREEN_BUFFER_INFO scr;  
> +  GetConsoleScreenBufferInfo(hConOut, &scr);
> +  _rl_screenwidth = scr.dwSize.X;
> +  _rl_screenheight = scr.srWindow.Bottom - scr.srWindow.Top + 1;
> +#endif

Shouldn't you make sure the handle returned by GetStdHandle is not
INVALID_HANDLE_VALUE, before you use it in a system call?

> -#ifndef __MSDOS__
> -  if (_rl_term_backspace)
> +#if !defined (__MSDOS__) && !defined (__MINGW32__)
> +  if (_rl_term_backspace) 

The idea is okay with me, but there;s a stray blank after the last
line above.  Please remove it.

And thanks for working on this.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]