1 /************************************************************
2 Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
4 Permission to use, copy, modify, and distribute this
5 software and its documentation for any purpose and without
6 fee is hereby granted, provided that the above copyright
7 notice appear in all copies and that both that copyright
8 notice and this permission notice appear in supporting
9 documentation, and that the name of Silicon Graphics not be
10 used in advertising or publicity pertaining to distribution
11 of the software without specific prior written permission.
12 Silicon Graphics makes no representation about the suitability
13 of this software for any purpose. It is provided "as is"
14 without any express or implied warranty.
16 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
23 THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 ********************************************************/
31 #define DEBUG_VAR debugFlags
35 #include <X11/Xdefs.h>
39 #include <X11/extensions/XKM.h>
41 extern char *scanFile;
54 #define StmtKeycodeDef 2
55 #define StmtKeyAliasDef 3
58 #define StmtKeyTypeDef 6
59 #define StmtInterpDef 7
61 #define StmtSymbolsDef 9
62 #define StmtModMapDef 10
63 #define StmtGroupCompatDef 11
64 #define StmtIndicatorMapDef 12
65 #define StmtIndicatorNameDef 13
66 #define StmtOutlineDef 14
67 #define StmtShapeDef 15
70 #define StmtSectionDef 18
71 #define StmtOverlayKeyDef 19
72 #define StmtOverlayDef 20
73 #define StmtDoodadDef 21
75 #define FileSymInterp 100
77 typedef struct _ParseCommon
80 struct _ParseCommon *next;
85 #define ExprActionDecl 2
86 #define ExprFieldRef 3
87 #define ExprArrayRef 4
88 #define ExprKeysymList 5
89 #define ExprActionList 6
100 #define OpUnaryPlus 28
102 #define MergeDefault 0
103 #define MergeAugment 1
104 #define MergeOverride 2
105 #define MergeReplace 3
106 #define MergeAltForm 4
108 #define AutoKeyNames (1L << 0)
109 #define CreateKeyNames(x) ((x)->flags&AutoKeyNames)
111 extern unsigned warningLevel;
112 extern unsigned optionalParts;
114 typedef struct _IncludeStmt
123 struct _IncludeStmt *next;
174 typedef struct _VarDef
182 typedef struct _VModDef
190 typedef struct _KeycodeDef
198 typedef struct _KeyAliasDef
206 typedef struct _KeyTypeDef
214 typedef struct _SymbolsDef
222 typedef struct _ModMapDef
230 typedef struct _GroupCompatDef
238 typedef struct _InterpDef
247 typedef struct _IndicatorNameDef
256 typedef struct _OutlineDef
264 typedef struct _ShapeDef
270 OutlineDef *outlines;
273 typedef struct _KeyDef
281 typedef struct _RowDef
288 typedef struct _SectionDef
297 typedef struct _OverlayKeyDef
304 typedef struct _OverlayDef
313 typedef struct _DoodadDef
322 /* IndicatorMapDef doesn't use the type field, but the rest of the fields
323 need to be at the same offsets as in DoodadDef. Use #define to avoid
324 any strict aliasing problems. */
325 #define IndicatorMapDef DoodadDef
327 typedef struct _XkbFile
340 CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
343 CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
346 CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
349 CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
351 typedef struct _LEDInfo *LEDInfoPtr;
354 CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
355 LEDInfoPtr *unboundLEDs);
358 CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
360 #define WantLongListing (1<<0)
361 #define WantPartialMaps (1<<1)
362 #define WantHiddenMaps (1<<2)
363 #define WantFullNames (1<<3)
364 #define ListRecursive (1<<4)
366 extern char *rootDir;
367 extern unsigned verboseLevel;
368 extern unsigned dirsToStrip;
370 extern Bool AddListing(char * /* file */ ,
374 extern Bool AddMatchingFiles(char * /* head_in */
377 extern int AddMapOnly(char * /* map */
380 extern int GenerateListing(char * /* filename */
383 #endif /* XKBCOMP_H */