src/xkbcomp/symbols.c
static bool
AddKeySymbols(SymbolsInfo *info, KeyInfo *keyi, bool same_file)
{
    xkb_atom_t real_name;
    KeyInfo *iter;

    /*
     * Don't keep aliases in the keys array; this guarantees that
     * searching for keys to merge with by straight comparison (see the
     * following loop) is enough, and we won't get multiple KeyInfo's
     * for the same key because of aliases.
     */
    real_name = XkbResolveKeyAlias(info->keymap, keyi->name);
    if (real_name != XKB_ATOM_NONE)
        keyi->name = real_name;

    darray_foreach(iter, info->keys)
        if (iter->name == keyi->name)
            return MergeKeys(info, iter, keyi, same_file);

    darray_append(info->keys, *keyi);
    InitKeyInfo(info->ctx, keyi);
    return true;
}
/* TODO: Make it so this function doesn't need the entire keymap. */
Make it so this function doesn't need the entire keymap.
Make it so this function doesn ' t need the entire keymap .
static bool
AddKeySymbols(SymbolsInfo *info, KeyInfo *keyi, bool same_file)
{
    xkb_atom_t real_name;
    KeyInfo *iter;
    real_name = XkbResolveKeyAlias(info->keymap, keyi->name);
    if (real_name != XKB_ATOM_NONE)
        keyi->name = real_name;
    darray_foreach(iter, info->keys)
        if (iter->name == keyi->name)
            return MergeKeys(info, iter, keyi, same_file);
    darray_append(info->keys, *keyi);
    InitKeyInfo(info->ctx, keyi);
    return true;
}
static bool AddKeySymbols ( SymbolsInfo * info , KeyInfo * keyi , bool same_file ) { xkb_atom_t real_name ; KeyInfo * iter ; real_name = XkbResolveKeyAlias ( info -> keymap , keyi -> name ) ; if ( real_name != XKB_ATOM_NONE ) keyi -> name = real_name ; darray_foreach ( iter , info -> keys ) if ( iter -> name == keyi -> name ) return MergeKeys ( info , iter , keyi , same_file ) ; darray_append ( info -> keys , * keyi ) ; InitKeyInfo ( info -> ctx , keyi ) ; return true ; }
TODO: Make it so this function doesn't need the entire keymap.
TODO : Make it so this function doesn ' t need the entire keymap .
/*
     * Don't keep aliases in the keys array; this guarantees that
     * searching for keys to merge with by straight comparison (see the
     * following loop) is enough, and we won't get multiple KeyInfo's
     * for the same key because of aliases.
     */