diff options
-rw-r--r-- | action.c | 4 | ||||
-rw-r--r-- | action.h | 2 | ||||
-rw-r--r-- | expr.c | 6 | ||||
-rw-r--r-- | expr.h | 17 | ||||
-rw-r--r-- | keytypes.c | 27 | ||||
-rw-r--r-- | listing.c | 2 | ||||
-rw-r--r-- | misc.c | 2 | ||||
-rw-r--r-- | misc.h | 6 | ||||
-rw-r--r-- | utils.c | 4 | ||||
-rw-r--r-- | utils.h | 3 | ||||
-rw-r--r-- | vmod.c | 2 | ||||
-rw-r--r-- | vmod.h | 7 | ||||
-rw-r--r-- | xkbcomp.c | 4 | ||||
-rw-r--r-- | xkbcomp.h | 6 | ||||
-rw-r--r-- | xkbpath.c | 2 | ||||
-rw-r--r-- | xkbpath.h | 2 |
16 files changed, 18 insertions, 78 deletions
@@ -38,6 +38,8 @@ static Bool actionsInitialized; static ExprDef constTrue; static ExprDef constFalse; +static void ActionsInit(void); + /***====================================================================***/ static Bool @@ -1488,7 +1490,7 @@ SetActionField(XkbDescPtr xkb, /***====================================================================***/ -void +static void ActionsInit(void) { if (!actionsInitialized) @@ -79,8 +79,6 @@ extern int SetActionField(XkbDescPtr /* xkb */ , ActionInfo ** /* info_rtrn */ ); -extern void ActionsInit(void); - extern LookupEntry ctrlNames[]; #endif /* ACTION_H */ @@ -94,7 +94,7 @@ exprOpText(unsigned type) return buf; } -char * +static char * exprTypeText(unsigned type) { static char buf[20]; @@ -208,7 +208,7 @@ RadioLookup(XPointer priv, return True; } -int +static int TableLookup(XPointer priv, Atom elem, Atom field, unsigned type, ExprResult * val_rtrn) { @@ -255,7 +255,7 @@ LookupModIndex(XPointer priv, val_rtrn); } -int +static int LookupModMask(XPointer priv, Atom elem, Atom field, unsigned type, ExprResult * val_rtrn) { @@ -42,9 +42,6 @@ typedef Bool(*IdentLookupFunc) (XPointer /* priv */ , ExprResult * /* val_rtrn */ ); -extern char *exprTypeText(unsigned /* type */ - ); - extern int ExprResolveLhs(ExprDef * /* expr */ , ExprResult * /* elem_rtrn */ , ExprResult * /* field_rtrn */ , @@ -89,13 +86,6 @@ extern int SimpleLookup(XPointer /* priv */ , ExprResult * /* val_rtrn */ ); -extern int TableLookup(XPointer /* priv */ , - Atom /* elem */ , - Atom /* field */ , - unsigned /* type */ , - ExprResult * /* val_rtrn */ - ); - extern int LookupModIndex(XPointer /* priv */ , Atom /* elem */ , Atom /* field */ , @@ -103,13 +93,6 @@ extern int LookupModIndex(XPointer /* priv */ , ExprResult * /* val_rtrn */ ); -extern int LookupModMask(XPointer /* priv */ , - Atom /* elem */ , - Atom /* field */ , - unsigned /* type */ , - ExprResult * /* val_rtrn */ - ); - extern int ExprResolveModIndex(ExprDef * /* expr */ , ExprResult * /* val_rtrn */ , IdentLookupFunc /* lookup */ , @@ -92,27 +92,6 @@ Atom tok_KEYPAD; /***====================================================================***/ -extern Bool AddMapEntry(XkbDescPtr /* xkb */ , - KeyTypeInfo * /* type */ , - XkbKTMapEntryPtr /* new */ , - Bool /* clobber */ , - Bool /* report */ - ); - -extern Bool AddPreserve(XkbDescPtr /* xkb */ , - KeyTypeInfo * /* type */ , - PreserveInfo * /* new */ , - Bool /* clobber */ , - Bool /* report */ - ); - -extern Bool AddLevelName(KeyTypeInfo * /* type */ , - unsigned /* level */ , - Atom /* name */ , - Bool /* clobber */ , - Bool /* report */ - ); - #define MapEntryTxt(t,x,e) \ XkbVModMaskText((t)->dpy,(x),(e)->mods.real_mods,(e)->mods.vmods,XkbMessage) #define PreserveIndexTxt(t,x,p) \ @@ -531,7 +510,7 @@ NextMapEntry(KeyTypeInfo * type) return &type->entries[type->nEntries++]; } -Bool +static Bool AddPreserve(XkbDescPtr xkb, KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report) { @@ -603,7 +582,7 @@ AddPreserve(XkbDescPtr xkb, * @param clobber Overwrite existing entry. * @param report True if a warning is to be printed on. */ -Bool +static Bool AddMapEntry(XkbDescPtr xkb, KeyTypeInfo * type, XkbKTMapEntryPtr new, Bool clobber, Bool report) @@ -774,7 +753,7 @@ SetPreserve(KeyTypeInfo * type, /***====================================================================***/ -Bool +static Bool AddLevelName(KeyTypeInfo * type, unsigned level, Atom name, Bool clobber, Bool report) { @@ -163,7 +163,7 @@ AddMapOnly(char *map) return 1; } -int +static int AddListing(char *file, char *map) { if (nListed >= szListing) @@ -226,7 +226,7 @@ UseNewField(unsigned field, return useNew; } -Bool +static Bool MergeNewField(unsigned field, CommonInfo * oldDefs, CommonInfo * newDefs, unsigned *pCollide) { @@ -41,12 +41,6 @@ extern Bool UseNewField(unsigned /* field */ , unsigned * /* pCollide */ ); -extern Bool MergeNewField(unsigned /* field */ , - CommonInfo * /* oldDefs */ , - CommonInfo * /* newDefs */ , - unsigned * /* pCollide */ - ); - extern XPointer ClearCommonInfo(CommonInfo * /* cmn */ ); @@ -58,9 +58,9 @@ uRecalloc(void *old, size_t nOld, size_t nNew, size_t itemSize) /*** PRINT FUNCTIONS ***/ /***====================================================================***/ -FILE *uDebugFile = NULL; +static FILE *uDebugFile = NULL; int uDebugIndentLevel = 0; -int uDebugIndentSize = 4; +static const int uDebugIndentSize = 4; Boolean uSetDebugFile(char *name) @@ -180,9 +180,8 @@ extern extern Boolean uSetDebugFile(char *name); - extern FILE *uDebugFile; extern int uDebugIndentLevel; - extern int uDebugIndentSize; + #define uDebugIndent(l) (uDebugIndentLevel+=(l)) #define uDebugOutdent(l) (uDebugIndentLevel-=(l)) #ifdef DEBUG @@ -165,7 +165,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info) * @return True on success, False otherwise. If False is returned, val_rtrn is * undefined. */ -int +static int LookupVModIndex(XPointer priv, Atom elem, Atom field, unsigned type, ExprResult * val_rtrn) { @@ -53,13 +53,6 @@ extern Bool ApplyVModDefs(VModInfo * /* info */ , XkbDescPtr /* xkb */ ); -extern int LookupVModIndex(XPointer /* priv */ , - Atom /* elem */ , - Atom /* field */ , - unsigned /* type */ , - ExprResult * /* val_rtrn */ - ); - extern int LookupVModMask(XPointer /* priv */ , Atom /* elem */ , Atom /* field */ , @@ -78,7 +78,7 @@ static const char *fileTypeExt[] = { }; static unsigned inputFormat, outputFormat; -char *rootDir; +static char *rootDir; static char *inputFile; static char *inputMap; static char *outputFile; @@ -93,7 +93,7 @@ static Bool xkblist = False; unsigned warningLevel = 5; unsigned verboseLevel = 0; unsigned dirsToStrip = 0; -unsigned optionalParts = 0; +static unsigned optionalParts = 0; static char *preErrorMsg = NULL; static char *postErrorMsg = NULL; static char *errorPrefix = NULL; @@ -110,7 +110,6 @@ typedef struct _ParseCommon #define CreateKeyNames(x) ((x)->flags&AutoKeyNames) extern unsigned warningLevel; -extern unsigned optionalParts; typedef struct _IncludeStmt { @@ -377,14 +376,9 @@ extern Bool CompileSymbols(XkbFile * /* file */ , #define WantFullNames (1<<3) #define ListRecursive (1<<4) -extern char *rootDir; extern unsigned verboseLevel; extern unsigned dirsToStrip; -extern Bool AddListing(char * /* file */ , - char * /* map */ - ); - extern Bool AddMatchingFiles(char * /* head_in */ ); @@ -175,7 +175,7 @@ XkbAddDefaultDirectoriesToPath(void) /** * Remove all entries from the global includePath. */ -void +static void XkbClearIncludePath(void) { if (szPath > 0) @@ -29,8 +29,6 @@ extern Bool XkbInitIncludePath(void); -extern void XkbClearIncludePath(void); - extern void XkbAddDefaultDirectoriesToPath(void); extern Bool XkbAddDirectoryToPath(const char * /* dir */ |