From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.devel Subject: XCHAR2B_BYTE[12] definitions in NS Date: Tue, 15 Jul 2014 18:02:50 +0900 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1405414993 19029 80.91.229.3 (15 Jul 2014 09:03:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jul 2014 09:03:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 15 11:03:06 2014 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 1X6yde-0007tZ-Ft for ged-emacs-devel@m.gmane.org; Tue, 15 Jul 2014 11:03:06 +0200 Original-Received: from localhost ([::1]:33622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6yde-0000K9-33 for ged-emacs-devel@m.gmane.org; Tue, 15 Jul 2014 05:03:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6ydX-0000K1-8i for emacs-devel@gnu.org; Tue, 15 Jul 2014 05:03:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6ydS-0006PW-V6 for emacs-devel@gnu.org; Tue, 15 Jul 2014 05:02:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6ydS-0006PR-S5 for emacs-devel@gnu.org; Tue, 15 Jul 2014 05:02:54 -0400 Original-Received: from du-a.org ([2001:e41:db5e:fb14::1]:41617 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1X6ydS-0007wH-Dn for emacs-devel@gnu.org; Tue, 15 Jul 2014 05:02:54 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:173036 Archived-At: --=-=-= Content-Type: text/plain Hi, While I'm doing some experiment based on the NS port, I sometimes get unexpected glyph index, because of missing parentheses in XCHAR2B_BYTE[12] definitions (patch attached). I believe those macros are not actually used by the NS port, but maybe good to fix it to avoid any confusion. OK to commit, or perhaps they should be completely removed? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nsgui.h.patch === modified file 'src/ChangeLog' --- src/ChangeLog 2014-07-14 19:23:18 +0000 +++ src/ChangeLog 2014-07-15 08:48:30 +0000 @@ -1,3 +1,9 @@ +2014-07-15 Daiki Ueno + + * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around + pointer argument, before dereferencing. + (XCHAR2B_BYTE2): Likewise. + 2014-07-14 Paul Eggert Use binary-io module, O_BINARY, and "b" flag (Bug#18006). === modified file 'src/nsgui.h' --- src/nsgui.h 2014-06-02 18:01:21 +0000 +++ src/nsgui.h 2014-07-15 06:40:08 +0000 @@ -68,10 +68,10 @@ (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff)))) #define XCHAR2B_BYTE1(chp) \ - (((*chp) & 0xff00) >> 8) + ((*(chp) & 0xff00) >> 8) #define XCHAR2B_BYTE2(chp) \ - ((*chp) & 0x00ff) + (*(chp) & 0x00ff) /* XXX: xfaces requires these structures, but the question is are we --=-=-= Content-Type: text/plain Regards, -- Daiki Ueno --=-=-=--