replace guint by gsize for the glib2 version of irssi_ssl_read

like it's defined in GIOFuncs for glib2
moved src/fe-text/utf8.* to src/fe-common/core
changed get_utf8_char so it returns a status code and the unichar argument pointer
to the value that it returned before if there were no errors,
so you can check for a negative value an handle the error


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4091 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Valentin Batz 2005-11-23 18:30:22 +00:00 committed by vb
commit fb6bdac677
5 changed files with 19 additions and 16 deletions

View file

@ -212,8 +212,7 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
char_len++;
next_ptr = ptr;
chr = get_utf8_char(&next_ptr, char_len);
if (chr < 0)
if (get_utf8_char(&next_ptr, char_len, &chr) < 0)
char_len = 1;
else
char_len = utf8_width(chr);
@ -432,8 +431,11 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
end = text;
if (view->utf8) {
unichar chr = get_utf8_char(&end, 6);
char_width = utf8_width(chr);
unichar chr;
if (get_utf8_char(&end, 6, &chr)<0)
char_width = 1;
else
char_width = utf8_width(chr);
} else {
if (term_type == TERM_TYPE_BIG5 &&
is_big5(end[0], end[1]))