aboutsummaryrefslogtreecommitdiff
path: root/regcustom.h
diff options
context:
space:
mode:
Diffstat (limited to 'regcustom.h')
-rw-r--r--regcustom.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/regcustom.h b/regcustom.h
index c341c23..1b25fed 100644
--- a/regcustom.h
+++ b/regcustom.h
@@ -99,9 +99,9 @@
#ifndef REGEX_STANDALONE
typedef Tcl_UniChar chr; /* The type itself. */
#endif
-typedef int pchr; /* What it promotes to. */
+typedef uint32_t pchr; /* What it promotes to (holds 8-bit or Unicode char). */
typedef unsigned uchr; /* Unsigned type that will hold a chr. */
-typedef int celt; /* Type to hold chr, or NOCELT */
+typedef int32_t celt; /* Type to hold chr, or NOCELT */
#define NOCELT (-1) /* Celt value which is not valid chr */
#define CHR(c) (UCHAR(c)) /* Turn char literal into chr literal */
#define DIGITVAL(c) ((c)-'0') /* Turn chr digit into its value */
@@ -109,7 +109,7 @@ typedef int celt; /* Type to hold chr, or NOCELT */
#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 */
-#elif defined(REGEX_STANDALONE) && ! defined(REGEX_WCHAR)
+#elif defined(REGEX_STANDALONE) && ! defined(REGEX_UTF8)
# define CHRBITS 8
# define CHR_MIN 0x00
# define CHR_MAX 0xff
@@ -133,9 +133,9 @@ typedef int celt; /* Type to hold chr, or NOCELT */
*/
#ifdef REGEX_STANDALONE
-# ifdef REGEX_WCHAR
-# define compile re_wcomp
-# define exec re_wexec
+# ifdef REGEX_UTF8
+# define compile re_ucomp
+# define exec re_uexec
# define __REG_NOCHAR
# else
# define compile re_comp