]> git.eshelyaron.com Git - emacs.git/commitdiff
Move back the XChar2b definition to w32gui.h and nsgui.h
authorDaiki Ueno <ueno@gnu.org>
Wed, 16 Jul 2014 04:31:31 +0000 (13:31 +0900)
committerDaiki Ueno <ueno@gnu.org>
Wed, 16 Jul 2014 04:31:31 +0000 (13:31 +0900)
Fix the last change.  XChar2b still needs to be defined platform dependently,
to match with the argument types of drawing functions.

src/ChangeLog
src/dispextern.h
src/nsgui.h
src/w32gui.h

index 70c76e34c8c8bf8b4d6ea268360d5a5d908dfc24..2d81cf2f465507a7337e9e6499812c2a32b70e22 100644 (file)
@@ -3,10 +3,10 @@
        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.
+       * w32gui.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move the
+       fallback definitions to dispextern.h.
+       * nsgui.h (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.
index 615d41d5a7f77ca39318de6f14802e17b03795ad..6e8758218b4cbe9092d8560ce7a2f2adbc5f7687 100644 (file)
@@ -51,8 +51,6 @@ typedef struct {
   char pad;
 } XColor;
 
-typedef unsigned short XChar2b;
-
 #define STORE_XCHAR2B(chp, b1, b2) \
   (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
 
index b38b4482b87a5d9c3ce7ba39fb06a06caa4eda35..3cc011f664617e7ba1f4ac3e1d3407a7aef8e6c8 100644 (file)
@@ -58,6 +58,14 @@ typedef struct _XCharStruct
   int descent;
 } XCharStruct;
 
+/* Fake structure from Xlib.h to represent two-byte characters.  */
+#ifdef HAVE_NS
+#ifndef __OBJC__
+typedef unsigned short unichar;
+#endif
+typedef unichar XChar2b;
+#endif
+
 
 /* XXX: xfaces requires these structures, but the question is are we
         forced to use them? */
index 8642c479be86e9398929b50ee260d442f636c255..40a8a00346d9ec27f6f34d5e99207ac16eb1b08f 100644 (file)
@@ -52,6 +52,8 @@ typedef HCURSOR Cursor;
 
 #define No_Cursor (0)
 
+#define XChar2b wchar_t
+
 
 /* Windows equivalent of XImage.  */
 typedef struct _XImage