From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <92E23E864E4642DDB41362174C50DF0D@us.oracle.com> <83ei4j679k.fsf@gnu.org> <3FEC7154FCDB445FA73F44BFE3242F6D@us.oracle.com> <8362pv5vlo.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304199422 27022 80.91.229.12 (30 Apr 2011 21:37:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Apr 2011 21:37:02 +0000 (UTC) Cc: 8596@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 30 23:36:58 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QGHqR-0005oZ-W5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Apr 2011 23:36:56 +0200 Original-Received: from localhost ([::1]:42949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGHqR-0001u8-Hz for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Apr 2011 17:36:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGHqO-0001u2-RD for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2011 17:36:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGHqO-0001pn-1M for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2011 17:36:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGHqN-0001pi-T4 for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2011 17:36:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QGHli-0005Fo-Aj; Sat, 30 Apr 2011 17:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Apr 2011 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8596 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8596-submit@debbugs.gnu.org id=B8596.130419910820177 (code B ref 8596); Sat, 30 Apr 2011 21:32:02 +0000 Original-Received: (at 8596) by debbugs.gnu.org; 30 Apr 2011 21:31:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGHlT-0005FN-Lb for submit@debbugs.gnu.org; Sat, 30 Apr 2011 17:31:47 -0400 Original-Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGHlO-0005F8-N1 for 8596@debbugs.gnu.org; Sat, 30 Apr 2011 17:31:47 -0400 Original-Received: by gxk19 with SMTP id 19so1759147gxk.3 for <8596@debbugs.gnu.org>; Sat, 30 Apr 2011 14:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=uqCPgw6vu+seTXOW9wLUDu+Z4vHrbgxCsp31hwQDOZA=; b=kX4xMQFAAa+MO1nn0DJxjz9w6rgk8jIjXkE34tl6VyuQs4qmJfs9781Nc1xH25Ehvu qlXIq0QduuVJcZbNdrWHATQ1GoiurGZ/xK8yjOO2l+UB8wr/VuydWobuT+kunIZXqqi1 3FJ5+kkzRLIoeoSD5dm6xeeEGmKP5dRSLSg2U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=enJtku2S++YVsJBmtsURKZgkp7aJryhu/LP6AkrHyqQg/onPbofpj08gLh+EM+bWld 0aVwD37YeSqiN3X5dKt8Vfmd5OZ4QYsm5+ElVc0iySSg7KVyvM+w5icTqw0xayEUt/7O b6QzluqrMdjXi3OWOH5hJNs8vLq45zK7c8ptA= Original-Received: by 10.236.149.41 with SMTP id w29mr7361016yhj.361.1304199097094; Sat, 30 Apr 2011 14:31:37 -0700 (PDT) Original-Received: by 10.147.182.5 with HTTP; Sat, 30 Apr 2011 14:30:57 -0700 (PDT) In-Reply-To: <8362pv5vlo.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 30 Apr 2011 17:32:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46117 Archived-At: On Sat, Apr 30, 2011 at 22:32, Eli Zaretskii 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. =C2=A0 =C2=A0 Juanma =3D=3D=3D 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 =3D info.srWindow.Right - info.srWindow.Left + 1; + *heightp =3D info.srWindow.Bottom - info.srWindow.Top + 1; + } + else + * widthp =3D *heightp =3D 0; +#else #ifdef MSDOS *widthp =3D ScreenCols (); *heightp =3D ScreenRows (); @@ -1145,6 +1155,7 @@ *widthp =3D 0; *heightp =3D 0; #endif +#endif /* not WINDOWSNT */ #endif /* not SunOS-style */ #endif /* not BSD-style */ }