emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCHAR2B_BYTE[12] definitions in NS


From: Jan Djärv
Subject: Re: XCHAR2B_BYTE[12] definitions in NS
Date: Tue, 15 Jul 2014 15:20:51 +0200

Hello.

15 jul 2014 kl. 11:02 skrev Daiki Ueno <address@hidden>:

> 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?
> 

They are used in xdisp.c which is generic code.
W32 has similar macros.  Maybe move to a common h-file and remove w32 and 
ns-specific macros?

        Jan D.

> === 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  <address@hidden>
> +
> +     * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
> +     pointer argument, before dereferencing.
> +     (XCHAR2B_BYTE2): Likewise.
> +
> 2014-07-14  Paul Eggert  <address@hidden>
> 
>       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
> 
> 
> Regards,
> --
> Daiki Ueno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]