[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117541: Revert r117538 and fix XCHAR2B_BYTE[12] in
From: |
Daiki Ueno |
Subject: |
[Emacs-diffs] trunk r117541: Revert r117538 and fix XCHAR2B_BYTE[12] in nsgui.h only |
Date: |
Wed, 16 Jul 2014 05:46:00 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117541
revision-id: address@hidden
parent: address@hidden
committer: Daiki Ueno <address@hidden>
branch nick: trunk
timestamp: Wed 2014-07-16 14:44:05 +0900
message:
Revert r117538 and fix XCHAR2B_BYTE[12] in nsgui.h only
* nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
pointer argument, before dereferencing.
(XCHAR2B_BYTE2): Likewise.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/dispextern.h
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
src/nsgui.h nsgui.h-20091113204419-o5vbwnq5f7feedwu-8742
src/w32gui.h w32gui.h-20091113204419-o5vbwnq5f7feedwu-946
src/xterm.h xterm.h-20091113204419-o5vbwnq5f7feedwu-228
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-07-16 04:31:31 +0000
+++ b/src/ChangeLog 2014-07-16 05:44:05 +0000
@@ -1,15 +1,8 @@
-2014-07-16 Daiki Ueno <address@hidden>
+2014-07-15 Daiki Ueno <address@hidden>
- 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 (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.
+ * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
+ pointer argument, before dereferencing.
+ (XCHAR2B_BYTE2): Likewise.
2014-07-15 Dmitry Antipov <address@hidden>
=== modified file 'src/dispextern.h'
--- a/src/dispextern.h 2014-07-16 04:31:31 +0000
+++ b/src/dispextern.h 2014-07-16 05:44:05 +0000
@@ -31,15 +31,6 @@
#include <X11/Intrinsic.h>
#endif /* USE_X_TOOLKIT */
-#define STORE_XCHAR2B(chp, b1, b2) \
- ((chp)->byte1 = (b1), (chp)->byte2 = (b2))
-
-#define XCHAR2B_BYTE1(chp) \
- ((chp)->byte1)
-
-#define XCHAR2B_BYTE2(chp) \
- ((chp)->byte2)
-
#else /* !HAVE_X_WINDOWS */
/* X-related stuff used by non-X gui code. */
@@ -51,15 +42,6 @@
char pad;
} XColor;
-#define STORE_XCHAR2B(chp, b1, b2) \
- (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
-
-#define XCHAR2B_BYTE1(chp) \
- ((*(chp) & 0xff00) >> 8)
-
-#define XCHAR2B_BYTE2(chp) \
- (*(chp) & 0x00ff)
-
#endif /* HAVE_X_WINDOWS */
#ifdef MSDOS
=== modified file 'src/nsgui.h'
--- a/src/nsgui.h 2014-07-16 04:40:43 +0000
+++ b/src/nsgui.h 2014-07-16 05:44:05 +0000
@@ -64,6 +64,15 @@
#endif
typedef unichar XChar2b;
+#define STORE_XCHAR2B(chp, b1, b2) \
+ (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
+
+#define XCHAR2B_BYTE1(chp) \
+ ((*(chp) & 0xff00) >> 8)
+
+#define XCHAR2B_BYTE2(chp) \
+ (*(chp) & 0x00ff)
+
/* XXX: xfaces requires these structures, but the question is are we
forced to use them? */
=== modified file 'src/w32gui.h'
--- a/src/w32gui.h 2014-07-16 04:31:31 +0000
+++ b/src/w32gui.h 2014-07-16 05:44:05 +0000
@@ -54,6 +54,16 @@
#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
=== modified file 'src/xterm.h'
--- a/src/xterm.h 2014-07-16 04:11:08 +0000
+++ b/src/xterm.h 2014-07-16 05:44:05 +0000
@@ -1047,6 +1047,15 @@
#define FRAME_X_EMBEDDED_P(f) (FRAME_X_OUTPUT(f)->explicit_parent != 0)
+#define STORE_XCHAR2B(chp, b1, b2) \
+ ((chp)->byte1 = (b1), (chp)->byte2 = (b2))
+
+#define XCHAR2B_BYTE1(chp) \
+ ((chp)->byte1)
+
+#define XCHAR2B_BYTE2(chp) \
+ ((chp)->byte2)
+
#define STORE_NATIVE_RECT(nr,rx,ry,rwidth,rheight) \
((nr).x = (rx), \
(nr).y = (ry), \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117541: Revert r117538 and fix XCHAR2B_BYTE[12] in nsgui.h only,
Daiki Ueno <=