From b8f896a10a2cf252d0227eb855257d391ffa08d8 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Mon, 19 Jan 2004 22:11:48 +0000 Subject: [PATCH] - Got rid of warnings - Fixed locale problems (?) - Fixed newlines of rege_dfa.c git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/regex/regc_locale.c | 25 ++++++++++--------------- src/regex/regcomp.c | 1 - src/regex/regcustom.h | 2 ++ src/regex/rege_dfa.c | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/regex/regc_locale.c b/src/regex/regc_locale.c index 4d92e46b64..664611c6b5 100644 --- a/src/regex/regc_locale.c +++ b/src/regex/regc_locale.c @@ -56,28 +56,23 @@ int char_and_wchar_strncmp (const char* cp, const wx_wchar* wp, size_t nNum) return nNum; } -int wx_isdigit(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIsdigit((unsigned char) c));} -int wx_isalpha(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIsalpha((unsigned char) c));} -int wx_isalnum(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIsalnum((unsigned char) c));} -int wx_isupper(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIsupper((unsigned char) c));} -int wx_islower(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIslower((unsigned char) c));} -int wx_isgraph(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIsgraph((unsigned char) c));} -int wx_ispunct(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIspunct((unsigned char) c));} -int wx_isspace(wx_wchar c) {return (c >= 0 && c <= UCHAR_MAX && wxIsspace((unsigned char) c));} +int wx_isdigit(wx_wchar c) {return wxIsdigit(c);} +int wx_isalpha(wx_wchar c) {return wxIsalpha(c);} +int wx_isalnum(wx_wchar c) {return wxIsalnum(c);} +int wx_isupper(wx_wchar c) {return wxIsupper(c);} +int wx_islower(wx_wchar c) {return wxIslower(c);} +int wx_isgraph(wx_wchar c) {return wxIsgraph(c);} +int wx_ispunct(wx_wchar c) {return wxIspunct(c);} +int wx_isspace(wx_wchar c) {return wxIsspace(c);} wx_wchar wx_toupper(wx_wchar c) { - if (c >= 0 && c <= UCHAR_MAX) - return wxToupper((unsigned char) c); - return c; - + return wxToupper(c); } wx_wchar wx_tolower(wx_wchar c) { - if (c >= 0 && c <= UCHAR_MAX) - return wxTolower((unsigned char) c); - return c; + return wxTolower(c); } int wx_strlen(const wx_wchar* szString) diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index 109db3f0aa..69f9517447 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -188,7 +188,6 @@ 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 *); diff --git a/src/regex/regcustom.h b/src/regex/regcustom.h index c4ff85749e..4f2dc97cbf 100644 --- a/src/regex/regcustom.h +++ b/src/regex/regcustom.h @@ -85,6 +85,8 @@ typedef long celt; /* type to hold chr, MCCE number, or #define iscdigit(x) wx_isdigit(x) #define iscspace(x) wx_isspace(x) +extern int wx_strlen(const wx_wchar* szString); + /* and pick up the standard header */ #include "regex.h" diff --git a/src/regex/rege_dfa.c b/src/regex/rege_dfa.c index 5347b90d73..7236282293 100644 --- a/src/regex/rege_dfa.c +++ b/src/regex/rege_dfa.c @@ -696,4 +696,4 @@ pickss(struct vars * v, /* used only for debug flags */ assert(NOTREACHED); ERR(REG_ASSERT); return d->ssets; -} +} \ No newline at end of file -- 2.45.2