… | |
… | |
316 | |
316 | |
317 | // the XOpenIM manpage lies about hardcoding the locale |
317 | // the XOpenIM manpage lies about hardcoding the locale |
318 | // at the point of XOpenIM, so temporarily switch locales |
318 | // at the point of XOpenIM, so temporarily switch locales |
319 | if (rs[Rs_imLocale]) |
319 | if (rs[Rs_imLocale]) |
320 | SET_LOCALE (rs[Rs_imLocale]); |
320 | SET_LOCALE (rs[Rs_imLocale]); |
|
|
321 | |
321 | // assume wchar_t == unicode or better |
322 | // assume wchar_t == unicode or better |
322 | len = XwcLookupString (Input_Context, &ev, wkbuf, |
323 | len = XwcLookupString (Input_Context, &ev, wkbuf, |
323 | KBUFSZ, &keysym, &status_return); |
324 | KBUFSZ, &keysym, &status_return); |
|
|
325 | |
324 | if (rs[Rs_imLocale]) |
326 | if (rs[Rs_imLocale]) |
325 | SET_LOCALE (locale); |
327 | SET_LOCALE (locale); |
326 | |
328 | |
327 | if (status_return == XLookupChars |
329 | if (status_return == XLookupChars |
328 | || status_return == XLookupBoth) |
330 | || status_return == XLookupBoth) |
… | |
… | |
3588 | else if (ch < 0x20) |
3590 | else if (ch < 0x20) |
3589 | return NULL; /* other control character - exit */ |
3591 | return NULL; /* other control character - exit */ |
3590 | |
3592 | |
3591 | seen_esc = false; |
3593 | seen_esc = false; |
3592 | |
3594 | |
3593 | if (n >= sizeof (string) - 1) |
3595 | if (n >= STRING_MAX - 1) |
3594 | // stop at some sane length |
3596 | // stop at some sane length |
3595 | return NULL; |
3597 | return NULL; |
3596 | |
3598 | |
3597 | if (ch == C0_SYN) |
3599 | if (ch == C0_SYN) |
3598 | string[n++] = cmd_get8 (); |
3600 | string[n++] = cmd_get8 (); |