Moving xkbcomp into the server

Dan Nicholson dbn.lists at gmail.com
Mon Nov 17 11:25:25 PST 2008


I decided to take a crack at moving xkbcomp into the server so it's
not popen'd whenever a keymap is loaded. For the first crack, I'm
trying to just leave xkbcomp pretty much unchanged except for the
interface. What's causing me the most difficulty is converting to
server API. One snag I've hit is XStringToKeysym. Here's an example
usage in the xkbcomp parser:

int
LookupKeysym(char *str, KeySym * sym_rtrn)
{
    KeySym sym;

    if ((!str) || (uStrCaseCmp(str, "any") == 0)
        || (uStrCaseCmp(str, "nosymbol") == 0))
    {
        *sym_rtrn = NoSymbol;
        return 1;
    }
    else if ((uStrCaseCmp(str, "none") == 0)
             || (uStrCaseCmp(str, "voidsymbol") == 0))
    {
        *sym_rtrn = XK_VoidSymbol;
        return 1;
    }
    sym = XStringToKeysym(str);
    if (sym != NoSymbol)
    {
        *sym_rtrn = sym;
        return 1;
    }
    return 0;
}

Is there an equivalent API in the server to do this conversion?
Is this crazy/am I going about this the wrong way?
Any general suggestions for working on this?

--
Dan



More information about the xorg mailing list