Dekel patch to speed up spellchecker

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@693 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-04-26 10:52:40 +00:00
parent 9e5bd1d609
commit e8cc17cba7
2 changed files with 20 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2000-04-25 Dekel Tsur <dekel@math.tau.ac.il>
* src/spellchecker.C (RunSpellChecker): Speedup spellchecking by
a factor of 50!
2000-04-26 Juergen Vigna <jug@sad.it> 2000-04-26 Juergen Vigna <jug@sad.it>
* src/insets/figinset.C: fixes to Lars sstream changes! * src/insets/figinset.C: fixes to Lars sstream changes!

View File

@ -676,28 +676,29 @@ bool RunSpellChecker(BufferView * bv)
if(newvalue!= oldval) { if(newvalue!= oldval) {
oldval = newvalue; oldval = newvalue;
fl_set_slider_value(fd_form_spell_check->slider, oldval); fl_set_slider_value(fd_form_spell_check->slider, oldval);
}
if (word_count%1000 == 0) {
obj = fl_check_forms();
if (obj == fd_form_spell_check->stop) {
delete[] word;
ispell_terminate();
return true;
}
if (obj == fd_form_spell_check->done) {
delete[] word;
ispell_terminate();
return false;
}
} }
result = ispell_check_word(word); result = ispell_check_word(word);
if (isp_pid == -1) { if (isp_pid == -1) {
delete result;
delete[] word; delete[] word;
break; break;
} }
obj = fl_check_forms();
if (obj == fd_form_spell_check->stop) {
delete result;
delete[] word;
ispell_terminate();
return true;
}
if (obj == fd_form_spell_check->done) {
delete result;
delete[] word;
ispell_terminate();
return false;
}
switch (result->flag) { switch (result->flag) {
case ISP_UNKNOWN: case ISP_UNKNOWN:
case ISP_MISSED: case ISP_MISSED: