|| ( __GNUC__ == (major) && __GNUC_MINOR__ >= (minor) ) ) )
#endif
-#ifdef wxUSE_NEW_REGEX
-
- #if !wxUSE_UNICODE
- # define wx_wchar char
- #else // Unicode
- #if (defined(__GNUC__) && !wxCHECK_GCC_VERSION(2, 96))
- # define wx_wchar __WCHAR_TYPE__
- #else // __WCHAR_TYPE__ and gcc < 2.96
- // standard case
- # define wx_wchar wchar_t
- #endif // __WCHAR_TYPE__
- #endif // ASCII/Unicode
-
-#else
-
- #define wx_wchar char
-
-#endif
-
+#if !wxUSE_UNICODE
+# define wx_wchar char
+#else // Unicode
+ #if (defined(__GNUC__) && !wxCHECK_GCC_VERSION(2, 96))
+ # define wx_wchar __WCHAR_TYPE__
+ #else // __WCHAR_TYPE__ and gcc < 2.96
+ // standard case
+ # define wx_wchar wchar_t
+ #endif // __WCHAR_TYPE__
+#endif // ASCII/Unicode
/* overrides for regguts.h definitions, if any */
#define FUNCPTR(name, args) (*name) args
/* internal character type and related */
typedef wx_wchar chr; /* the type itself */
-typedef unsigned uchr; /* unsigned type that will hold a chr */
-typedef int celt; /* type to hold chr, MCCE number, or
+typedef unsigned long uchr; /* unsigned type that will hold a chr */
+typedef long celt; /* type to hold chr, MCCE number, or
* NOCELT */
#define NOCELT (-1) /* celt value which is not valid chr or
#define CHR(c) ((unsigned char) (c)) /* turn char literal into chr
* literal */
#define DIGITVAL(c) ((c)-'0') /* turn chr digit into its value */
-#define CHRBITS 32 /* bits in a chr; must not use sizeof */
+
+/* RN - the "not use sizeof() thing is really annoying!" */
+#if wxUSE_UNICODE
+# define CHRBITS 32
+#else
+# define CHRBITS 8 /* bits in a chr; must not use sizeof */
+#endif
#define CHR_MIN 0x00000000 /* smallest and largest chr; the value */
-#define CHR_MAX 0xfffffffe /* CHR_MAX-CHR_MIN+1 should fit in uchr */
+/*
+ PUTTING PARENTHASES AROUND THIS, I.E. (1 << CHRBITS) WILL
+ CAUSE ALL CHARACTERS TO BE MATCHED!!!
+*/
+#define CHR_MAX 1 << CHRBITS /*0xfffffffe*/ /* CHR_MAX-CHR_MIN+1 should fit in uchr */
+
/* functions operating on chr */
#define iscalnum(x) wx_isalnum(x)