Commit d15fa57a4b1402a6a419ed34f0fc309f0a26df4f

Ran Benita 2012-05-13T17:21:02

Remove FileHandler callback argument It's unneeded; the same function is always passed. Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index f8b32a7..a2a4143 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -386,12 +386,13 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
     }
 }
 
-typedef void (*FileHandler) (XkbFile *rtrn, struct xkb_keymap *keymap,
-                             unsigned merge, CompatInfo *info);
+static void
+HandleCompatMapFile(XkbFile *file, struct xkb_keymap *keymap, unsigned merge,
+                    CompatInfo *info);
 
 static bool
 HandleIncludeCompatMap(IncludeStmt *stmt, struct xkb_keymap *keymap,
-                       CompatInfo *info, FileHandler hndlr)
+                       CompatInfo *info)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -416,7 +417,7 @@ HandleIncludeCompatMap(IncludeStmt *stmt, struct xkb_keymap *keymap,
         included.ledDflt.defs.fileID = rtrn->id;
         included.ledDflt.defs.merge = newMerge;
         included.act = info->act;
-        (*hndlr) (rtrn, keymap, MergeOverride, &included);
+        HandleCompatMapFile(rtrn, keymap, MergeOverride, &included);
         if (stmt->stmt != NULL)
         {
             free(included.name);
@@ -457,7 +458,7 @@ HandleIncludeCompatMap(IncludeStmt *stmt, struct xkb_keymap *keymap,
                 next_incl.ledDflt.defs.fileID = rtrn->id;
                 next_incl.ledDflt.defs.merge = op;
                 next_incl.act = info->act;
-                (*hndlr) (rtrn, keymap, MergeOverride, &next_incl);
+                HandleCompatMapFile(rtrn, keymap, MergeOverride, &next_incl);
                 MergeIncludedCompatMaps(&included, &next_incl, op);
                 if (info->act != NULL)
                         next_incl.act = NULL;
@@ -710,8 +711,7 @@ HandleCompatMapFile(XkbFile *file, struct xkb_keymap *keymap, unsigned merge,
         switch (stmt->stmtType)
         {
         case StmtInclude:
-            if (!HandleIncludeCompatMap((IncludeStmt *) stmt, keymap, info,
-                                        HandleCompatMapFile))
+            if (!HandleIncludeCompatMap((IncludeStmt *) stmt, keymap, info))
                 info->errorCount++;
             break;
         case StmtInterpDef:
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index 4e4ac04..b8b019b 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -352,12 +352,13 @@ MergeIncludedKeyTypes(KeyTypesInfo *into, KeyTypesInfo *from,
     into->stdPresent |= from->stdPresent;
 }
 
-typedef void (*FileHandler) (XkbFile *file, struct xkb_keymap *keymap,
-                             unsigned merge, KeyTypesInfo *included);
+static void
+HandleKeyTypesFile(XkbFile *file, struct xkb_keymap *keymap,
+                   unsigned merge, KeyTypesInfo *info);
 
 static bool
 HandleIncludeKeyTypes(IncludeStmt *stmt, struct xkb_keymap *keymap,
-                      KeyTypesInfo *info, FileHandler hndlr)
+                      KeyTypesInfo *info)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -378,7 +379,7 @@ HandleIncludeKeyTypes(IncludeStmt *stmt, struct xkb_keymap *keymap,
         included.fileID = included.dflt.defs.fileID = rtrn->id;
         included.dflt.defs.merge = newMerge;
 
-        (*hndlr) (rtrn, keymap, newMerge, &included);
+        HandleKeyTypesFile(rtrn, keymap, newMerge, &included);
         if (stmt->stmt != NULL)
         {
             free(included.name);
@@ -412,7 +413,7 @@ HandleIncludeKeyTypes(IncludeStmt *stmt, struct xkb_keymap *keymap,
                 InitKeyTypesInfo(&next_incl, keymap, &included);
                 next_incl.fileID = next_incl.dflt.defs.fileID = rtrn->id;
                 next_incl.dflt.defs.merge = op;
-                (*hndlr) (rtrn, keymap, op, &next_incl);
+                HandleKeyTypesFile(rtrn, keymap, op, &next_incl);
                 MergeIncludedKeyTypes(&included, &next_incl, op, keymap);
                 FreeKeyTypesInfo(&next_incl);
                 FreeXKBFile(rtrn);
@@ -1017,8 +1018,7 @@ HandleKeyTypesFile(XkbFile *file, struct xkb_keymap *keymap,
         switch (stmt->stmtType)
         {
         case StmtInclude:
-            if (!HandleIncludeKeyTypes((IncludeStmt *) stmt, keymap, info,
-                                       HandleKeyTypesFile))
+            if (!HandleIncludeKeyTypes((IncludeStmt *) stmt, keymap, info))
                 info->errorCount++;
             break;
         case StmtKeyTypeDef: /* e.g. type "ONE_LEVEL" */
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index b54343c..9c26e23 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -869,12 +869,13 @@ MergeIncludedSymbols(SymbolsInfo *into, SymbolsInfo *from,
         into->errorCount++;
 }
 
-typedef void (*FileHandler) (XkbFile *rtrn, struct xkb_keymap *keymap,
-                             unsigned merge, SymbolsInfo *included);
+static void
+HandleSymbolsFile(XkbFile *file, struct xkb_keymap *keymap,
+                  unsigned merge, SymbolsInfo *info);
 
 static bool
 HandleIncludeSymbols(IncludeStmt *stmt, struct xkb_keymap *keymap,
-                     SymbolsInfo *info, FileHandler hndlr)
+                     SymbolsInfo *info)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -902,7 +903,7 @@ HandleIncludeSymbols(IncludeStmt *stmt, struct xkb_keymap *keymap,
         {
             included.explicit_group = info->explicit_group;
         }
-        (*hndlr) (rtrn, keymap, MergeOverride, &included);
+        HandleSymbolsFile(rtrn, keymap, MergeOverride, &included);
         if (stmt->stmt != NULL)
         {
             free(included.name);
@@ -944,7 +945,7 @@ HandleIncludeSymbols(IncludeStmt *stmt, struct xkb_keymap *keymap,
                 {
                     next_incl.explicit_group = info->explicit_group;
                 }
-                (*hndlr) (rtrn, keymap, MergeOverride, &next_incl);
+                HandleSymbolsFile(rtrn, keymap, MergeOverride, &next_incl);
                 MergeIncludedSymbols(&included, &next_incl, op, keymap);
                 FreeSymbolsInfo(&next_incl);
                 FreeXKBFile(rtrn);
@@ -1612,8 +1613,7 @@ HandleSymbolsFile(XkbFile *file, struct xkb_keymap *keymap,
         switch (stmt->stmtType)
         {
         case StmtInclude:
-            if (!HandleIncludeSymbols((IncludeStmt *) stmt, keymap, info,
-                                      HandleSymbolsFile))
+            if (!HandleIncludeSymbols((IncludeStmt *) stmt, keymap, info))
                 info->errorCount++;
             break;
         case StmtSymbolsDef: