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: Wed, 13 Feb 2002 18:07:15 +0100 Message-ID: <20020213173417.E323.LEKTU@terra.es> References: <20020212125234.B5C4.LEKTU@terra.es> <200202131539.g1DFd0x08788@aztec.santafe.edu> 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 1013620845 16228 195.204.10.66 (13 Feb 2002 17:20:45 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 13 Feb 2002 17:20:45 GMT Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16b35I-0004De-00 for ; Wed, 13 Feb 2002 18:20:44 +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 16b2u4-00011L-00; Wed, 13 Feb 2002 12:09: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 16b2sN-0000wA-00 for ; Wed, 13 Feb 2002 12:07:23 -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 g1DH7FV22358 for ; Wed, 13 Feb 2002 18:07:15 +0100 Original-To: emacs-devel@gnu.org In-Reply-To: <200202131539.g1DFd0x08788@aztec.santafe.edu> 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:1082 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1082 On Wed, 13 Feb 2002 08:39:00 -0700 (MST), Richard Stallman wrote: > It is an error to use the C shift operator with those arguments. > So this code clearly is one bug, and needs to be fixed. > Maybe that fix will solve the problem you are encountering. cap is make_number'd, so this is a posible fix. /L/e/k/t/u 2002-02-13 Juanma Barranquero * w32fns.c (Fx_display_color_cells): Don't allow number of color cells to overflow EMACS_INT size. Index: w32fns.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/w32fns.c,v retrieving revision 1.154 diff -u -c -r1.154 w32fns.c *** w32fns.c 9 Feb 2002 01:31:07 -0000 1.154 --- w32fns.c 13 Feb 2002 17:01:13 -0000 *************** *** 7654,7660 **** cap = GetDeviceCaps (hdc,NUMCOLORS); if (cap < 0) ! cap = 1 << (dpyinfo->n_planes * dpyinfo->n_cbits); ReleaseDC (dpyinfo->root_window, hdc); --- 7654,7660 ---- cap = GetDeviceCaps (hdc,NUMCOLORS); if (cap < 0) ! cap = 1 << min(dpyinfo->n_planes * dpyinfo->n_cbits, VALBITS - 2); ReleaseDC (dpyinfo->root_window, hdc); _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel