summaryrefslogtreecommitdiffstats
path: root/generic/regcustom.h
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-07-16 22:06:03 (GMT)
committerhobbs <hobbs>2003-07-16 22:06:03 (GMT)
commit81bbc0ba267fefbb15f6d0f7003126b1bf401ffe (patch)
treeebcf5984159e62b71d1bff0188d3b69b72921953 /generic/regcustom.h
parenta192f58aa339e34d092729d90602e2513f1634ac (diff)
downloadtcl-81bbc0ba267fefbb15f6d0f7003126b1bf401ffe.zip
tcl-81bbc0ba267fefbb15f6d0f7003126b1bf401ffe.tar.gz
tcl-81bbc0ba267fefbb15f6d0f7003126b1bf401ffe.tar.bz2
* generic/tcl.h: add recognition of -DTCL_UTF_MAX=6 on the
* generic/regcustom.h: make line to support UCS-4 mode. No config arg at this time, as it is not the recommended build mode.
Diffstat (limited to 'generic/regcustom.h')
-rw-r--r--generic/regcustom.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/regcustom.h b/generic/regcustom.h
index 9f505de..e258acd 100644
--- a/generic/regcustom.h
+++ b/generic/regcustom.h
@@ -91,9 +91,15 @@ typedef int celt; /* type to hold chr, MCCE number, or NOCELT */
#define NOCELT (-1) /* celt value which is not valid chr or MCCE */
#define CHR(c) (UCHAR(c)) /* turn char literal into chr literal */
#define DIGITVAL(c) ((c)-'0') /* turn chr digit into its value */
+#if TCL_UTF_MAX > 3
+#define CHRBITS 32 /* bits in a chr; must not use sizeof */
+#define CHR_MIN 0x00000000 /* smallest and largest chr; the value */
+#define CHR_MAX 0xffffffff /* CHR_MAX-CHR_MIN+1 should fit in uchr */
+#else
#define CHRBITS 16 /* bits in a chr; must not use sizeof */
#define CHR_MIN 0x0000 /* smallest and largest chr; the value */
#define CHR_MAX 0xffff /* CHR_MAX-CHR_MIN+1 should fit in uchr */
+#endif
/* functions operating on chr */
#define iscalnum(x) Tcl_UniCharIsAlnum(x)