diff options
| author | Daiki Ueno | 2014-07-16 13:11:08 +0900 |
|---|---|---|
| committer | Daiki Ueno | 2014-07-16 13:11:08 +0900 |
| commit | 1c6fefc9557ac174cea6b2d41f0eb3bdb1cced3a (patch) | |
| tree | 6e560c0d010d720080a7f01b9feda503ec93b966 /src/nsgui.h | |
| parent | 7e6d13fea41769d1e66dd1c9cd8b6d61f96da39b (diff) | |
| download | emacs-1c6fefc9557ac174cea6b2d41f0eb3bdb1cced3a.tar.gz emacs-1c6fefc9557ac174cea6b2d41f0eb3bdb1cced3a.zip | |
Consolidate XChar2b macros for the X, W32, and NS
Suggested by Jan Djärv in:
https://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00203.html
* w32gui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
Move the fallback definitions to dispextern.h.
* nsgui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
Likewise. Share the same definition with W32.
* xterm.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move to ...
* dispextern.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
... here for the consistency with W32 and NS.
Diffstat (limited to 'src/nsgui.h')
| -rw-r--r-- | src/nsgui.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/nsgui.h b/src/nsgui.h index 0e1e9bb73e9..b38b4482b87 100644 --- a/src/nsgui.h +++ b/src/nsgui.h | |||
| @@ -58,21 +58,6 @@ typedef struct _XCharStruct | |||
| 58 | int descent; | 58 | int descent; |
| 59 | } XCharStruct; | 59 | } XCharStruct; |
| 60 | 60 | ||
| 61 | /* Fake structure from Xlib.h to represent two-byte characters. */ | ||
| 62 | #ifndef __OBJC__ | ||
| 63 | typedef unsigned short unichar; | ||
| 64 | #endif | ||
| 65 | typedef unichar XChar2b; | ||
| 66 | |||
| 67 | #define STORE_XCHAR2B(chp, b1, b2) \ | ||
| 68 | (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff)))) | ||
| 69 | |||
| 70 | #define XCHAR2B_BYTE1(chp) \ | ||
| 71 | (((*chp) & 0xff00) >> 8) | ||
| 72 | |||
| 73 | #define XCHAR2B_BYTE2(chp) \ | ||
| 74 | ((*chp) & 0x00ff) | ||
| 75 | |||
| 76 | 61 | ||
| 77 | /* XXX: xfaces requires these structures, but the question is are we | 62 | /* XXX: xfaces requires these structures, but the question is are we |
| 78 | forced to use them? */ | 63 | forced to use them? */ |