summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
48c15d3)
Also some other spruce-ups.
(sorry, don't know how to be more specific than this!)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24845
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
/* internal character type and related */
typedef wx_wchar chr; /* the type itself */
/* internal character type and related */
typedef wx_wchar chr; /* the type itself */
-typedef wx_wchar uchr; /* unsigned type that will hold a chr */
-typedef wx_wchar 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
* 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 CHR(c) ((unsigned char) (c)) /* turn char literal into chr
* literal */
#define DIGITVAL(c) ((c)-'0') /* turn chr digit into its value */
-#define CHRBITS 16/*32*/ /* bits in a chr; must not use sizeof */
+
+/* RN - the "not use sizeof() thing is really asanine!" */
+#ifdef wxUSE_UNICODE
+# define CHRBITS 8
+#else
+# define CHRBITS 32 /* bits in a chr; must not use sizeof */
+#endif
#define CHR_MIN 0x00000000 /* smallest and largest chr; the value */
#define CHR_MIN 0x00000000 /* smallest and largest chr; the value */
-#define CHR_MAX 1 << CHRBITS /*0xfffffffe*/ /* CHR_MAX-CHR_MIN+1 should fit in uchr */
+#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)
/* functions operating on chr */
#define iscalnum(x) wx_isalnum(x)