[dovecot-cvs] dovecot: Fixed to work with the new unichar API

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 11 04:37:54 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/d7302155b97f
changeset: 5684:d7302155b97f
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 11 04:37:50 2007 +0300
description:
Fixed to work with the new unichar API

diffstat:

1 file changed, 2 insertions(+), 3 deletions(-)
src/plugins/fts-squat/squat-trie.c |    5 ++---

diffs (20 lines):

diff -r 8101787cdd1c -r d7302155b97f src/plugins/fts-squat/squat-trie.c
--- a/src/plugins/fts-squat/squat-trie.c	Mon Jun 11 04:37:29 2007 +0300
+++ b/src/plugins/fts-squat/squat-trie.c	Mon Jun 11 04:37:50 2007 +0300
@@ -226,14 +226,13 @@ data_normalize(const void *data, size_t 
 
 			/* FIXME: can we do anything better than just
 			   truncate with >16bit values? */
-			uchr = uni_utf8_get_char_len(src+i, size-i);
-			if (uchr == (unichar_t)-1)
+			if (uni_utf8_get_char_n(src+i, size-i, &uchr) <= 0)
 				chr = 0;
 			else {
 				uchr -= 32 - 26;
 				chr = uchr < (uint16_t)-1 ? uchr : 0;
 			}
-			i += uni_utf8_skip[src[i] & 0xff] - 1;
+			i += uni_utf8_char_bytes(src[i]) - 1;
 		}
 		buffer_append(dest, &chr, sizeof(chr));
 	}


More information about the dovecot-cvs mailing list