author | henryzh <henry.zhao@oracle.com> |
Tue, 17 Jul 2012 17:45:27 -0700 | |
changeset 1312 | b73ae360c059 |
parent 1276 | 52f85727ce94 |
child 1351 | 9ad483eabd22 |
permissions | -rw-r--r-- |
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
1 |
diff --git a/Xi/exevents.c b/Xi/exevents.c |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
2 |
index f681a8b..9ffb87f 100644 |
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
3 |
--- a/Xi/exevents.c |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
4 |
+++ b/Xi/exevents.c |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
5 |
@@ -225,7 +225,16 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) |
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
6 |
{ |
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
7 |
KeyClassPtr mk = master->key; |
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
8 |
|
764 | 9 |
+#ifdef SUNSOFT |
10 |
+ DeviceIntPtr mdev = dixLookupPrivate(&master->devPrivates, |
|
11 |
+ HotkeyMapDevicePrivateKey); |
|
12 |
+#endif |
|
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
13 |
+ |
764 | 14 |
+#ifdef SUNSOFT |
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
15 |
+ if ((device == master) || (device == mdev)) |
764 | 16 |
+#else |
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
17 |
if (device == master) |
764 | 18 |
+#endif |
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
19 |
return; |
764 | 20 |
|
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
21 |
mk->sourceid = device->id; |
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
22 |
diff --git a/Xi/extinit.c b/Xi/extinit.c |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
23 |
index 4483076..e40c5d0 100644 |
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
24 |
--- a/Xi/extinit.c |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
25 |
+++ b/Xi/extinit.c |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
26 |
@@ -367,6 +367,10 @@ extern XExtensionVersion XIVersion; |
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
27 |
|
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
28 |
Mask PropagateMask[MAXDEVICES]; |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
29 |
|
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
30 |
+#ifdef SUNSOFT |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
31 |
+DevPrivateKeyRec HotkeyMapDevicePrivateKeyRec; |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
32 |
+#endif |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
33 |
+ |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
34 |
/***************************************************************** |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
35 |
* |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
36 |
* Versioning support |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
37 |
@@ -1260,6 +1264,11 @@ XInputExtensionInit(void) |
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
38 |
(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec))) |
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
39 |
FatalError("Cannot request private for XI.\n"); |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
40 |
|
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
41 |
+#ifdef SUNSOFT |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
42 |
+ if (!dixRegisterPrivateKey(&HotkeyMapDevicePrivateKeyRec, PRIVATE_DEVICE, 0)) |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
43 |
+ FatalError("Cannot request private for hotkey.\n"); |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
44 |
+#endif |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
45 |
+ |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
46 |
if (!AddCallback(&ClientStateCallback, XIClientCallback, 0)) |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
47 |
FatalError("Failed to add callback to XI.\n"); |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
48 |
|
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
49 |
diff --git a/config/hal.c b/config/hal.c |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
50 |
index 2ead556..c3eab4a 100644 |
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
51 |
--- a/config/hal.c |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
52 |
+++ b/config/hal.c |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
53 |
@@ -123,6 +123,49 @@ get_prop_string_array(LibHalContext * hal_ctx, const char *udi, |
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
54 |
return ret; |
764 | 55 |
} |
56 |
||
57 |
+#ifdef SUNSOFT |
|
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
58 |
+static void |
764 | 59 |
+add_extra_device(char *driver) |
60 |
+{ |
|
61 |
+ DeviceIntPtr dev; |
|
62 |
+ char *config_info = NULL; |
|
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
63 |
+ InputOption *input_options = NULL; |
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
64 |
+ InputAttributes attrs = {0}; |
764 | 65 |
+ |
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
66 |
+ input_options = input_option_new(NULL, "_source", "server/hal"); |
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
67 |
+ if (!input_options){ |
764 | 68 |
+ LogMessage(X_ERROR, "config/hal: couldn't allocate first key/value pair\n"); |
69 |
+ goto unwind; |
|
70 |
+ } |
|
71 |
+ |
|
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
72 |
+ input_options = input_option_new(input_options, "driver", driver); |
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
73 |
+ input_options = input_option_new(input_options, "name", driver); |
764 | 74 |
+ |
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
75 |
+ if (!asprintf(&config_info, "hal:%s", driver) == -1) { |
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
76 |
+ config_info = NULL; |
764 | 77 |
+ LogMessage(X_ERROR, "config/hal: couldn't allocate name\n"); |
78 |
+ goto unwind; |
|
79 |
+ } |
|
80 |
+ |
|
81 |
+ /* Check for duplicate devices */ |
|
82 |
+ if (device_is_duplicate(config_info)) |
|
83 |
+ goto unwind; |
|
84 |
+ |
|
85 |
+ LogMessage(X_INFO, "config/hal: Adding input device %s\n", driver); |
|
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
86 |
+ if (NewInputDeviceRequest(input_options, &attrs, &dev) != Success) { |
764 | 87 |
+ LogMessage(X_ERROR, "config/hal: NewInputDeviceRequest failed\n"); |
88 |
+ dev = NULL; |
|
89 |
+ goto unwind; |
|
90 |
+ } |
|
91 |
+ |
|
92 |
+ dev->config_info = xstrdup(config_info); |
|
93 |
+ |
|
94 |
+unwind: |
|
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
95 |
+ xfree(config_info); |
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
96 |
+ input_option_free_list(&input_options); |
764 | 97 |
+} |
98 |
+#endif |
|
99 |
+ |
|
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
100 |
static void |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
101 |
device_added(LibHalContext * hal_ctx, const char *udi) |
764 | 102 |
{ |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
103 |
@@ -382,6 +425,14 @@ device_added(LibHalContext * hal_ctx, const char *udi) |
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
104 |
input_option_new(input_options, "xkb_options", xkb_opts.options); |
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
105 |
input_options = input_option_new(input_options, "config_info", config_info); |
764 | 106 |
|
107 |
+#ifdef SUNSOFT |
|
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
108 |
+ InputOption *md = input_option_find(input_options, "mdriver"); |
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
109 |
+ if (md) { |
1312
b73ae360c059
7177118 laptop: hotkey driver not loaded in s11u1b17
henryzh <henry.zhao@oracle.com>
parents:
1276
diff
changeset
|
110 |
+ char *mdriver = input_option_get_value(md); |
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
111 |
+ add_extra_device (mdriver); |
764 | 112 |
+ } |
113 |
+#endif |
|
114 |
+ |
|
115 |
/* this isn't an error, but how else do you output something that the user can see? */ |
|
116 |
LogMessage(X_INFO, "config/hal: Adding input device %s\n", name); |
|
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
117 |
if ((rc = NewInputDeviceRequest(input_options, &attrs, &dev)) != Success) { |
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
118 |
diff --git a/config/x11-input.fdi b/config/x11-input.fdi |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
119 |
index b263f36..425aec2 100644 |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
120 |
--- a/config/x11-input.fdi |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
121 |
+++ b/config/x11-input.fdi |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
122 |
@@ -71,6 +71,12 @@ |
764 | 123 |
<!-- If we're using Linux, we use evdev by default (falling back to |
124 |
kbd otherwise). --> |
|
125 |
<merge key="input.x11_driver" type="string">kbd</merge> |
|
126 |
+ <match key="/org/freedesktop/Hal/devices/computer:system.formfactor" string="laptop"> |
|
127 |
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" |
|
128 |
+ string="SunOS"> |
|
129 |
+ <merge key="input.x11_options.mdriver" type="string">hotkey</merge> |
|
130 |
+ </match> |
|
131 |
+ </match> |
|
132 |
<merge key="input.x11_options.XkbModel" type="string">pc105</merge> |
|
133 |
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" |
|
134 |
string="Linux"> |
|
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
135 |
diff --git a/include/inputstr.h b/include/inputstr.h |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
136 |
index 841e805..a338ea8 100644 |
1124
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
137 |
--- a/include/inputstr.h |
7bc7e624f965
7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1088
diff
changeset
|
138 |
+++ b/include/inputstr.h |
1276
52f85727ce94
7161868 Update X.Org modules to X11R7.7 RC1
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1265
diff
changeset
|
139 |
@@ -57,6 +57,11 @@ SOFTWARE. |
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
140 |
#include "geext.h" |
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
141 |
#include "privates.h" |
764 | 142 |
|
143 |
+#ifdef SUNSOFT |
|
1088
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
144 |
+extern _X_EXPORT DevPrivateKeyRec HotkeyMapDevicePrivateKeyRec; |
1c99106ccbe0
6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
851
diff
changeset
|
145 |
+#define HotkeyMapDevicePrivateKey (&HotkeyMapDevicePrivateKeyRec) |
764 | 146 |
+#endif |
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
147 |
+ |
1265
0b5cc5c013e4
7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents:
1179
diff
changeset
|
148 |
#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))) |
851
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
149 |
#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) |
d428083dbbdd
6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
764
diff
changeset
|
150 |
#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7))) |