Mercurial > hg
changeset 1245:e6ddd19956eb
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.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 18 Jun 2007 21:35:30 +0200 |
parents | f7b9a00c512d |
children | 0a1fe6362c33 |
files | mcabber/src/screen.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 &&