It's unneeded; the same function is always passed.
Signed-off-by: Ran Benita <ran234@gmail.com>
}
}
-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;
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);
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;
switch (stmt->stmtType)
{
case StmtInclude:
- if (!HandleIncludeCompatMap((IncludeStmt *) stmt, keymap, info,
- HandleCompatMapFile))
+ if (!HandleIncludeCompatMap((IncludeStmt *) stmt, keymap, info))
info->errorCount++;
break;
case StmtInterpDef:
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;
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);
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);
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" */
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;
{
included.explicit_group = info->explicit_group;
}
- (*hndlr) (rtrn, keymap, MergeOverride, &included);
+ HandleSymbolsFile(rtrn, keymap, MergeOverride, &included);
if (stmt->stmt != NULL)
{
free(included.name);
{
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);
switch (stmt->stmtType)
{
case StmtInclude:
- if (!HandleIncludeSymbols((IncludeStmt *) stmt, keymap, info,
- HandleSymbolsFile))
+ if (!HandleIncludeSymbols((IncludeStmt *) stmt, keymap, info))
info->errorCount++;
break;
case StmtSymbolsDef: