From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: list-colors-display shows only one color Date: Tue, 12 Feb 2002 13:18:51 +0100 Message-ID: <20020212125234.B5C4.LEKTU@terra.es> References: <8296-Mon11Feb2002214825+0200-eliz@is.elta.co.il> <20020212100011.B5B9.LEKTU@terra.es> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: quimby2.netfonds.no 1013517131 3512 195.204.10.66 (12 Feb 2002 12:32:11 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 12 Feb 2002 12:32:11 GMT Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16ac6U-0000uY-00 for ; Tue, 12 Feb 2002 13:32:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16abvo-000053-00; Tue, 12 Feb 2002 07:21:08 -0500 Original-Received: from [62.22.27.141] (helo=mail.peoplecall.com) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16abtf-0008PP-00 for ; Tue, 12 Feb 2002 07:18:55 -0500 Original-Received: from jbarranquero (jbarranquero.ofi.peoplecall.com [62.22.27.143]) by mail.peoplecall.com (8.11.6/8.11.6) with ESMTP id g1CCIol04213 for ; Tue, 12 Feb 2002 13:18:51 +0100 Original-To: emacs-devel@gnu.org In-Reply-To: <20020212100011.B5B9.LEKTU@terra.es> X-BkRandomSig-Folder: 3ade7ea7.mb\Emacs\Emacs-Devel\ X-Mailer: Becky! ver. 2.00.07 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1029 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1029 > I'll try to debug what's happening On x-display-color-cells: > if (cap < 0) > cap = 1 << (dpyinfo->n_planes * dpyinfo->n_cbits); At this moment dpyinfo->n_planes == 1 and dpyinfo->n_cbits == 32. (Aside: Interestingly, cap = 1 << 32; is statically determined by MSVC to be 0, but x = 32; cap = 1 << x; is 1.) Anway, 1 << 32 is an error because it's obviously going to overflow cap. Something like if (cap < 0) { int depth = dpyinfo->n_planes * dpyinfo->n_cbits; if (depth > SOME_VALUE) { cap = 1 << SOME_VALUE; else cap = 1 << depth; } is posible, but: 1.- Is not pretty. 2.- There's no obvious SOME_VALUE; probably it would vary between 16-bit and 32-bit Windows, the graphics card and driver, etc. 3.- Something's wrong here, I think. Even before Eli's change on list-colors-display, that function listed more colors that my driver was able to display simultaneously (because some of them appeared as equal). OTOH, the driver is saying that it is not palette-based... :( As expected, setting my Windows in 24-bit color mode works fine. /L/e/k/t/u _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel