Commit 4fe322aa99de2d56c28d5ded14e16a980edb332e

Dan Nicholson 2009-03-27T20:13:22

libxkbcomp: s/XPointer/char */ Replace XPointer with its definition since we don't have the privilege of using Xlib.h. Why this is char * and not void *, I'll never know.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index 6b27ac9..c4ed983 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -383,7 +383,7 @@ CheckModifierField(XkbcDescPtr xkb,
             return True;
         }
     }
-    if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (XPointer) xkb))
+    if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
         return ReportMismatch(action, F_Modifiers, "modifier mask");
     *mods_rtrn = rtrn.uval;
     *flags_inout &= ~XkbSA_UseModMapMods;
@@ -494,7 +494,7 @@ CheckGroupField(unsigned action,
         spec = value;
     }
 
-    if (!ExprResolveInteger(spec, &rtrn, SimpleLookup, (XPointer) groupNames))
+    if (!ExprResolveInteger(spec, &rtrn, SimpleLookup, (char *) groupNames))
         return ReportMismatch(action, F_Group, "integer (range 1..8)");
     if ((rtrn.ival < 1) || (rtrn.ival > XkbNumKbdGroups))
     {
@@ -663,7 +663,7 @@ HandlePtrBtn(XkbcDescPtr xkb,
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
         if (!ExprResolveInteger
-            (value, &rtrn, SimpleLookup, (XPointer) btnNames))
+            (value, &rtrn, SimpleLookup, (char *) btnNames))
             return ReportMismatch(action->type, field,
                                   "integer (range 1..5)");
         if ((rtrn.ival < 0) || (rtrn.ival > 5))
@@ -690,7 +690,7 @@ HandlePtrBtn(XkbcDescPtr xkb,
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
         if (!ExprResolveInteger
-            (value, &rtrn, SimpleLookup, (XPointer) btnNames))
+            (value, &rtrn, SimpleLookup, (char *) btnNames))
             return ReportMismatch(action->type, field, "integer");
         if ((rtrn.ival < 0) || (rtrn.ival > 255))
         {
@@ -746,7 +746,7 @@ HandleSetPtrDflt(XkbcDescPtr xkb,
         }
 
         if (!ExprResolveInteger
-            (btn, &rtrn, SimpleLookup, (XPointer) btnNames))
+            (btn, &rtrn, SimpleLookup, (char *) btnNames))
             return ReportMismatch(action->type, field,
                                   "integer (range 1..5)");
         if ((rtrn.ival < 0) || (rtrn.ival > 5))
@@ -824,7 +824,7 @@ HandleISOLock(XkbcDescPtr xkb,
     case F_Affect:
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
-        if (!ExprResolveMask(value, &rtrn, SimpleLookup, (XPointer) isoNames))
+        if (!ExprResolveMask(value, &rtrn, SimpleLookup, (char *) isoNames))
             return ReportMismatch(action->type, field, "keyboard component");
         act->affect = (~rtrn.uval) & XkbSA_ISOAffectMask;
         return True;
@@ -938,7 +938,7 @@ HandleSetLockControls(XkbcDescPtr xkb,
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
         if (!ExprResolveMask
-            (value, &rtrn, SimpleLookup, (XPointer) ctrlNames))
+            (value, &rtrn, SimpleLookup, (char *) ctrlNames))
             return ReportMismatch(action->type, field, "controls mask");
         XkbActionSetCtrls(act, rtrn.uval);
         return True;
@@ -970,7 +970,7 @@ HandleActionMessage(XkbcDescPtr xkb,
     case F_Report:
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
-        if (!ExprResolveMask(value, &rtrn, SimpleLookup, (XPointer) evNames))
+        if (!ExprResolveMask(value, &rtrn, SimpleLookup, (char *) evNames))
             return ReportMismatch(action->type, field, "key event mask");
         act->flags &= ~(XkbSA_MessageOnPress | XkbSA_MessageOnRelease);
         act->flags =
@@ -1130,7 +1130,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
         if (!ExprResolveInteger
-            (value, &rtrn, SimpleLookup, (XPointer) btnNames))
+            (value, &rtrn, SimpleLookup, (char *) btnNames))
             return ReportMismatch(action->type, field, "integer");
         if ((rtrn.ival < 0) || (rtrn.ival > 255))
         {
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 061578d..d870fc1 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -699,7 +699,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
     }
     tmp.fileID = info->fileID;
     tmp.merge = merge;
-    if (!ExprResolveModMask(def->def, &val, LookupVModMask, (XPointer) xkb))
+    if (!ExprResolveModMask(def->def, &val, LookupVModMask, (char *) xkb))
     {
         ERROR("Expected a modifier mask in group compatibility definition\n");
         ACTION1("Ignoring illegal compatibility map for group %d\n",
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index 96fd956..caf288b 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -154,7 +154,7 @@ ExprResolveLhs(ExprDef * expr,
 }
 
 Bool
-SimpleLookup(XPointer priv,
+SimpleLookup(char * priv,
              Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
 {
     LookupEntry *entry;
@@ -182,7 +182,7 @@ SimpleLookup(XPointer priv,
 }
 
 Bool
-RadioLookup(XPointer priv,
+RadioLookup(char * priv,
             Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
 {
     register char *str;
@@ -210,7 +210,7 @@ RadioLookup(XPointer priv,
 }
 
 int
-TableLookup(XPointer priv,
+TableLookup(char * priv,
             Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
 {
     LookupTable *tbl = (LookupTable *) priv;
@@ -231,7 +231,7 @@ TableLookup(XPointer priv,
     }
     if (tbl == NULL)            /* didn't find a matching element */
         return False;
-    priv = (XPointer) tbl->entries;
+    priv = (char *) tbl->entries;
     return SimpleLookup(priv, (Atom) None, field, type, val_rtrn);
 }
 
@@ -249,15 +249,15 @@ static LookupEntry modIndexNames[] = {
 };
 
 int
-LookupModIndex(XPointer priv,
+LookupModIndex(char * priv,
                Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
 {
-    return SimpleLookup((XPointer) modIndexNames, elem, field, type,
+    return SimpleLookup((char *) modIndexNames, elem, field, type,
                         val_rtrn);
 }
 
 int
-LookupModMask(XPointer priv,
+LookupModMask(char * priv,
               Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
 {
     char *str;
@@ -289,7 +289,7 @@ LookupModMask(XPointer priv,
 int
 ExprResolveModIndex(ExprDef * expr,
                     ExprResult * val_rtrn,
-                    IdentLookupFunc lookup, XPointer lookupPriv)
+                    IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     char *bogus = NULL;
@@ -366,20 +366,20 @@ ExprResolveModIndex(ExprDef * expr,
 int
 ExprResolveModMask(ExprDef * expr,
                    ExprResult * val_rtrn,
-                   IdentLookupFunc lookup, XPointer lookupPriv)
+                   IdentLookupFunc lookup, char * lookupPriv)
 {
     LookupPriv priv;
 
     priv.priv = NULL;
     priv.chain = lookup;
     priv.chainPriv = lookupPriv;
-    return ExprResolveMask(expr, val_rtrn, LookupModMask, (XPointer) & priv);
+    return ExprResolveMask(expr, val_rtrn, LookupModMask, (char *) & priv);
 }
 
 int
 ExprResolveBoolean(ExprDef * expr,
                    ExprResult * val_rtrn,
-                   IdentLookupFunc lookup, XPointer lookupPriv)
+                   IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     char *bogus = NULL;
@@ -475,7 +475,7 @@ ExprResolveBoolean(ExprDef * expr,
 int
 ExprResolveFloat(ExprDef * expr,
                  ExprResult * val_rtrn,
-                 IdentLookupFunc lookup, XPointer lookupPriv)
+                 IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     ExprResult leftRtrn, rightRtrn;
@@ -588,7 +588,7 @@ ExprResolveFloat(ExprDef * expr,
 int
 ExprResolveInteger(ExprDef * expr,
                    ExprResult * val_rtrn,
-                   IdentLookupFunc lookup, XPointer lookupPriv)
+                   IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     ExprResult leftRtrn, rightRtrn;
@@ -709,7 +709,7 @@ ExprResolveInteger(ExprDef * expr,
 int
 ExprResolveString(ExprDef * expr,
                   ExprResult * val_rtrn,
-                  IdentLookupFunc lookup, XPointer lookupPriv)
+                  IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     ExprResult leftRtrn, rightRtrn;
@@ -817,7 +817,7 @@ ExprResolveString(ExprDef * expr,
 int
 ExprResolveKeyName(ExprDef * expr,
                    ExprResult * val_rtrn,
-                   IdentLookupFunc lookup, XPointer lookupPriv)
+                   IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     ExprDef *left;
@@ -912,7 +912,7 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
                exprOpText(expr->op));
         return False;
     }
-    if (!SimpleLookup((XPointer) values, (Atom) None, expr->value.str,
+    if (!SimpleLookup((char *) values, (Atom) None, expr->value.str,
                       (unsigned) TypeInt, val_rtrn))
     {
         int nOut = 0;
@@ -936,7 +936,7 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
 int
 ExprResolveMask(ExprDef * expr,
                 ExprResult * val_rtrn,
-                IdentLookupFunc lookup, XPointer lookupPriv)
+                IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     ExprResult leftRtrn, rightRtrn;
@@ -1043,7 +1043,7 @@ ExprResolveMask(ExprDef * expr,
 int
 ExprResolveKeySym(ExprDef * expr,
                   ExprResult * val_rtrn,
-                  IdentLookupFunc lookup, XPointer lookupPriv)
+                  IdentLookupFunc lookup, char * lookupPriv)
 {
     int ok = 0;
     KeySym sym;
diff --git a/src/xkbcomp/expr.h b/src/xkbcomp/expr.h
index 02519f9..bf2528c 100644
--- a/src/xkbcomp/expr.h
+++ b/src/xkbcomp/expr.h
@@ -35,7 +35,7 @@ typedef union _ExprResult
     XkbKeyNameRec keyName;
 } ExprResult;
 
-typedef Bool(*IdentLookupFunc) (XPointer /* priv */ ,
+typedef Bool(*IdentLookupFunc) (char * /* priv */ ,
                                 Atom /* elem */ ,
                                 Atom /* field */ ,
                                 unsigned /* type */ ,
@@ -53,9 +53,9 @@ extern int ExprResolveLhs(ExprDef * /* expr */ ,
 
 typedef struct _LookupPriv
 {
-    XPointer priv;
+    char * priv;
     IdentLookupFunc chain;
-    XPointer chainPriv;
+    char * chainPriv;
 } LookupPriv;
 
 typedef struct _LookupEntry
@@ -75,35 +75,35 @@ typedef struct _LookupTable
 extern char *exprOpText(unsigned        /* type */
     );
 
-extern int RadioLookup(XPointer /* priv */ ,
+extern int RadioLookup(char * /* priv */ ,
                        Atom /* elem */ ,
                        Atom /* field */ ,
                        unsigned /* type */ ,
                        ExprResult *     /* val_rtrn */
     );
 
-extern int SimpleLookup(XPointer /* priv */ ,
+extern int SimpleLookup(char * /* priv */ ,
                         Atom /* elem */ ,
                         Atom /* field */ ,
                         unsigned /* type */ ,
                         ExprResult *    /* val_rtrn */
     );
 
-extern int TableLookup(XPointer /* priv */ ,
+extern int TableLookup(char * /* priv */ ,
                        Atom /* elem */ ,
                        Atom /* field */ ,
                        unsigned /* type */ ,
                        ExprResult *     /* val_rtrn */
     );
 
-extern int LookupModIndex(XPointer /* priv */ ,
+extern int LookupModIndex(char * /* priv */ ,
                           Atom /* elem */ ,
                           Atom /* field */ ,
                           unsigned /* type */ ,
                           ExprResult *  /* val_rtrn */
     );
 
-extern int LookupModMask(XPointer /* priv */ ,
+extern int LookupModMask(char * /* priv */ ,
                          Atom /* elem */ ,
                          Atom /* field */ ,
                          unsigned /* type */ ,
@@ -113,43 +113,43 @@ extern int LookupModMask(XPointer /* priv */ ,
 extern int ExprResolveModIndex(ExprDef * /* expr */ ,
                                ExprResult * /* val_rtrn */ ,
                                IdentLookupFunc /* lookup */ ,
-                               XPointer /* lookupPriv */
+                               char * /* lookupPriv */
     );
 
 extern int ExprResolveModMask(ExprDef * /* expr */ ,
                               ExprResult * /* val_rtrn */ ,
                               IdentLookupFunc /* lookup */ ,
-                              XPointer  /* priv */
+                              char *  /* priv */
     );
 
 extern int ExprResolveBoolean(ExprDef * /* expr */ ,
                               ExprResult * /* val_rtrn */ ,
                               IdentLookupFunc /* lookup */ ,
-                              XPointer  /* lookupPriv */
+                              char *  /* lookupPriv */
     );
 
 extern int ExprResolveInteger(ExprDef * /* expr */ ,
                               ExprResult * /* val_rtrn */ ,
                               IdentLookupFunc /* lookup */ ,
-                              XPointer  /* lookupPriv */
+                              char *  /* lookupPriv */
     );
 
 extern int ExprResolveFloat(ExprDef * /* expr */ ,
                             ExprResult * /* val_rtrn */ ,
                             IdentLookupFunc /* lookup */ ,
-                            XPointer    /* lookupPriv */
+                            char *    /* lookupPriv */
     );
 
 extern int ExprResolveString(ExprDef * /* expr */ ,
                              ExprResult * /* val_rtrn */ ,
                              IdentLookupFunc /* lookup */ ,
-                             XPointer   /* lookupPriv */
+                             char *   /* lookupPriv */
     );
 
 extern int ExprResolveKeyName(ExprDef * /* expr */ ,
                               ExprResult * /* val_rtrn */ ,
                               IdentLookupFunc /* lookup */ ,
-                              XPointer  /* lookupPriv */
+                              char *  /* lookupPriv */
     );
 
 extern int ExprResolveEnum(ExprDef * /* expr */ ,
@@ -160,13 +160,13 @@ extern int ExprResolveEnum(ExprDef * /* expr */ ,
 extern int ExprResolveMask(ExprDef * /* expr */ ,
                            ExprResult * /* val_rtrn */ ,
                            IdentLookupFunc /* lookup */ ,
-                           XPointer     /* lookupPriv */
+                           char *     /* lookupPriv */
     );
 
 extern int ExprResolveKeySym(ExprDef * /* expr */ ,
                              ExprResult * /* val_rtrn */ ,
                              IdentLookupFunc /* lookup */ ,
-                             XPointer   /* lookupPriv */
+                             char *   /* lookupPriv */
     );
 
 #endif /* EXPR_H */
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index 4cc301f..9516059 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -211,7 +211,7 @@ SetIndicatorMapField(LEDInfo * led,
     {
         if (arrayNdx != NULL)
             return ReportIndicatorNotArray(xkb->dpy, led, field);
-        if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (XPointer) xkb))
+        if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
             return ReportIndicatorBadType(xkb->dpy, led, field,
                                           "modifier mask");
         led->real_mods = rtrn.uval & 0xff;
@@ -223,7 +223,7 @@ SetIndicatorMapField(LEDInfo * led,
         if (arrayNdx != NULL)
             return ReportIndicatorNotArray(xkb->dpy, led, field);
         if (!ExprResolveMask
-            (value, &rtrn, SimpleLookup, (XPointer) groupNames))
+            (value, &rtrn, SimpleLookup, (char *) groupNames))
             return ReportIndicatorBadType(xkb->dpy, led, field, "group mask");
         led->groups = rtrn.uval;
         led->defs.defined |= _LED_Groups;
@@ -234,7 +234,7 @@ SetIndicatorMapField(LEDInfo * led,
         if (arrayNdx != NULL)
             return ReportIndicatorNotArray(xkb->dpy, led, field);
         if (!ExprResolveMask
-            (value, &rtrn, SimpleLookup, (XPointer) ctrlNames))
+            (value, &rtrn, SimpleLookup, (char *) ctrlNames))
             return ReportIndicatorBadType(xkb->dpy, led, field,
                                           "controls mask");
         led->ctrls = rtrn.uval;
@@ -258,7 +258,7 @@ SetIndicatorMapField(LEDInfo * led,
         if (arrayNdx != NULL)
             return ReportIndicatorNotArray(xkb->dpy, led, field);
         if (!ExprResolveMask(value, &rtrn, SimpleLookup,
-                             (XPointer) modComponentNames))
+                             (char *) modComponentNames))
         {
             return ReportIndicatorBadType(xkb->dpy, led, field,
                                           "mask of modifier state components");
@@ -270,7 +270,7 @@ SetIndicatorMapField(LEDInfo * led,
         if (arrayNdx != NULL)
             return ReportIndicatorNotArray(xkb->dpy, led, field);
         if (!ExprResolveMask(value, &rtrn, SimpleLookup,
-                             (XPointer) groupComponentNames))
+                             (char *) groupComponentNames))
         {
             return ReportIndicatorBadType(xkb->dpy, led, field,
                                           "mask of group state components");
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index b27bc9d..2029712 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -689,7 +689,7 @@ SetMapEntry(KeyTypeInfo * type,
 
     if (arrayNdx == NULL)
         return ReportTypeShouldBeArray(type, "map entry");
-    if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (XPointer) xkb))
+    if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (char *) xkb))
         return ReportTypeBadType(type, "map entry", "modifier mask");
     entry.mods.real_mods = rtrn.uval & 0xff;      /* modifiers < 512 */
     entry.mods.vmods = (rtrn.uval >> 8) & 0xffff; /* modifiers > 512 */
@@ -709,7 +709,7 @@ SetMapEntry(KeyTypeInfo * type,
         entry.mods.real_mods &= type->mask;
         entry.mods.vmods &= type->vmask;
     }
-    if (!ExprResolveInteger(value, &rtrn, SimpleLookup, (XPointer) lnames))
+    if (!ExprResolveInteger(value, &rtrn, SimpleLookup, (char *) lnames))
     {
         ERROR("Level specifications in a key type must be integer\n");
         ACTION("Ignoring malformed level specification\n");
@@ -736,7 +736,7 @@ SetPreserve(KeyTypeInfo * type,
 
     if (arrayNdx == NULL)
         return ReportTypeShouldBeArray(type, "preserve entry");
-    if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (XPointer) xkb))
+    if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (char *) xkb))
         return ReportTypeBadType(type, "preserve entry", "modifier mask");
     new.defs = type->defs;
     new.defs.next = NULL;
@@ -756,7 +756,7 @@ SetPreserve(KeyTypeInfo * type,
         if (warningLevel > 0)
             INFO1("%s\n", PreserveIndexTxt(type, xkb, &new));
     }
-    if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (XPointer) xkb))
+    if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
     {
         ERROR("Preserve value in a key type is not a modifier mask\n");
         ACTION2("Ignoring preserve[%s] in type %s\n",
@@ -845,7 +845,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
 
     if (arrayNdx == NULL)
         return ReportTypeShouldBeArray(type, "level name");
-    if (!ExprResolveInteger(arrayNdx, &rtrn, SimpleLookup, (XPointer) lnames))
+    if (!ExprResolveInteger(arrayNdx, &rtrn, SimpleLookup, (char *) lnames))
         return ReportTypeBadType(type, "level name", "integer");
     if ((rtrn.ival < 1) || (rtrn.ival > XkbMaxShiftLevel + 1))
     {
@@ -893,7 +893,7 @@ SetKeyTypeField(KeyTypeInfo * type,
             ACTION("Illegal array subscript ignored\n");
         }
         /* get modifier mask for current type */
-        if (!ExprResolveModMask(value, &tmp, LookupVModMask, (XPointer) xkb))
+        if (!ExprResolveModMask(value, &tmp, LookupVModMask, (char *) xkb))
         {
             ERROR("Key type mask field must be a modifier mask\n");
             ACTION("Key type definition ignored\n");
diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c
index b653b12..750359c 100644
--- a/src/xkbcomp/misc.c
+++ b/src/xkbcomp/misc.c
@@ -223,7 +223,7 @@ MergeNewField(unsigned field,
     return False;
 }
 
-XPointer
+char *
 ClearCommonInfo(CommonInfo * cmn)
 {
     if (cmn != NULL)
@@ -238,7 +238,7 @@ ClearCommonInfo(CommonInfo * cmn)
     return NULL;
 }
 
-XPointer
+char *
 AddCommonInfo(CommonInfo * old, CommonInfo * new)
 {
     CommonInfo *first;
@@ -252,9 +252,9 @@ AddCommonInfo(CommonInfo * old, CommonInfo * new)
     if (old)
     {
         old->next = new;
-        return (XPointer) first;
+        return (char *) first;
     }
-    return (XPointer) new;
+    return (char *) new;
 }
 
 /***====================================================================***/
diff --git a/src/xkbcomp/misc.h b/src/xkbcomp/misc.h
index 7d6d349..49de73b 100644
--- a/src/xkbcomp/misc.h
+++ b/src/xkbcomp/misc.h
@@ -47,10 +47,10 @@ extern Bool MergeNewField(unsigned /* field */ ,
                           unsigned *    /* pCollide */
     );
 
-extern XPointer ClearCommonInfo(CommonInfo *    /* cmn */
+extern char * ClearCommonInfo(CommonInfo *    /* cmn */
     );
 
-extern XPointer AddCommonInfo(CommonInfo * /* old */ ,
+extern char * AddCommonInfo(CommonInfo * /* old */ ,
                               CommonInfo *      /* new */
     );
 
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 64a1be4..18833fc 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -910,7 +910,7 @@ GetGroupIndex(KeyInfo * key,
         return False;
     }
     if (!ExprResolveInteger
-        (arrayNdx, &tmp, SimpleLookup, (XPointer) groupNames))
+        (arrayNdx, &tmp, SimpleLookup, (char *) groupNames))
     {
         ERROR2("Illegal group index for %s of key %s\n", name,
                longText(key->name, XkbMessage));
@@ -1138,7 +1138,7 @@ SetSymbolsField(KeyInfo * key,
             key->defs.defined |= _Key_Type_Dflt;
         }
         else if (!ExprResolveInteger(arrayNdx, &ndx, SimpleLookup,
-                                     (XPointer) groupNames))
+                                     (char *) groupNames))
         {
             ERROR1("Illegal group index for type of key %s\n",
                    longText(key->name, XkbMessage));
@@ -1167,7 +1167,7 @@ SetSymbolsField(KeyInfo * key,
              (uStrCaseCmp(field, "virtualmods") == 0) ||
              (uStrCaseCmp(field, "virtualmodifiers") == 0))
     {
-        ok = ExprResolveModMask(value, &tmp, LookupVModMask, (XPointer) xkb);
+        ok = ExprResolveModMask(value, &tmp, LookupVModMask, (char *) xkb);
         if (ok)
         {
             key->vmodmap = (tmp.uval >> 8);
@@ -1197,7 +1197,7 @@ SetSymbolsField(KeyInfo * key,
         if (uStrCaseCmp(field, "permanentradiogroup") == 0)
             permanent = True;
         ok = ExprResolveInteger(value, &tmp, SimpleLookup,
-                                (XPointer) rgEntries);
+                                (char *) rgEntries);
         if (!ok)
         {
             ERROR1("Illegal radio group specification for %s\n",
@@ -1336,7 +1336,7 @@ SetSymbolsField(KeyInfo * key,
              (uStrCaseCmp(field, "redirectgroups") == 0))
     {
         if (!ExprResolveInteger
-            (value, &tmp, SimpleLookup, (XPointer) groupNames))
+            (value, &tmp, SimpleLookup, (char *) groupNames))
         {
             ERROR1("Illegal group index for redirect of key %s\n",
                    longText(key->name, XkbMessage));
@@ -1375,7 +1375,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
         return False;
     }
     if (!ExprResolveInteger
-        (arrayNdx, &tmp, SimpleLookup, (XPointer) groupNames))
+        (arrayNdx, &tmp, SimpleLookup, (char *) groupNames))
     {
         ERROR("Illegal index in group name definition\n");
         ACTION("Definition with non-integer array index ignored\n");
@@ -1457,7 +1457,7 @@ HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
                  || (uStrCaseCmp(field.str, "redirectgroups") == 0)))
     {
         if (!ExprResolveInteger(stmt->value, &tmp,
-                                SimpleLookup, (XPointer) groupNames))
+                                SimpleLookup, (char *) groupNames))
         {
             ERROR("Illegal group index for global groupsRedirect\n");
             ACTION("Definition with non-integer group ignored\n");
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index aa6ddec..cc82089 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -167,7 +167,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
  * undefined.
  */
 int
-LookupVModIndex(XPointer priv,
+LookupVModIndex(char * priv,
                 Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
 {
     register int i;
@@ -213,7 +213,7 @@ LookupVModIndex(XPointer priv,
  * undefined.
  */
 int
-LookupVModMask(XPointer priv,
+LookupVModMask(char * priv,
                Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
 {
     if (LookupVModIndex(priv, elem, field, type, val_rtrn))
@@ -232,7 +232,7 @@ FindKeypadVMod(XkbcDescPtr xkb)
     ExprResult rtrn;
 
     name = XkbInternAtom(xkb->dpy, "NumLock", False);
-    if ((xkb) && LookupVModIndex((XPointer) xkb, None, name, TypeInt, &rtrn))
+    if ((xkb) && LookupVModIndex((char *) xkb, None, name, TypeInt, &rtrn))
     {
         return rtrn.ival;
     }
diff --git a/src/xkbcomp/vmod.h b/src/xkbcomp/vmod.h
index f03bb4e..5ca566a 100644
--- a/src/xkbcomp/vmod.h
+++ b/src/xkbcomp/vmod.h
@@ -53,14 +53,14 @@ extern Bool ApplyVModDefs(VModInfo * /* info */ ,
                           XkbcDescPtr    /* xkb */
     );
 
-extern int LookupVModIndex(XPointer /* priv */ ,
+extern int LookupVModIndex(char * /* priv */ ,
                            Atom /* elem */ ,
                            Atom /* field */ ,
                            unsigned /* type */ ,
                            ExprResult * /* val_rtrn */
     );
 
-extern int LookupVModMask(XPointer /* priv */ ,
+extern int LookupVModMask(char * /* priv */ ,
                           Atom /* elem */ ,
                           Atom /* field */ ,
                           unsigned /* type */ ,