[uim-commit] r2599 - trunk/uim
ekato at freedesktop.org
ekato at freedesktop.org
Thu Dec 15 21:30:31 PST 2005
Author: ekato
Date: 2005-12-15 21:30:28 -0800 (Thu, 15 Dec 2005)
New Revision: 2599
Modified:
trunk/uim/skk.c
Log:
* uim/skk.c (look_get_comp) : Cleanup.
Modified: trunk/uim/skk.c
===================================================================
--- trunk/uim/skk.c 2005-12-16 05:21:25 UTC (rev 2598)
+++ trunk/uim/skk.c 2005-12-16 05:30:28 UTC (rev 2599)
@@ -3394,7 +3394,7 @@
{
char buf[512], *p;
FILE *fp;
- int i, nr_pre, top_line = 1;
+ int i, nr_pre, c = 0;
int *matched;
if (!skk_isalpha(str[0]))
@@ -3419,9 +3419,12 @@
*p = '\0';
/* don't use the word itself */
- if (top_line == 1 && !strcmp(buf, str)) {
- top_line = 0;
+ if ((c == 0 || c == 1)) {
+ c++;
+ if (!strcmp(buf, str)) {
+ c = -1;
continue;
+ }
}
/* skip words already in the cache */
More information about the uim-commit
mailing list