summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/gui-entry.c')
-rw-r--r--src/fe-text/gui-entry.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c
index 13cbfafd..c7d06404 100644
--- a/src/fe-text/gui-entry.c
+++ b/src/fe-text/gui-entry.c
@@ -35,21 +35,21 @@ 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;
+ return 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;
+ return 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;
+ return c <= 255 ? isalnum(c) : 0;
}
GUI_ENTRY_REC *active_entry;
@@ -226,8 +226,8 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos)
int i;
int xpos, end_xpos;
- xpos = entry->xpos + entry->promptlen +
- pos2scrpos(entry, pos + entry->scrstart) -
+ xpos = entry->xpos + entry->promptlen +
+ pos2scrpos(entry, pos + entry->scrstart) -
pos2scrpos(entry, entry->scrstart);
end_xpos = entry->xpos + entry->width;
@@ -452,7 +452,7 @@ void gui_entry_insert_text(GUI_ENTRY_REC *entry, const char *str)
g_utf8_validate(str, -1, &ptr);
len = g_utf8_pointer_to_offset(str, ptr);
} else if (term_type == TERM_TYPE_BIG5)
- len = strlen_big5(str);
+ len = strlen_big5((const unsigned char *)str);
else
len = strlen(str);
entry_text_grow(entry, len);
@@ -730,7 +730,7 @@ void gui_entry_transpose_words(GUI_ENTRY_REC *entry)
g_free(second);
}
-
+
gui_entry_redraw_from(entry, spos1);
gui_entry_fix_cursor(entry);
gui_entry_draw(entry);