Fix Aspell support on some systems
authorMikael Berthe <mikael@lilotux.net>
Mon, 18 Jun 2007 21:35:30 +0200
changeset 1245 e6ddd19956eb
parent 1244 f7b9a00c512d
child 1246 0a1fe6362c33
Fix Aspell support on some systems iswalpha() doesn't seem to work well on some system. Fall back to isalpha() if the environment isn't UTF-8.
mcabber/src/screen.c
--- a/mcabber/src/screen.c	Mon Jun 18 21:12:35 2007 +0200
+++ b/mcabber/src/screen.c	Mon Jun 18 21:35:30 2007 +0200
@@ -3357,6 +3357,8 @@
   }
 }
 
+#define aspell_isalpha(c) (utf8_mode ? iswalpha(get_char(c)) : isalpha(*c))
+
 // Spell checking function
 static void spellcheck(char *line, char *checked)
 {
@@ -3369,7 +3371,7 @@
 
   while (*line) {
 
-    if (!iswalpha(get_char(line))) {
+    if (!aspell_isalpha(line)) {
       line = next_char(line);
       continue;
     }
@@ -3394,7 +3396,7 @@
 
     start = line;
 
-    while (iswalpha(get_char(line)))
+    while (aspell_isalpha(line))
       line = next_char(line);
 
     if (spell_checker &&