Commit a59ce8f52575283bdb49c3f597807daa25a3492a

Dan Nicholson 2009-03-28T15:24:06

Drop another unneeded format argument Almost cleared of XkbMessage...

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
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index b559f53..82cff8f 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -32,7 +32,7 @@
 #include "alias.h"
 
 char *
-longText(unsigned long val, unsigned format)
+longText(unsigned long val)
 {
     char buf[4];
 
diff --git a/src/xkbcomp/keycodes.h b/src/xkbcomp/keycodes.h
index 11f4460..256396c 100644
--- a/src/xkbcomp/keycodes.h
+++ b/src/xkbcomp/keycodes.h
@@ -29,8 +29,7 @@
 
 #define	KeyNameToLong(n)	((((unsigned long)n[0])<<24)|(((unsigned long)n[1])<<16)|(((unsigned long)n[2])<<8)|n[3])
 
-extern char *longText(unsigned long /* val */ ,
-                      unsigned  /* format */
+extern char *longText(unsigned long /* val */
     );
 
 extern void LongToKeyName(unsigned long /* val */ ,
diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c
index 46f1a73..3ad2587 100644
--- a/src/xkbcomp/misc.c
+++ b/src/xkbcomp/misc.c
@@ -512,7 +512,7 @@ FindNamedKey(XkbcDescPtr xkb,
                 {
                     WARN("Couldn't allocate key names in FindNamedKey\n");
                     ACTION1("Key \"%s\" not automatically created\n",
-                            longText(name, XkbMessage));
+                            longText(name));
                 }
                 return False;
             }
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 74dcc47..0f5ae27 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -361,7 +361,7 @@ MergeKeyGroups(SymbolsInfo * info,
         {
             WSGO("Could not allocate symbols for group merge\n");
             ACTION2("Group %d of key %s not merged\n", group,
-                    longText(into->name, XkbMessage));
+                    longText(into->name));
             return False;
         }
     }
@@ -372,7 +372,7 @@ MergeKeyGroups(SymbolsInfo * info,
         {
             WSGO("Could not allocate actions for group merge\n");
             ACTION2("Group %d of key %s not merged\n", group,
-                    longText(into->name, XkbMessage));
+                    longText(into->name));
             return False;
         }
     }
@@ -408,7 +408,7 @@ MergeKeyGroups(SymbolsInfo * info,
             {
                 WARN3
                     ("Multiple symbols for level %d/group %d on key %s\n",
-                     i + 1, group + 1, longText(into->name, XkbMessage));
+                     i + 1, group + 1, longText(into->name));
                 ACTION2("Using %s, ignoring %s\n",
                         XkbcKeysymText(use), XkbcKeysymText(ignore));
             }
@@ -446,7 +446,7 @@ MergeKeyGroups(SymbolsInfo * info,
                 {
                     WARN3
                         ("Multiple actions for level %d/group %d on key %s\n",
-                         i + 1, group + 1, longText(into->name, XkbMessage));
+                         i + 1, group + 1, longText(into->name));
                     ACTION2("Using %s, ignoring %s\n",
                             XkbcActionTypeText(use->type),
                             XkbcActionTypeText(ignore->type));
@@ -551,7 +551,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
                 }
                 WARN2
                     ("Multiple definitions for group %d type of key %s\n",
-                     i, longText(into->name, XkbMessage));
+                     i, longText(into->name));
                 ACTION2("Using %s, ignoring %s\n",
                         XkbcAtomText(use),
                         XkbcAtomText(ignore));
@@ -592,7 +592,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
     if (collide)
     {
         WARN1("Symbol map for key %s redefined\n",
-              longText(into->name, XkbMessage));
+              longText(into->name));
         ACTION1("Using %s definition for conflicting fields\n",
                 (from->defs.merge == MergeAugment ? "first" : "last"));
     }
@@ -685,7 +685,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
                     ignore = new->modifier;
                 }
                 ERROR1("Key %s added to map for multiple modifiers\n",
-                       longText(new->u.keyName, XkbMessage));
+                       longText(new->u.keyName));
                 ACTION2("Using %s, ignoring %s.\n",
                         XkbModIndexText(use, XkbMessage),
                         XkbModIndexText(ignore, XkbMessage));
@@ -904,7 +904,7 @@ GetGroupIndex(KeyInfo * key,
             }
         }
         ERROR3("Too many groups of %s for key %s (max %d)\n", name,
-               longText(key->name, XkbMessage), XkbNumKbdGroups + 1);
+               longText(key->name), XkbNumKbdGroups + 1);
         ACTION1("Ignoring %s defined for extra groups\n", name);
         return False;
     }
@@ -912,14 +912,14 @@ GetGroupIndex(KeyInfo * key,
         (arrayNdx, &tmp, SimpleLookup, (char *) groupNames))
     {
         ERROR2("Illegal group index for %s of key %s\n", name,
-               longText(key->name, XkbMessage));
+               longText(key->name));
         ACTION("Definition with non-integer array index ignored\n");
         return False;
     }
     if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
     {
         ERROR3("Group index for %s of key %s is out of range (1..%d)\n",
-               name, longText(key->name, XkbMessage), XkbNumKbdGroups + 1);
+               name, longText(key->name), XkbNumKbdGroups + 1);
         ACTION2("Ignoring %s for group %d\n", name, tmp.uval);
         return False;
     }
@@ -948,13 +948,13 @@ AddSymbolsToKey(KeyInfo * key,
         ERROR1("Expected a list of symbols, found %s\n",
                exprOpText(value->op));
         ACTION2("Ignoring symbols for group %d of %s\n", ndx,
-                longText(key->name, XkbMessage));
+                longText(key->name));
         return False;
     }
     if (key->syms[ndx] != NULL)
     {
         WSGO2("Symbols for key %s, group %d already defined\n",
-              longText(key->name, XkbMessage), ndx);
+              longText(key->name), ndx);
         return False;
     }
     nSyms = value->value.list.nSyms;
@@ -962,7 +962,7 @@ AddSymbolsToKey(KeyInfo * key,
         (!ResizeKeyGroup(key, ndx, nSyms, False)))
     {
         WSGO2("Could not resize group %d of key %s\n", ndx,
-              longText(key->name, XkbMessage));
+              longText(key->name));
         ACTION("Symbols lost\n");
         return False;
     }
@@ -1000,13 +1000,13 @@ AddActionsToKey(KeyInfo * key,
     {
         WSGO1("Bad expression type (%d) for action list value\n", value->op);
         ACTION2("Ignoring actions for group %d of %s\n", ndx,
-                longText(key->name, XkbMessage));
+                longText(key->name));
         return False;
     }
     if (key->acts[ndx] != NULL)
     {
         WSGO2("Actions for key %s, group %d already defined\n",
-              longText(key->name, XkbMessage), ndx);
+              longText(key->name), ndx);
         return False;
     }
     for (nActs = 0, act = value->value.child; act != NULL; nActs++)
@@ -1022,7 +1022,7 @@ AddActionsToKey(KeyInfo * key,
         (!ResizeKeyGroup(key, ndx, nActs, True)))
     {
         WSGO2("Could not resize group %d of key %s\n", ndx,
-              longText(key->name, XkbMessage));
+              longText(key->name));
         ACTION("Actions lost\n");
         return False;
     }
@@ -1035,7 +1035,7 @@ AddActionsToKey(KeyInfo * key,
         if (!HandleActionDef(act, xkb, toAct, MergeOverride, info->action))
         {
             ERROR1("Illegal action definition for %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION2("Action for group %d/level %d ignored\n", ndx + 1, i + 1);
         }
         act = (ExprDef *) act->common.next;
@@ -1074,7 +1074,7 @@ SetAllowNone(KeyInfo * key, ExprDef * arrayNdx, ExprDef * value)
     if (!ExprResolveBoolean(value, &tmp, NULL, NULL))
     {
         ERROR1("Illegal \"allow none\" value for %s\n",
-               longText(key->name, XkbMessage));
+               longText(key->name));
         ACTION("Non-boolean value ignored\n");
         return False;
     }
@@ -1140,7 +1140,7 @@ SetSymbolsField(KeyInfo * key,
                                      (char *) groupNames))
         {
             ERROR1("Illegal group index for type of key %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION("Definition with non-integer array index ignored\n");
             return False;
         }
@@ -1148,7 +1148,7 @@ SetSymbolsField(KeyInfo * key,
         {
             ERROR2
                 ("Group index for type of key %s is out of range (1..%d)\n",
-                 longText(key->name, XkbMessage), XkbNumKbdGroups + 1);
+                 longText(key->name), XkbNumKbdGroups + 1);
             ACTION1("Ignoring type for group %d\n", ndx.uval);
             return False;
         }
@@ -1177,7 +1177,7 @@ SetSymbolsField(KeyInfo * key,
             ERROR1("Expected a virtual modifier mask, found %s\n",
                    exprOpText(value->op));
             ACTION1("Ignoring virtual modifiers definition for key %s\n",
-                    longText(key->name, XkbMessage));
+                    longText(key->name));
         }
     }
     else if ((uStrCaseCmp(field, "locking") == 0)
@@ -1200,7 +1200,7 @@ SetSymbolsField(KeyInfo * key,
         if (!ok)
         {
             ERROR1("Illegal radio group specification for %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION("Non-integer radio group ignored\n");
             return False;
         }
@@ -1214,7 +1214,7 @@ SetSymbolsField(KeyInfo * key,
         {
             ERROR1
                 ("Radio group specification for %s out of range (1..32)\n",
-                 longText(key->name, XkbMessage));
+                 longText(key->name));
             ACTION1("Illegal radio group %d ignored\n", tmp.uval);
             return False;
         }
@@ -1249,7 +1249,7 @@ SetSymbolsField(KeyInfo * key,
             if (((overlayNdx < 1) || (overlayNdx > 2)) && (warningLevel > 0))
             {
                 ERROR2("Illegal overlay %d specified for %s\n",
-                       overlayNdx, longText(key->name, XkbMessage));
+                       overlayNdx, longText(key->name));
                 ACTION("Ignored\n");
                 return False;
             }
@@ -1259,7 +1259,7 @@ SetSymbolsField(KeyInfo * key,
         else if (warningLevel > 0)
         {
             ERROR2("Illegal overlay \"%s\" specified for %s\n",
-                   which, longText(key->name, XkbMessage));
+                   which, longText(key->name));
             ACTION("Ignored\n");
             return False;
         }
@@ -1267,7 +1267,7 @@ SetSymbolsField(KeyInfo * key,
         if (!ok)
         {
             ERROR1("Illegal overlay key specification for %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION("Overlay key must be specified by name\n");
             return False;
         }
@@ -1290,7 +1290,7 @@ SetSymbolsField(KeyInfo * key,
         if (!ok)
         {
             ERROR1("Illegal repeat setting for %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION("Non-boolean repeat setting ignored\n");
             return False;
         }
@@ -1304,7 +1304,7 @@ SetSymbolsField(KeyInfo * key,
         if (!ok)
         {
             ERROR1("Illegal groupsWrap setting for %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION("Non-boolean value ignored\n");
             return False;
         }
@@ -1321,7 +1321,7 @@ SetSymbolsField(KeyInfo * key,
         if (!ok)
         {
             ERROR1("Illegal groupsClamp setting for %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION("Non-boolean value ignored\n");
             return False;
         }
@@ -1338,14 +1338,14 @@ SetSymbolsField(KeyInfo * key,
             (value, &tmp, SimpleLookup, (char *) groupNames))
         {
             ERROR1("Illegal group index for redirect of key %s\n",
-                   longText(key->name, XkbMessage));
+                   longText(key->name));
             ACTION("Definition with non-integer group ignored\n");
             return False;
         }
         if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
         {
             ERROR2("Out-of-range (1..%d) group for redirect of key %s\n",
-                   XkbNumKbdGroups, longText(key->name, XkbMessage));
+                   XkbNumKbdGroups, longText(key->name));
             ERROR1("Ignoring illegal group %d\n", tmp.uval);
             return False;
         }
@@ -1532,7 +1532,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
         int i;
         WARN1("For the map %s an explicit group specified\n", info->name);
         WARN1("but key %s has more than one group defined\n",
-              longText(key->name, XkbMessage));
+              longText(key->name));
         ACTION("All groups except first one will be ignored\n");
         for (i = 1; i < XkbNumKbdGroups; i++)
         {
@@ -1966,7 +1966,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
         if ((start_from == 0) && (warningLevel >= 5))
         {
             WARN2("Key %s not found in %s keycodes\n",
-                  longText(key->name, XkbMessage),
+                  longText(key->name),
                   XkbcAtomText(xkb->names->keycodes));
             ACTION("Symbols ignored\n");
         }
@@ -2000,7 +2000,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
                           (unsigned int) key->numLevels[i]);
                     ACTION3("Using %s for the %s key (keycode %d)\n",
                             XkbcAtomText(key->types[i]),
-                            longText(key->name, XkbMessage), kc);
+                            longText(key->name), kc);
                 }
             }
         }
@@ -2016,7 +2016,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
                 WARN1("Type \"%s\" is not defined\n",
                       XkbcAtomText(key->types[i]));
                 ACTION2("Using TWO_LEVEL for the %s key (keycode %d)\n",
-                        longText(key->name, XkbMessage), kc);
+                        longText(key->name), kc);
             }
             types[i] = XkbTwoLevelIndex;
         }
@@ -2030,7 +2030,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
                     ("Type \"%s\" has %d levels, but %s has %d symbols\n",
                      XkbcAtomText(type->name),
                      (unsigned int) type->num_levels,
-                     longText(key->name, XkbMessage),
+                     longText(key->name),
                      (unsigned int) key->numLevels[i]);
                 ACTION("Ignoring extra symbols\n");
             }
@@ -2049,7 +2049,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
     if (outSyms == NULL)
     {
         WSGO2("Could not enlarge symbols for %s (keycode %d)\n",
-              longText(key->name, XkbMessage), kc);
+              longText(key->name), kc);
         return False;
     }
     if (haveActions)
@@ -2058,7 +2058,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
         if (outActs == NULL)
         {
             WSGO2("Could not enlarge actions for %s (key %d)\n",
-                  longText(key->name, XkbMessage), kc);
+                  longText(key->name), kc);
             return False;
         }
         xkb->server->explicit[kc] |= XkbExplicitInterpretMask;
@@ -2118,10 +2118,10 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
             if (warningLevel >= 1)
             {
                 WARN2("Key %s not found in %s keycodes\n",
-                      longText(key->nameForOverlayKey, XkbMessage),
+                      longText(key->nameForOverlayKey),
                       XkbcAtomText(xkb->names->keycodes));
                 ACTION1("Not treating %s as an overlay key \n",
-                        longText(key->name, XkbMessage));
+                        longText(key->name));
             }
             break;
         }
@@ -2163,7 +2163,7 @@ CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
         if (warningLevel >= 5)
         {
             WARN2("Key %s not found in %s keycodes\n",
-                  longText(entry->u.keyName, XkbMessage),
+                  longText(entry->u.keyName),
                   XkbcAtomText(xkb->names->keycodes));
             ACTION1("Modifier map entry for %s not updated\n",
                     XkbModIndexText(entry->modifier, XkbMessage));