From 2f3f436922209bf12649e66b08069ec1c8b01888 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Fri, 23 Jan 2004 18:42:41 +0000 Subject: [PATCH] Check for WCHAR_T (thanks to ABX for pointing this out) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/regex/regcustom.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/regex/regcustom.h b/src/regex/regcustom.h index 4f2dc97cbf..8f51782d53 100644 --- a/src/regex/regcustom.h +++ b/src/regex/regcustom.h @@ -74,10 +74,15 @@ typedef long celt; /* type to hold chr, MCCE number, or * literal */ #define DIGITVAL(c) ((c)-'0') /* turn chr digit into its value */ -#define CHRBITS (SIZEOF_WCHAR_T << 3) /* bits in a chr; must not use sizeof */ -#define CHR_MAX ((1 << CHRBITS) - 1) -#define CHR_MIN 0x00000000 /* smallest and largest chr; the value */ - +#if wxUSE_WCHAR_T +# define CHRBITS (SIZEOF_WCHAR_T << 3) /* bits in a chr; must not use sizeof */ +# define CHR_MAX ((1 << CHRBITS) - 1) +# define CHR_MIN 0x00000000 /* smallest and largest chr; the value */ +#else /*ANSI*/ +# define CHRBITS 8 +# define CHR_MAX 0xFF +# define CHR_MIN 0x00 +#endif /*wxUSE_WCHAR_T*/ /* functions operating on chr */ #define iscalnum(x) wx_isalnum(x) -- 2.45.2