static int check_for_evdev(void)

{

    SDL_SysWMinfo info;

    XkbDescPtr desc;

    int has_evdev = 0;

    const char *keycodes;



    SDL_VERSION(&info.version);

    if (!SDL_GetWMInfo(&info))

        return 0;



    desc = XkbGetKeyboard(info.info.x11.display,

                          XkbGBN_AllComponentsMask,

                          XkbUseCoreKbd);

    if (desc == NULL || desc->names == NULL)

        return 0;



    keycodes = XGetAtomName(info.info.x11.display, desc->names->keycodes);

    if (keycodes == NULL)

        fprintf(stderr, "could not lookup keycode name\n");

    else if (strstart(keycodes, "evdev", NULL))

        has_evdev = 1;

    else if (!strstart(keycodes, "xfree86", NULL))

        fprintf(stderr,

                "unknown keycodes `%s', please report to qemu-devel@nongnu.org\n",

                keycodes);



    XkbFreeClientMap(desc, XkbGBN_AllComponentsMask, True);



    return has_evdev;

}

static int check_for_evdev(void)

{

    SDL_SysWMinfo info;

    XkbDescPtr desc;

    int has_evdev = 0;

    const char *keycodes;



    SDL_VERSION(&info.version);

    if (!SDL_GetWMInfo(&info))

        return 0;



    desc = XkbGetKeyboard(info.info.x11.display,

                          XkbGBN_AllComponentsMask,

                          XkbUseCoreKbd);

    if (desc == NULL || desc->names == NULL)

        return 0;



    keycodes = XGetAtomName(info.info.x11.display, desc->names->keycodes);

    if (keycodes == NULL)

        fprintf(stderr, "could not lookup keycode name\n");

    else if (strstart(keycodes, "evdev", NULL))

        has_evdev = 1;

    else if (!strstart(keycodes, "xfree86", NULL))

        fprintf(stderr,

                "unknown keycodes `%s', please report to qemu-devel@nongnu.org\n",

                keycodes);



    XkbFreeClientMap(desc, XkbGBN_AllComponentsMask, True);



    return has_evdev;

}

    XkbDescPtr desc;     const char *keycodes;     if (!SDL_GetWMInfo(&info))     if (desc == NULL || desc->names == NULL)         return 0;     keycodes = XGetAtomName(info.info.x11.display, desc->names->keycodes);     if (keycodes == NULL)         fprintf(stderr, "could not lookup keycode name\n");     else if (strstart(keycodes, "evdev", NULL))         has_evdev = 1;     else if (!strstart(keycodes, "xfree86", NULL))         fprintf(stderr,                 "unknown keycodes `%s', please report to qemu-devel@nongnu.org\n",                 keycodes);     XkbFreeClientMap(desc, XkbGBN_AllComponentsMask, True);
static int FUNC_0(void)

{

    SDL_SysWMinfo info;

    XkbDescPtr desc;

    int VAR_0 = 0;

    const char *VAR_1;



    SDL_VERSION(&info.version);

    if (!SDL_GetWMInfo(&info))

        return 0;



    desc = XkbGetKeyboard(info.info.x11.display,

                          XkbGBN_AllComponentsMask,

                          XkbUseCoreKbd);

    if (desc == NULL || desc->names == NULL)

        return 0;



    VAR_1 = XGetAtomName(info.info.x11.display, desc->names->VAR_1);

    if (VAR_1 == NULL)

        fprintf(stderr, "could not lookup keycode name\n");

    else if (strstart(VAR_1, "evdev", NULL))

        VAR_0 = 1;

    else if (!strstart(VAR_1, "xfree86", NULL))

        fprintf(stderr,

                "unknown VAR_1 `%s', please report to qemu-devel@nongnu.org\n",

                VAR_1);



    XkbFreeClientMap(desc, XkbGBN_AllComponentsMask, True);



    return VAR_0;

}

static int FUNC_0(void)
{ SDL_SysWMinfo info; XkbDescPtr desc; int VAR_0 = 0; const char *VAR_1; SDL_VERSION(&info.version); if (!SDL_GetWMInfo(&info))
return 0; desc = XkbGetKeyboard(info.info.x11.display,
XkbGBN_AllComponentsMask,
XkbUseCoreKbd); if (desc == NULL || desc->names == NULL)
return 0; VAR_1 = XGetAtomName(info.info.x11.display, desc->names->VAR_1); if (VAR_1 == NULL)
fprintf(stderr, "could not lookup keycode name\n"); else if (strstart(VAR_1, "evdev", NULL))
VAR_0 = 1; else if (!strstart(VAR_1, "xfree86", NULL))
fprintf(stderr,
"unknown VAR_1 `%s', please report to qemu-devel@nongnu.org\n",
VAR_1); XkbFreeClientMap(desc, XkbGBN_AllComponentsMask, True); return VAR_0; }