all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 8596@debbugs.gnu.org
Subject: bug#8596: 24.0.50; crash when use C-x 5 2 with emacs -nw -Q
Date: Sat, 30 Apr 2011 23:30:57 +0200	[thread overview]
Message-ID: <BANLkTimKqDh-UqHdvzP7cMW6tBZKDEm8zg@mail.gmail.com> (raw)
In-Reply-To: <8362pv5vlo.fsf@gnu.org>

On Sat, Apr 30, 2011 at 22:32, Eli Zaretskii <eliz@gnu.org> wrote:

> I think this happens because w32 lacks a proper implementation of
> get_tty_size.

That's not hard to fix, is it?

But, I cannot find the oldest Windows release supporting
GetConsoleScreenBufferInfo. Most online references do not go farther
than the oldest supported release, Windows 2K.

    Juanma


=== modified file 'src/sysdep.c'
--- src/sysdep.c	2011-04-26 06:17:52 +0000
+++ src/sysdep.c	2011-04-30 21:23:28 +0000
@@ -1138,6 +1138,16 @@
     }

 #else
+#ifdef WINDOWSNT
+  CONSOLE_SCREEN_BUFFER_INFO info;
+  if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info))
+    {
+      *widthp = info.srWindow.Right - info.srWindow.Left + 1;
+      *heightp = info.srWindow.Bottom - info.srWindow.Top + 1;
+    }
+  else
+    * widthp = *heightp = 0;
+#else
 #ifdef MSDOS
   *widthp = ScreenCols ();
   *heightp = ScreenRows ();
@@ -1145,6 +1155,7 @@
   *widthp = 0;
   *heightp = 0;
 #endif
+#endif /* not WINDOWSNT */
 #endif /* not SunOS-style */
 #endif /* not BSD-style */
 }





  reply	other threads:[~2011-04-30 21:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-30 16:04 bug#8596: 24.0.50; crash when use C-x 5 2 with emacs -nw -Q Drew Adams
2011-04-30 16:20 ` Eli Zaretskii
2011-04-30 17:49   ` Drew Adams
2011-04-30 18:21     ` Juanma Barranquero
2011-04-30 20:32       ` Eli Zaretskii
2011-04-30 21:30         ` Juanma Barranquero [this message]
2011-04-30 22:14           ` Juanma Barranquero
2011-05-01  3:03             ` Eli Zaretskii
2011-05-01 15:49               ` Juanma Barranquero
2011-05-01 16:47                 ` Eli Zaretskii
2011-05-01 20:15                   ` Juanma Barranquero
2011-05-02  3:09                     ` Eli Zaretskii
2011-05-02  3:58                       ` Juanma Barranquero

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=BANLkTimKqDh-UqHdvzP7cMW6tBZKDEm8zg@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=8596@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.