diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-07-16 14:44:05 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-07-16 14:44:05 +0900 |
commit | 74660d84d923fd8252b166770ca2403f6025a7ac (patch) | |
tree | d137a32d62ad19c33bf4750ee6db32f4c3508a7f /src/w32gui.h | |
parent | 037a830b500e5640335b2a45ccd52510fc5dc88b (diff) |
Revert 2014-07-16T04:11:08Z!ueno@gnu.org and fix XCHAR2B_BYTE[12] in nsgui.h only
* nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
pointer argument, before dereferencing.
(XCHAR2B_BYTE2): Likewise.
Diffstat (limited to 'src/w32gui.h')
-rw-r--r-- | src/w32gui.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/w32gui.h b/src/w32gui.h index 40a8a00346..d04ce625d1 100644 --- a/src/w32gui.h +++ b/src/w32gui.h @@ -54,6 +54,16 @@ typedef HCURSOR Cursor; #define XChar2b wchar_t +/* Dealing with bits of wchar_t as if they were an XChar2b. */ +#define STORE_XCHAR2B(chp, byte1, byte2) \ + ((*(chp)) = ((XChar2b)((((byte1) & 0x00ff) << 8) | ((byte2) & 0x00ff)))) + +#define XCHAR2B_BYTE1(chp) \ + (((*(chp)) & 0xff00) >> 8) + +#define XCHAR2B_BYTE2(chp) \ + ((*(chp)) & 0x00ff) + /* Windows equivalent of XImage. */ typedef struct _XImage |