From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: 'struct window' cleanup #4 Date: Mon, 02 Jul 2012 20:07:18 +0300 Message-ID: <83fw9a5by1.fsf@gnu.org> References: <4FF17BAE.7090200@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1341248865 19999 80.91.229.3 (2 Jul 2012 17:07:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Jul 2012 17:07:45 +0000 (UTC) Cc: dmantipov@yandex.ru, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 02 19:07:44 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 1Slk6A-0002nj-2n for ged-emacs-devel@m.gmane.org; Mon, 02 Jul 2012 19:07:42 +0200 Original-Received: from localhost ([::1]:44314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Slk68-0008A7-UL for ged-emacs-devel@m.gmane.org; Mon, 02 Jul 2012 13:07:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Slk62-00088y-EF for emacs-devel@gnu.org; Mon, 02 Jul 2012 13:07:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Slk5x-0006dJ-KM for emacs-devel@gnu.org; Mon, 02 Jul 2012 13:07:33 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:55404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Slk5x-0006cy-C4 for emacs-devel@gnu.org; Mon, 02 Jul 2012 13:07:29 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0M6J00000M6KG900@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 02 Jul 2012 20:07:23 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M6J00058M8AF420@a-mtaout20.012.net.il>; Mon, 02 Jul 2012 20:07:23 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 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:151367 Archived-At: > From: Stefan Monnier > Date: Mon, 02 Jul 2012 10:48:08 -0400 > Cc: Emacs development discussions > > vscroll should be int, as should be the hscroll amounts. > The vpos probably as well. I agree, on all 3 counts. Since the corresponding coordinates in pixel units (current_x and current_y from 'struct it'), which are typically about 10 times larger than the above 3, are ints, it doesn't make sense to have these declared as ptrdiff_t. Vertical and horizontal screen positions are generally the size of the Emacs window, i.e. bounded by the display size. (Some internal Emacs display routines simulate a larger window for the purposes of adjusting the displayed area, e.g., while scrolling. But they never go too far outside the display dimensions, because doing so makes the display sluggish, and people complain sooner or later.) Those values are a far cry from being anywhere near INT_MAX.