Commit a63e82be2a63d82b5b3802ae40efae2538461512

Kristian Høgsberg 2010-12-17T21:14:54

Rename XkbcInternAtom() to xkb_intern_atom() and export Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>

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
diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h
index 9a42834..4e6058c 100644
--- a/include/X11/extensions/XKBcommon.h
+++ b/include/X11/extensions/XKBcommon.h
@@ -780,6 +780,9 @@ typedef const char *(*GetAtomValueFuncPtr)(uint32_t atom);
 _X_EXPORT extern void
 xkb_init_atoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value);
 
+_X_EXPORT extern uint32_t
+xkb_intern_atom(const char *name);
+
 _X_EXPORT extern struct xkb_desc *
 xkb_compile_keymap_from_rules(const struct xkb_rule_names *rules);
 
diff --git a/src/atom.c b/src/atom.c
index fb3cae4..51352bb 100644
--- a/src/atom.c
+++ b/src/atom.c
@@ -129,14 +129,22 @@ XkbcAtomGetString(uint32_t atom)
     return ret ? strdup(ret) : NULL;
 }
 
-static uint32_t
-_XkbcMakeAtom(const char *string, unsigned len, Bool makeit)
+uint32_t
+xkb_intern_atom(const char *string)
 {
     NodePtr *np;
     unsigned i;
     int comp;
     unsigned int fp = 0;
+    unsigned len;
+    int makeit = True;
+
+    if (!string)
+	return None;
+    if (do_intern_atom)
+	return do_intern_atom(string);
 
+    len = strlen(string);
     np = &atomRoot;
     for (i = 0; i < (len + 1) / 2; i++) {
         fp = fp * 27 + string[i];
@@ -208,13 +216,3 @@ _XkbcMakeAtom(const char *string, unsigned len, Bool makeit)
     else
         return None;
 }
-
-uint32_t
-XkbcInternAtom(const char *name, Bool onlyIfExists)
-{
-    if (!name)
-        return None;
-    if (do_intern_atom)
-        return do_intern_atom(name);
-    return _XkbcMakeAtom(name, strlen(name), !onlyIfExists);
-}
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index d0b5860..0466dbe 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -1461,12 +1461,12 @@ ActionsInit(void)
         constTrue.common.next = NULL;
         constTrue.op = ExprIdent;
         constTrue.type = TypeBoolean;
-        constTrue.value.str = XkbcInternAtom("true", False);
+        constTrue.value.str = xkb_intern_atom("true");
         constFalse.common.stmtType = StmtExpr;
         constFalse.common.next = NULL;
         constFalse.op = ExprIdent;
         constFalse.type = TypeBoolean;
-        constFalse.value.str = XkbcInternAtom("false", False);
+        constFalse.value.str = xkb_intern_atom("false");
         actionsInitialized = 1;
     }
     return;
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index af231ff..8749b5b 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -840,8 +840,8 @@ CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
         {
             if (XkbcAllocNames(xkb, XkbCompatNameMask, 0, 0) == Success)
                 xkb->names->compat =
-                    XkbcInternAtom(info.name, False);
-            else
+                    xkb_intern_atom(info.name);
+	    else
             {
                 WSGO("Couldn't allocate space for compat name\n");
                 ACTION("Name \"%s\" (from %s) NOT assigned\n",
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index af26942..ae3f6bc 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -541,7 +541,7 @@ InitSectionInfo(SectionInfo * si, GeometryInfo * info)
     {
         *si = info->dfltSection;
         si->defs.defined &= ~_GS_Default;
-        si->name = XkbcInternAtom("unknown", False);
+        si->name = xkb_intern_atom("unknown");
         si->priority = info->nextPriority++;
         if (info->nextPriority > XkbGeomMaxPriority)
             info->nextPriority = XkbGeomMaxPriority;
@@ -553,7 +553,7 @@ InitSectionInfo(SectionInfo * si, GeometryInfo * info)
         si->defs.merge = info->merge;
         si->defs.next = NULL;
         si->geometry = info;
-        si->name = XkbcInternAtom("default", False);
+        si->name = xkb_intern_atom("default");
         InitRowInfo(&si->dfltRow, si, info);
     }
     return;
@@ -585,7 +585,7 @@ ClearSectionInfo(SectionInfo * si, GeometryInfo * info)
 {
 
     si->defs.defined &= ~_GS_Default;
-    si->name = XkbcInternAtom("default", False);
+    si->name = xkb_intern_atom("default");
     si->top = si->left = 0;
     si->width = si->height = 0;
     si->angle = 0;
@@ -1487,7 +1487,7 @@ SetShapeDoodadField(DoodadInfo * di,
             info->errorCount++;
             return ReportBadType(typeName, field, ddText(di), "string");
         }
-        di->shape = XkbcInternAtom(tmp.str, False);
+        di->shape = xkb_intern_atom(tmp.str);
         di->defs.defined |= _GD_Shape;
         return True;
     }
@@ -1620,7 +1620,7 @@ SetTextDoodadField(DoodadInfo * di,
             return ReportBadType(typeName, field, ddText(di), "string");
         }
         di->defs.defined |= def;
-        *pField.str = XkbcInternAtom(tmp.str, False);
+        *pField.str = xkb_intern_atom(tmp.str);
     }
     else
     {
@@ -1671,17 +1671,17 @@ SetIndicatorDoodadField(DoodadInfo * di,
         if (uStrCaseCmp(field, "oncolor") == 0)
         {
             di->defs.defined |= _GD_Color;
-            di->color = XkbcInternAtom(tmp.str, False);
+            di->color = xkb_intern_atom(tmp.str);
         }
         else if (uStrCaseCmp(field, "offcolor") == 0)
         {
             di->defs.defined |= _GD_OffColor;
-            di->offColor = XkbcInternAtom(tmp.str, False);
+            di->offColor = xkb_intern_atom(tmp.str);
         }
         else if (uStrCaseCmp(field, "shape") == 0)
         {
             di->defs.defined |= _GD_Shape;
-            di->shape = XkbcInternAtom(tmp.str, False);
+            di->shape = xkb_intern_atom(tmp.str);
         }
         return True;
     }
@@ -1742,7 +1742,7 @@ SetLogoDoodadField(DoodadInfo * di,
             info->errorCount++;
             return ReportBadType(typeName, field, ddText(di), "string");
         }
-        di->shape = XkbcInternAtom(tmp.str, False);
+        di->shape = xkb_intern_atom(tmp.str);
         di->defs.defined |= _GD_Shape;
         return True;
     }
@@ -1843,7 +1843,7 @@ SetDoodadField(DoodadInfo * di,
             return ReportBadType("doodad", field, ddText(di), "string");
         }
         di->defs.defined |= _GD_Color;
-        di->color = XkbcInternAtom(tmp.str, False);
+        di->color = xkb_intern_atom(tmp.str);
         free(tmp.str);
         return True;
     }
@@ -2045,7 +2045,7 @@ SetKeyField(KeyInfo * key,
             return ReportBadType("key", field, keyText(key), "string");
         }
         key->defs.defined |= _GK_Shape;
-        key->shape = XkbcInternAtom(tmp.str, False);
+        key->shape = xkb_intern_atom(tmp.str);
         free(tmp.str);
     }
     else if ((uStrCaseCmp(field, "color") == 0) ||
@@ -2062,7 +2062,7 @@ SetKeyField(KeyInfo * key,
             return ReportBadType("key", field, keyText(key), "string");
         }
         key->defs.defined |= _GK_Color;
-        key->color = XkbcInternAtom(tmp.str, False);
+        key->color = xkb_intern_atom(tmp.str);
         free(tmp.str);
     }
     else if ((uStrCaseCmp(field, "name") == 0)
@@ -2308,7 +2308,7 @@ HandleGeometryVar(VarDef * stmt, struct xkb_desc * xkb, GeometryInfo * info)
             ret = ReportBadType("keyboard", field.str, "geometry", "string");
         }
         else {
-            info->baseColor = XkbcInternAtom(tmp.str, False);
+            info->baseColor = xkb_intern_atom(tmp.str);
             free(tmp.str);
             ret = True;
         }
@@ -2328,7 +2328,7 @@ HandleGeometryVar(VarDef * stmt, struct xkb_desc * xkb, GeometryInfo * info)
             ret = ReportBadType("keyboard", field.str, "geometry", "string");
         }
         else {
-            info->labelColor = XkbcInternAtom(tmp.str, False);
+            info->labelColor = xkb_intern_atom(tmp.str);
             free(tmp.str);
             ret = True;
         }
@@ -2383,7 +2383,7 @@ HandleGeometryVar(VarDef * stmt, struct xkb_desc * xkb, GeometryInfo * info)
         ret = ReportBadType("keyboard", field.str, "geometry", "string");
     }
     else {
-        *pField = XkbcInternAtom(tmp.str, False);
+        *pField = xkb_intern_atom(tmp.str);
         free(tmp.str);
     }
     free(field.str);
@@ -3019,7 +3019,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No color for doodad %s\n", ddText(di));
                 ACTION("Using black\n");
             }
-            di->color = XkbcInternAtom("black", False);
+            di->color = xkb_intern_atom("black");
         }
         break;
     case XkbTextDoodad:
@@ -3038,7 +3038,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No color specified for doodad %s\n", ddText(di));
                 ACTION("Using black\n");
             }
-            di->color = XkbcInternAtom("black", False);
+            di->color = xkb_intern_atom("black");
         }
         if ((di->defs.defined & _GD_FontSpec) != 0)
         {
@@ -3061,7 +3061,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No font specified for doodad %s\n", ddText(di));
                 ACTION("Using \"%s\"\n", DFLT_FONT);
             }
-            di->font = XkbcInternAtom(DFLT_FONT, False);
+            di->font = xkb_intern_atom(DFLT_FONT);
         }
         if ((di->defs.defined & _GD_FontSlant) == 0)
         {
@@ -3070,7 +3070,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No font slant for text doodad %s\n", ddText(di));
                 ACTION("Using \"%s\"\n", DFLT_SLANT);
             }
-            di->fontSlant = XkbcInternAtom(DFLT_SLANT, False);
+            di->fontSlant = xkb_intern_atom(DFLT_SLANT);
         }
         if ((di->defs.defined & _GD_FontWeight) == 0)
         {
@@ -3079,7 +3079,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No font weight for text doodad %s\n", ddText(di));
                 ACTION("Using \"%s\"\n", DFLT_WEIGHT);
             }
-            di->fontWeight = XkbcInternAtom(DFLT_WEIGHT, False);
+            di->fontWeight = xkb_intern_atom(DFLT_WEIGHT);
         }
         if ((di->defs.defined & _GD_FontSetWidth) == 0)
         {
@@ -3088,7 +3088,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No font set width for text doodad %s\n", ddText(di));
                 ACTION("Using \"%s\"\n", DFLT_SET_WIDTH);
             }
-            di->fontSetWidth = XkbcInternAtom(DFLT_SET_WIDTH, False);
+            di->fontSetWidth = xkb_intern_atom(DFLT_SET_WIDTH);
         }
         if ((di->defs.defined & _GD_FontVariant) == 0)
         {
@@ -3097,7 +3097,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No font variant for text doodad %s\n", ddText(di));
                 ACTION("Using \"%s\"\n", DFLT_VARIANT);
             }
-            di->fontVariant = XkbcInternAtom(DFLT_VARIANT, False);
+            di->fontVariant = xkb_intern_atom(DFLT_VARIANT);
         }
         if ((di->defs.defined & _GD_FontEncoding) == 0)
         {
@@ -3106,7 +3106,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No font encoding for doodad %s\n", ddText(di));
                 ACTION("Using \"%s\"\n", DFLT_ENCODING);
             }
-            di->fontEncoding = XkbcInternAtom(DFLT_ENCODING, False);
+            di->fontEncoding = xkb_intern_atom(DFLT_ENCODING);
         }
         if ((di->defs.defined & _GD_FontSize) == 0)
         {
@@ -3193,7 +3193,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                       ddText(di));
                 ACTION("Using green\n");
             }
-            di->color = XkbcInternAtom("green", False);
+            di->color = xkb_intern_atom("green");
         }
         if ((di->defs.defined & _GD_OffColor) == 0)
         {
@@ -3203,7 +3203,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                       ddText(di));
                 ACTION("Using black\n");
             }
-            di->offColor = XkbcInternAtom("black", False);
+            di->offColor = xkb_intern_atom("black");
         }
         break;
     case XkbLogoDoodad:
@@ -3240,7 +3240,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
                 WARN("No color for doodad %s\n", ddText(di));
                 ACTION("Using black\n");
             }
-            di->color = XkbcInternAtom("black", False);
+            di->color = xkb_intern_atom("black");
         }
         break;
     default:
@@ -3654,7 +3654,7 @@ CompileGeometry(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
         geom->height_mm = info.heightMM;
         if (info.name != NULL)
         {
-            geom->name = XkbcInternAtom(info.name, False);
+            geom->name = xkb_intern_atom(info.name);
             if (XkbcAllocNames(xkb, XkbGeometryNameMask, 0, 0) == Success)
                 xkb->names->geometry = geom->name;
         }
@@ -3671,9 +3671,9 @@ CompileGeometry(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
         XkbcAddGeomColor(geom, "white", geom->num_colors);
 
         if (info.baseColor == None)
-            info.baseColor = XkbcInternAtom("white", False);
+            info.baseColor = xkb_intern_atom("white");
         if (info.labelColor == None)
-            info.labelColor = XkbcInternAtom("black", False);
+            info.labelColor = xkb_intern_atom("black");
         geom->base_color =
             XkbcAddGeomColor(geom, XkbcAtomText(info.baseColor),
                              geom->num_colors);
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index 8e5781e..2b6c169 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -47,7 +47,7 @@
 void
 ClearIndicatorMapInfo(LEDInfo * info)
 {
-    info->name = XkbcInternAtom("default", False);
+    info->name = xkb_intern_atom("default");
     info->indicator = _LED_NotBound;
     info->flags = info->which_mods = info->real_mods = 0;
     info->vmods = 0;
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index 6aba4c6..9892024 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -727,7 +727,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
         info->errorCount++;
         return ReportBadType("indicator", "name", buf, "string");
     }
-    ii.name = XkbcInternAtom(tmp.str, False);
+    ii.name = xkb_intern_atom(tmp.str);
     free(tmp.str);
     ii.virtual = def->virtual;
     if (!AddIndicatorName(info, &ii))
@@ -845,7 +845,7 @@ CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
                 == Success)
         {
             register int i;
-            xkb->names->keycodes = XkbcInternAtom(info.name, False);
+            xkb->names->keycodes = xkb_intern_atom(info.name);
             for (i = info.computedMin; i <= info.computedMax; i++)
             {
                 LongToKeyName(info.names[i], xkb->names->keys[i].name);
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index 846dba5..d83f5c3 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -108,10 +108,10 @@ uint32_t tok_KEYPAD;
 static void
 InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_desc * xkb, KeyTypesInfo * from)
 {
-    tok_ONE_LEVEL = XkbcInternAtom("ONE_LEVEL", False);
-    tok_TWO_LEVEL = XkbcInternAtom("TWO_LEVEL", False);
-    tok_ALPHABETIC = XkbcInternAtom("ALPHABETIC", False);
-    tok_KEYPAD = XkbcInternAtom("KEYPAD", False);
+    tok_ONE_LEVEL = xkb_intern_atom("ONE_LEVEL");
+    tok_TWO_LEVEL = xkb_intern_atom("TWO_LEVEL");
+    tok_ALPHABETIC = xkb_intern_atom("ALPHABETIC");
+    tok_KEYPAD = xkb_intern_atom("KEYPAD");
     info->name = strdup("default");
     info->errorCount = 0;
     info->stdPresent = 0;
@@ -839,7 +839,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
         ACTION("Ignoring illegal level name definition\n");
         return False;
     }
-    level_name = XkbcInternAtom(rtrn.str, False);
+    level_name = xkb_intern_atom(rtrn.str);
     free(rtrn.str);
     return AddLevelName(type, level, level_name, True, True);
 }
@@ -1195,7 +1195,7 @@ CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
         if (info.name != NULL)
         {
             if (XkbcAllocNames(xkb, XkbTypesNameMask, 0, 0) == Success)
-                xkb->names->types = XkbcInternAtom(info.name, False);
+                xkb->names->types = xkb_intern_atom(info.name);
             else
             {
                 WSGO("Couldn't allocate space for types name\n");
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index d5057a6..30005b9 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -244,9 +244,9 @@ InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb)
 {
     register int i;
 
-    tok_ONE_LEVEL = XkbcInternAtom("ONE_LEVEL", False);
-    tok_TWO_LEVEL = XkbcInternAtom("TWO_LEVEL", False);
-    tok_KEYPAD = XkbcInternAtom("KEYPAD", False);
+    tok_ONE_LEVEL = xkb_intern_atom("ONE_LEVEL");
+    tok_TWO_LEVEL = xkb_intern_atom("TWO_LEVEL");
+    tok_KEYPAD = xkb_intern_atom("KEYPAD");
     info->name = NULL;
     info->explicit_group = 0;
     info->errorCount = 0;
@@ -1139,7 +1139,7 @@ SetSymbolsField(KeyInfo * key,
         }
         if (arrayNdx == NULL)
         {
-            key->dfltType = XkbcInternAtom(tmp.str, False);
+            key->dfltType = xkb_intern_atom(tmp.str);
             key->defs.defined |= _Key_Type_Dflt;
         }
         else if (!ExprResolveInteger(arrayNdx, &ndx, SimpleLookup,
@@ -1162,7 +1162,7 @@ SetSymbolsField(KeyInfo * key,
         }
         else
         {
-            key->types[ndx.uval - 1] = XkbcInternAtom(tmp.str, False);
+            key->types[ndx.uval - 1] = xkb_intern_atom(tmp.str);
             key->typesDefined |= (1 << (ndx.uval - 1));
         }
         free(tmp.str);
@@ -1404,7 +1404,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
         return False;
     }
     info->groupNames[tmp.uval - 1 + info->explicit_group] =
-        XkbcInternAtom(name.str, False);
+        xkb_intern_atom(name.str);
 
     return True;
 }
@@ -1796,23 +1796,23 @@ FindAutomaticType(int width, uint32_t * syms, uint32_t * typeNameRtrn,
     *autoType = False;
     if ((width == 1) || (width == 0))
     {
-        *typeNameRtrn = XkbcInternAtom("ONE_LEVEL", False);
+        *typeNameRtrn = xkb_intern_atom("ONE_LEVEL");
         *autoType = True;
     }
     else if (width == 2)
     {
         if (syms && XkbcKSIsLower(syms[0]) && XkbcKSIsUpper(syms[1]))
         {
-            *typeNameRtrn = XkbcInternAtom("ALPHABETIC", False);
+            *typeNameRtrn = xkb_intern_atom("ALPHABETIC");
         }
         else if (syms && (XkbKSIsKeypad(syms[0]) || XkbKSIsKeypad(syms[1])))
         {
-            *typeNameRtrn = XkbcInternAtom("KEYPAD", False);
+            *typeNameRtrn = xkb_intern_atom("KEYPAD");
             *autoType = True;
         }
         else
         {
-            *typeNameRtrn = XkbcInternAtom("TWO_LEVEL", False);
+            *typeNameRtrn = xkb_intern_atom("TWO_LEVEL");
             *autoType = True;
         }
     }
@@ -1821,15 +1821,14 @@ FindAutomaticType(int width, uint32_t * syms, uint32_t * typeNameRtrn,
         if (syms && XkbcKSIsLower(syms[0]) && XkbcKSIsUpper(syms[1]))
             if (XkbcKSIsLower(syms[2]) && XkbcKSIsUpper(syms[3]))
                 *typeNameRtrn =
-                    XkbcInternAtom("FOUR_LEVEL_ALPHABETIC", False);
+                    xkb_intern_atom("FOUR_LEVEL_ALPHABETIC");
             else
-                *typeNameRtrn = XkbcInternAtom("FOUR_LEVEL_SEMIALPHABETIC",
-                                              False);
+                *typeNameRtrn = xkb_intern_atom("FOUR_LEVEL_SEMIALPHABETIC");
 
         else if (syms && (XkbKSIsKeypad(syms[0]) || XkbKSIsKeypad(syms[1])))
-            *typeNameRtrn = XkbcInternAtom("FOUR_LEVEL_KEYPAD", False);
+            *typeNameRtrn = xkb_intern_atom("FOUR_LEVEL_KEYPAD");
         else
-            *typeNameRtrn = XkbcInternAtom("FOUR_LEVEL", False);
+            *typeNameRtrn = xkb_intern_atom("FOUR_LEVEL");
         /* XXX: why not set autoType here? */
     }
     return ((width >= 0) && (width <= 4));
@@ -2246,7 +2245,7 @@ CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
         }
 
         /* now copy info into xkb. */
-        xkb->names->symbols = XkbcInternAtom(info.name, False);
+        xkb->names->symbols = xkb_intern_atom(info.name);
         if (info.aliases)
             ApplyAliases(xkb, False, &info.aliases);
         for (i = 0; i < XkbNumKbdGroups; i++)
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index 2c8ac02..7b0017b 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -219,7 +219,7 @@ FindKeypadVMod(struct xkb_desc * xkb)
     uint32_t name;
     ExprResult rtrn;
 
-    name = XkbcInternAtom("NumLock", False);
+    name = xkb_intern_atom("NumLock");
     if ((xkb) && LookupVModIndex((char *) xkb, None, name, TypeInt, &rtrn))
     {
         return rtrn.ival;
diff --git a/src/xkbcomp/xkbparse.y b/src/xkbcomp/xkbparse.y
index ab21681..be525a3 100644
--- a/src/xkbcomp/xkbparse.y
+++ b/src/xkbcomp/xkbparse.y
@@ -557,27 +557,27 @@ FieldSpec	:	Ident			{ $$= $1; }
 		;
 
 Element		:	ACTION_TOK		
-			{ $$= XkbcInternAtom("action",False); }
+			{ $$= xkb_intern_atom("action"); }
 		|	INTERPRET
-			{ $$= XkbcInternAtom("interpret",False); }
+			{ $$= xkb_intern_atom("interpret"); }
 		|	TYPE
-			{ $$= XkbcInternAtom("type",False); }
+			{ $$= xkb_intern_atom("type"); }
 		|	KEY
-			{ $$= XkbcInternAtom("key",False); }
+			{ $$= xkb_intern_atom("key"); }
 		|	GROUP
-			{ $$= XkbcInternAtom("group",False); }
+			{ $$= xkb_intern_atom("group"); }
 		|	MODIFIER_MAP
-			{$$=XkbcInternAtom("modifier_map",False);}
+			{$$= xkb_intern_atom("modifier_map");}
 		|	INDICATOR
-			{ $$= XkbcInternAtom("indicator",False); }
+			{ $$= xkb_intern_atom("indicator"); }
 		|	SHAPE	
-			{ $$= XkbcInternAtom("shape",False); }
+			{ $$= xkb_intern_atom("shape"); }
 		|	ROW	
-			{ $$= XkbcInternAtom("row",False); }
+			{ $$= xkb_intern_atom("row"); }
 		|	SECTION	
-			{ $$= XkbcInternAtom("section",False); }
+			{ $$= xkb_intern_atom("section"); }
 		|	TEXT
-			{ $$= XkbcInternAtom("text",False); }
+			{ $$= xkb_intern_atom("text"); }
 		;
 
 OptMergeMode	:	MergeMode		{ $$= $1; }
@@ -753,11 +753,11 @@ Integer		:	INTEGER		{ $$= scanInt; }
 KeyName		:	KEYNAME		{ $$= strdup(scanBuf); }
 		;
 
-Ident		:	IDENT	{ $$= XkbcInternAtom(scanBuf,False); }
-		|	DEFAULT { $$= XkbcInternAtom("default",False); }
+Ident		:	IDENT	{ $$= xkb_intern_atom(scanBuf); }
+		|	DEFAULT { $$= xkb_intern_atom("default"); }
 		;
 
-String		:	STRING	{ $$= XkbcInternAtom(scanBuf,False); }
+String		:	STRING	{ $$= xkb_intern_atom(scanBuf); }
 		;
 
 OptMapName	:	MapName	{ $$= $1; }
diff --git a/src/xkbmisc.h b/src/xkbmisc.h
index 2cc7cf0..2e384f7 100644
--- a/src/xkbmisc.h
+++ b/src/xkbmisc.h
@@ -70,9 +70,6 @@ XkbcNameMatchesPattern(char *name, char *ptrn);
 extern char *
 XkbcAtomGetString(uint32_t atom);
 
-extern uint32_t
-XkbcInternAtom(const char *name, Bool onlyIfExists);
-
 /***====================================================================***/
 
 extern const char *