eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] eliot/dic dic_search.c


From: eliot-dev
Subject: [Eliot-dev] eliot/dic dic_search.c
Date: Sat, 14 Oct 2006 09:46:16 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>      06/10/14 09:46:15

Modified files:
        dic            : dic_search.c 

Log message:
        Do not perform any dictionary search on a zero-length intput. This was 
the case due to the Refresh methods in the wxWidgets interface, during a search.
        What's more, since wxWidgets is very slow to handle the list of results 
(benjamins in particular), a search done with the search windows open seems 
more responsive.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/dic/dic_search.c?cvsroot=eliot&r1=1.18&r2=1.19

Patches:
Index: dic_search.c
===================================================================
RCS file: /cvsroot/eliot/eliot/dic/dic_search.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- dic_search.c        8 Oct 2006 18:24:17 -0000       1.18
+++ dic_search.c        14 Oct 2006 09:46:15 -0000      1.19
@@ -265,6 +265,10 @@
 {
     int i, j, k;
     char tmp_buff[DIC_LETTERS][RES_7PL1_MAX][DIC_WORD_MAX];
+
+    if (wcslen(rack) == 0)
+        return;
+
     char *tmp_rack = malloc(wcslen(rack) + 1);
     sprintf(tmp_rack, "%ls", rack);
     // Do the actual work
@@ -346,6 +350,10 @@
 {
     int i, j;
     char tmp_buff[RES_RACC_MAX][DIC_WORD_MAX];
+
+    if (wcslen(word) == 0)
+        return;
+
     char *tmp_word = malloc(wcslen(word) + 1);
     sprintf(tmp_word, "%ls", word);
     // Do the actual work
@@ -409,6 +417,10 @@
 {
     int i, j;
     char tmp_buff[RES_BENJ_MAX][DIC_WORD_MAX];
+
+    if (wcslen(word) == 0)
+        return;
+
     char *tmp_word = malloc(wcslen(word) + 1);
     sprintf(tmp_word, "%ls", word);
     // Do the actual work
@@ -518,6 +530,10 @@
 {
     int i, j;
     char tmp_buff[RES_CROS_MAX][DIC_WORD_MAX];
+
+    if (wcslen(mask) == 0)
+        return;
+
     char *tmp_mask = malloc(wcslen(mask) + 1);
     sprintf(tmp_mask, "%ls", mask);
     // Do the actual work
@@ -682,6 +698,10 @@
 {
     int i, j;
     char tmp_buff[RES_REGE_MAX][DIC_WORD_MAX];
+
+    if (wcslen(re) == 0)
+        return;
+
     char *tmp_re = malloc(wcslen(re) + 1);
     sprintf(tmp_re, "%ls", re);
     // Do the actual work




reply via email to

[Prev in Thread] Current Thread [Next in Thread]