mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
Make word commands unicode friendly.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4522 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
8a9da9cf2d
commit
4f98e29bab
@ -27,6 +27,31 @@
|
|||||||
#include "gui-printtext.h"
|
#include "gui-printtext.h"
|
||||||
#include "term.h"
|
#include "term.h"
|
||||||
|
|
||||||
|
#undef i_toupper
|
||||||
|
#undef i_tolower
|
||||||
|
#undef i_isalnum
|
||||||
|
|
||||||
|
static unichar i_toupper(unichar c)
|
||||||
|
{
|
||||||
|
if (term_type == TERM_TYPE_UTF8)
|
||||||
|
return g_unichar_toupper(c);
|
||||||
|
return (c >= 0 && c <= 255) ? toupper(c) : c;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unichar i_tolower(unichar c)
|
||||||
|
{
|
||||||
|
if (term_type == TERM_TYPE_UTF8)
|
||||||
|
return g_unichar_tolower(c);
|
||||||
|
return (c >= 0 && c <= 255) ? tolower(c) : c;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int i_isalnum(unichar c)
|
||||||
|
{
|
||||||
|
if (term_type == TERM_TYPE_UTF8)
|
||||||
|
return (g_unichar_isalnum(c) || mk_wcwidth(c) == 0);
|
||||||
|
return (c >= 0 && c <= 255) ? isalnum(c) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
const unichar empty_str[] = { 0 };
|
const unichar empty_str[] = { 0 };
|
||||||
|
|
||||||
GUI_ENTRY_REC *active_entry;
|
GUI_ENTRY_REC *active_entry;
|
||||||
|
Loading…
Reference in New Issue
Block a user