From: Denis PILAT <denis.pilat@st.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Andrew STUBBS <andrew.stubbs@st.com>,
Eli Zaretskii <eliz@gnu.org>,
gdb-patches@sources.redhat.com, bash-maintainers@gnu.org
Subject: Re: [readline-mingw] backspace key and TUI size
Date: Fri, 10 Feb 2006 15:41:00 -0000 [thread overview]
Message-ID: <43ECB429.6070003@st.com> (raw)
In-Reply-To: <20060209134942.GA23253@nevyn.them.org>
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
Daniel Jacobowitz wrote
>>Regarding the TUI size, the approach seems to be fine, can I send you a
>>new patch whith a ChangeLog for that ?
>>
>>
>
>Yes, please.
>
>
>
Attached is the new proposal with only TUI stuffs.
Denis
[-- Attachment #2: readline.patch --]
[-- Type: text/plain, Size: 1037 bytes --]
Index: terminal.c
===================================================================
--- terminal.c (revision 264)
+++ terminal.c (working copy)
@@ -70,6 +70,11 @@
#include "rlshell.h"
#include "xmalloc.h"
+#if defined (__MINGW32__)
+# include <windows.h>
+# include <wincon.h>
+#endif
+
#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay)
#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc)
@@ -201,6 +206,20 @@
struct winsize window_size;
#endif /* TIOCGWINSZ */
+/* For mingw version, we get console size from windows API*/
+#if defined (__MINGW32__)
+ HANDLE hConOut = GetStdHandle(STD_OUTPUT_HANDLE);
+ if ( hConOut != INVALID_HANDLE_VALUE )
+ {
+ CONSOLE_SCREEN_BUFFER_INFO scr;
+ if ( GetConsoleScreenBufferInfo(hConOut, &scr) )
+ {
+ _rl_screenwidth = scr.dwSize.X;
+ _rl_screenheight = scr.srWindow.Bottom - scr.srWindow.Top + 1;
+ }
+ }
+#endif
+
#if defined (TIOCGWINSZ)
if (ioctl (tty, TIOCGWINSZ, &window_size) == 0)
{
[-- Attachment #3: ChangeLog.gdb --]
[-- Type: text/plain, Size: 159 bytes --]
2005-02-10 Denis Pilat <denis.pilat@st.com>
* readline/terminal.c
(_rl_get_screen_size): we get console size from windows API
when compiling with minGW.
next prev parent reply other threads:[~2006-02-10 15:41 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 8:03 Denis PILAT
2006-02-08 13:43 ` Daniel Jacobowitz
2006-02-08 16:03 ` Denis PILAT
2006-02-08 16:05 ` Bob Rossi
2006-02-08 16:14 ` Daniel Jacobowitz
2006-02-08 16:30 ` Chet Ramey
2006-02-08 16:48 ` Andrew STUBBS
2006-02-08 16:51 ` Daniel Jacobowitz
2006-02-08 17:04 ` Chet Ramey
2006-02-08 17:13 ` Daniel Jacobowitz
2006-02-08 17:54 ` Eli Zaretskii
2006-02-08 17:09 ` Eli Zaretskii
2006-02-08 17:30 ` Andrew STUBBS
2006-02-08 17:40 ` Daniel Jacobowitz
2006-02-09 9:36 ` Denis PILAT
2006-02-09 13:49 ` Daniel Jacobowitz
2006-02-10 15:41 ` Denis PILAT [this message]
2006-02-10 18:52 ` Eli Zaretskii
2006-02-20 15:36 ` Daniel Jacobowitz
2006-02-23 18:25 ` Daniel Jacobowitz
2006-02-24 8:36 ` Eli Zaretskii
2006-02-24 18:44 ` Daniel Jacobowitz
2006-02-24 18:48 ` Eli Zaretskii
2006-02-24 19:29 ` Daniel Jacobowitz
2006-02-25 11:35 ` Eli Zaretskii
2006-02-08 17:56 ` Eli Zaretskii
2006-02-08 18:03 ` Daniel Jacobowitz
2006-02-08 16:28 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43ECB429.6070003@st.com \
--to=denis.pilat@st.com \
--cc=andrew.stubbs@st.com \
--cc=bash-maintainers@gnu.org \
--cc=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox