]> git.saurik.com Git - wxWidgets.git/blobdiff - src/regex/regcomp.c
A little clarification
[wxWidgets.git] / src / regex / regcomp.c
index a84b939944290721a8ce53f92a2037923d0d3221..109db3f0aa08d08e25f2facab4ae338662295ff4 100644 (file)
@@ -178,16 +178,17 @@ static struct cvec *getcvec(struct vars *, int, int, int);
 static void freecvec(struct cvec *);
 
 /* === regc_locale.c === */
-static int     wx_isdigit(wx_wchar c);
-static int     wx_isalpha(wx_wchar c);
-static int     wx_isalnum(wx_wchar c);
-static int     wx_isupper(wx_wchar c);
-static int     wx_islower(wx_wchar c);
-static int     wx_isgraph(wx_wchar c);
-static int     wx_ispunct(wx_wchar c);
-static int     wx_isspace(wx_wchar c);
-static wx_wchar wx_toupper(wx_wchar c);
-static wx_wchar wx_tolower(wx_wchar c);
+extern int     wx_isdigit(wx_wchar c);
+extern int     wx_isalpha(wx_wchar c);
+extern int     wx_isalnum(wx_wchar c);
+extern int     wx_isupper(wx_wchar c);
+extern int     wx_islower(wx_wchar c);
+extern int     wx_isgraph(wx_wchar c);
+extern int     wx_ispunct(wx_wchar c);
+extern int     wx_isspace(wx_wchar c);
+extern wx_wchar wx_toupper(wx_wchar c);
+extern wx_wchar wx_tolower(wx_wchar c);
+extern int  wx_strlen(const wx_wchar* szString);
 static int     nmcces(struct vars *);
 static int     nleaders(struct vars *);
 static struct cvec *allmcces(struct vars *, struct cvec *);
@@ -296,18 +297,7 @@ regcomp(regex_t *re,
                    const chr *string,
                   int flags)
 {
-    
-    size_t nLen = 0;
-    chr* s2 = (chr*) string;
-
-    if (string && *string)
-    {
-        while(*++s2);
-    }
-
-    nLen = ((s2 - string) / sizeof(chr));
-
-       return wx_regcomp(re, string, nLen, flags);
+       return wx_regcomp(re, string, wx_strlen(string), flags);
 }
 int
 wx_regcomp(regex_t *re,