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/XKBstrcommon.h>
41 #include <X11/extensions/XKBrulescommon.h>
42 #include "X11/extensions/XKBcommon.h"
43 #include "XKBcommonint.h"
45 extern char *scanFile;
58 #define StmtKeycodeDef 2
59 #define StmtKeyAliasDef 3
62 #define StmtKeyTypeDef 6
63 #define StmtInterpDef 7
65 #define StmtSymbolsDef 9
66 #define StmtModMapDef 10
67 #define StmtGroupCompatDef 11
68 #define StmtIndicatorMapDef 12
69 #define StmtIndicatorNameDef 13
70 #define StmtOutlineDef 14
71 #define StmtShapeDef 15
74 #define StmtSectionDef 18
75 #define StmtOverlayKeyDef 19
76 #define StmtOverlayDef 20
77 #define StmtDoodadDef 21
79 #define FileSymInterp 100
81 typedef struct _ParseCommon
84 struct _ParseCommon *next;
89 #define ExprActionDecl 2
90 #define ExprFieldRef 3
91 #define ExprArrayRef 4
92 #define ExprKeysymList 5
93 #define ExprActionList 6
104 #define OpUnaryPlus 28
106 #define MergeDefault 0
107 #define MergeAugment 1
108 #define MergeOverride 2
109 #define MergeReplace 3
110 #define MergeAltForm 4
112 #define AutoKeyNames (1L << 0)
113 #define CreateKeyNames(x) ((x)->flags&AutoKeyNames)
115 extern unsigned warningLevel;
116 extern unsigned optionalParts;
118 typedef struct _IncludeStmt
127 struct _IncludeStmt *next;
178 typedef struct _VarDef
186 typedef struct _VModDef
194 typedef struct _KeycodeDef
202 typedef struct _KeyAliasDef
210 typedef struct _KeyTypeDef
218 typedef struct _SymbolsDef
226 typedef struct _ModMapDef
234 typedef struct _GroupCompatDef
242 typedef struct _InterpDef
251 typedef struct _IndicatorNameDef
260 typedef struct _OutlineDef
268 typedef struct _ShapeDef
274 OutlineDef *outlines;
277 typedef struct _KeyDef
285 typedef struct _RowDef
292 typedef struct _SectionDef
301 typedef struct _OverlayKeyDef
308 typedef struct _OverlayDef
317 typedef struct _DoodadDef
326 /* IndicatorMapDef doesn't use the type field, but the rest of the fields
327 need to be at the same offsets as in DoodadDef. Use #define to avoid
328 any strict aliasing problems. */
329 #define IndicatorMapDef DoodadDef
331 typedef struct _XkbFile
344 CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
347 CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
350 CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
353 CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
355 typedef struct _LEDInfo *LEDInfoPtr;
358 CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
359 LEDInfoPtr *unboundLEDs);
362 CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
364 #define WantLongListing (1<<0)
365 #define WantPartialMaps (1<<1)
366 #define WantHiddenMaps (1<<2)
367 #define WantFullNames (1<<3)
368 #define ListRecursive (1<<4)
370 extern char *rootDir;
371 extern unsigned verboseLevel;
372 extern unsigned dirsToStrip;
374 extern Bool AddListing(char * /* file */ ,
378 extern Bool AddMatchingFiles(char * /* head_in */
381 extern int AddMapOnly(char * /* map */
384 extern int GenerateListing(char * /* filename */
387 #endif /* XKBCOMP_H */