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>
40 #include "X11/extensions/XKBcommon.h"
42 extern char *scanFile;
55 #define StmtKeycodeDef 2
56 #define StmtKeyAliasDef 3
59 #define StmtKeyTypeDef 6
60 #define StmtInterpDef 7
62 #define StmtSymbolsDef 9
63 #define StmtModMapDef 10
64 #define StmtGroupCompatDef 11
65 #define StmtIndicatorMapDef 12
66 #define StmtIndicatorNameDef 13
67 #define StmtOutlineDef 14
68 #define StmtShapeDef 15
71 #define StmtSectionDef 18
72 #define StmtOverlayKeyDef 19
73 #define StmtOverlayDef 20
74 #define StmtDoodadDef 21
76 #define FileSymInterp 100
78 typedef struct _ParseCommon
81 struct _ParseCommon *next;
86 #define ExprActionDecl 2
87 #define ExprFieldRef 3
88 #define ExprArrayRef 4
89 #define ExprKeysymList 5
90 #define ExprActionList 6
101 #define OpUnaryPlus 28
103 #define MergeDefault 0
104 #define MergeAugment 1
105 #define MergeOverride 2
106 #define MergeReplace 3
107 #define MergeAltForm 4
109 #define AutoKeyNames (1L << 0)
110 #define CreateKeyNames(x) ((x)->flags&AutoKeyNames)
112 extern unsigned warningLevel;
113 extern unsigned optionalParts;
115 typedef struct _IncludeStmt
124 struct _IncludeStmt *next;
175 typedef struct _VarDef
183 typedef struct _VModDef
191 typedef struct _KeycodeDef
199 typedef struct _KeyAliasDef
207 typedef struct _KeyTypeDef
215 typedef struct _SymbolsDef
223 typedef struct _ModMapDef
231 typedef struct _GroupCompatDef
239 typedef struct _InterpDef
248 typedef struct _IndicatorNameDef
257 typedef struct _OutlineDef
265 typedef struct _ShapeDef
271 OutlineDef *outlines;
274 typedef struct _KeyDef
282 typedef struct _RowDef
289 typedef struct _SectionDef
298 typedef struct _OverlayKeyDef
305 typedef struct _OverlayDef
314 typedef struct _DoodadDef
323 /* IndicatorMapDef doesn't use the type field, but the rest of the fields
324 need to be at the same offsets as in DoodadDef. Use #define to avoid
325 any strict aliasing problems. */
326 #define IndicatorMapDef DoodadDef
328 typedef struct _XkbFile
341 CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
344 CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
347 CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
350 CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
352 typedef struct _LEDInfo *LEDInfoPtr;
355 CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
356 LEDInfoPtr *unboundLEDs);
359 CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
361 #define WantLongListing (1<<0)
362 #define WantPartialMaps (1<<1)
363 #define WantHiddenMaps (1<<2)
364 #define WantFullNames (1<<3)
365 #define ListRecursive (1<<4)
367 extern char *rootDir;
368 extern unsigned verboseLevel;
369 extern unsigned dirsToStrip;
371 extern Bool AddListing(char * /* file */ ,
375 extern Bool AddMatchingFiles(char * /* head_in */
378 extern int AddMapOnly(char * /* map */
381 extern int GenerateListing(char * /* filename */
384 #endif /* XKBCOMP_H */