changeset 1209:47579e8c73d0

Aspell: is_alpha() isn't needed
author Mikael Berthe <mikael@lilotux.net>
date Sun, 29 Apr 2007 11:53:33 +0200
parents 0dbe51d1e62e
children 7c8672bbede5
files mcabber/src/screen.c
diffstat 1 files changed, 2 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sun Apr 29 11:19:56 2007 +0200
+++ b/mcabber/src/screen.c	Sun Apr 29 11:53:33 2007 +0200
@@ -62,7 +62,6 @@
 
 #ifdef HAVE_ASPELL_H
 static void spellcheck(char *, char *);
-static inline int is_alpha(const char *);
 #endif
 
 static GHashTable *winbufhash;
@@ -3283,7 +3282,7 @@
 
   while (*line) {
 
-    if (!is_alpha(line)) {
+    if (!iswalpha(get_char(line))) {
       line = next_char(line);
       continue;
     }
@@ -3308,7 +3307,7 @@
 
     start = line;
 
-    while (is_alpha(line))
+    while (iswalpha(get_char(line)))
       line = next_char(line);
 
     if (spell_checker &&
@@ -3316,19 +3315,6 @@
       memset(&checked[start - line_start], ASPELLBADCHAR, line - start);
   }
 }
-
-// Universal isalpha function
-static inline int is_alpha(const char *c)
-{
-  if (utf8_mode) {
-    if (iswalpha(get_char(c)))
-      return 1;
-  } else {
-    if (isalpha(*c))
-      return 1;
-  }
-  return 0;
-}
 #endif
 
 /* vim: set expandtab cindent cinoptions=>2\:2(0:  For Vim users... */