diff options
author | Valentin Batz <senneth@irssi.org> | 2005-11-23 18:30:22 +0000 |
---|---|---|
committer | vb <vb@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2005-11-23 18:30:22 +0000 |
commit | fb6bdac677d4173e994f7a5fdaa92ac22f6671e3 (patch) | |
tree | 08e8544b33d98c417a8a6eebf2e88b63ce7a0e2e /src/fe-text/term-terminfo.c | |
parent | 870253e12c684e1998a330692665b7f9e747cc45 (diff) | |
download | irssi-fb6bdac677d4173e994f7a5fdaa92ac22f6671e3.zip |
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
Diffstat (limited to 'src/fe-text/term-terminfo.c')
-rw-r--r-- | src/fe-text/term-terminfo.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 21591889..5552d9cb 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -556,13 +556,12 @@ static int input_utf8(const unsigned char *buffer, int size, unichar *result) { const unsigned char *end = buffer; - *result = get_utf8_char(&end, size); - switch (*result) { - case (unichar) -2: + switch (get_utf8_char(&end, size, result)) { + case -2: /* not UTF8 - fallback to 8bit ascii */ *result = *buffer; return 1; - case (unichar) -1: + case -1: /* need more data */ return -1; default: |