summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 8d2e68a..2ff644e 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4689,6 +4689,14 @@ MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[];
(numChars) = _count; \
} while (0);
+#define TclUtfPrev(src, start) \
+ (((src) < (start) + 2) ? (start) : \
+ ((unsigned char) *((src) - 1)) < 0x80 ? (src) - 1 : \
+ Tcl_UtfPrev(src, start))
+
+#define TclUtfNext(src) \
+ ((((unsigned char) *(src)) < 0x80) ? (src) + 1 : Tcl_UtfNext(src))
+
/*
*----------------------------------------------------------------
* Macro that encapsulates the logic that determines when it is safe to