From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: 'struct window' cleanup #3 Date: Thu, 28 Jun 2012 16:51:21 +0400 Message-ID: <4FEC5349.9050105@yandex.ru> References: <4FE827B6.6020306@yandex.ru> <4FE89369.2000708@gmx.at> <4FE896A9.3090002@yandex.ru> <4FE9643C.1090201@gmx.at> <83a9zq9jhp.fsf@gnu.org> <83lij98nhj.fsf@gnu.org> <4FEAB1EA.3000307@yandex.ru> <83ehp08y8f.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340887925 14717 80.91.229.3 (28 Jun 2012 12:52:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Jun 2012 12:52:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 28 14:52:03 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SkECV-00054E-Vz for ged-emacs-devel@m.gmane.org; Thu, 28 Jun 2012 14:52:00 +0200 Original-Received: from localhost ([::1]:60142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkECV-00071D-Ni for ged-emacs-devel@m.gmane.org; Thu, 28 Jun 2012 08:51:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkECR-0006zX-LS for emacs-devel@gnu.org; Thu, 28 Jun 2012 08:51:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SkECI-000799-Ph for emacs-devel@gnu.org; Thu, 28 Jun 2012 08:51:55 -0400 Original-Received: from forward9.mail.yandex.net ([77.88.61.48]:51905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkEC3-0006zj-Io; Thu, 28 Jun 2012 08:51:31 -0400 Original-Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward9.mail.yandex.net (Yandex) with ESMTP id A761BCE17DB; Thu, 28 Jun 2012 16:51:20 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340887880; bh=FN76RSH/tphwwK/TkHW1VNX+lJoj38frLC9neqm9uzQ=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=o2Jz9hP+XmuxShywUXTHcBaRjekjyi0M7XLsvu3Eqf9nB1Nz7NIlz0e59zKcrhseu MLfhugABn/uTTKzZOgy/01WPfBc5DwZLVklq3NIgdI26I5F8uPEVaZu46Yj4Xxulvb tykEqwOlwsUEfwRL5e+ZEZLuorksl1cz8WT59uhQ= Original-Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id 83EDA1B603E3; Thu, 28 Jun 2012 16:51:20 +0400 (MSK) Original-Received: from 213-148-21-55.gelicon.ru (213-148-21-55.gelicon.ru [213.148.21.55]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pKOOHqZ0-pKOOTB2G; Thu, 28 Jun 2012 16:51:20 +0400 X-Yandex-Rcpt-Suid: eliz@gnu.org X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340887880; bh=FN76RSH/tphwwK/TkHW1VNX+lJoj38frLC9neqm9uzQ=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ZuPS+XG9IckPZdLL88myY+wV1TVhmJc6FDKvCEoFNe9WLBbfbZPWldrA1cg6EzSBq SLhDsau6k2Xd+CR9Qt9ns3iXyCnrZqf6lbuMoM0/7v5EC1gZr8DtFBXjWPPOPJVBjn 8GwBxd8c4H6dX6dF0d0JHm12/9/osWVLIRurjurY= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <83ehp08y8f.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 77.88.61.48 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151266 Archived-At: On 06/27/2012 09:24 PM, Eli Zaretskii wrote: >> 3. The check: >> >> && INTEGERP (w->window_end_vpos) >> && XFASTINT (w->window_end_vpos) < w->current_matrix->nrows >> >> is transformed to: >> >> && w->window_end_vpos > 0 >> && w->window_end_vpos < w->current_matrix->nrows > > I don't think this is right. window_end_vpos is the number of the > last glyph row of a glyph matrix, so it can legitimately be zero, when > w->current_matrix->nrows is 1. We need to initialize this member with > some invalid value, like -1, if we want to distinguish between values > we can and cannot trust. Or maybe test window_end_valid here (to put > our money where our mouth -- i.e. the commentary -- is ;-). > >> I never get w->window_end_vpos >= w->current_matrix->nrows > > Try something that enlarges and then shrinks the minibuffer window. > Or maybe split a window on a TTY. Anyway, this does happen. > >> but run into w->window_end_vpos == 0 several times. > > See above: it's a legitimate value. > >> At this moment, I have no ideas whether Gerd was correct about >> fixing window.c, so this needs more detailed investigations. > > My gray hair taught me that Gerd is usually right. I need more time to think on it. Nevertheless, I believe that other fields of struct window (which aren't used in such a tricky way) may be converted without a risk to break redisplay, and I did that in 108788 and 108790. Dmitry