summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 17f769d..c60e99e 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -100,7 +100,7 @@ static int UtfCount(int ch);
static inline int
UtfCount(
- int ch) /* The Tcl_UniChar whose size is returned. */
+ int ch) /* The Unicode character whose size is returned. */
{
if ((unsigned)(ch - 1) < (UNICODE_SELF - 1)) {
return 1;
@@ -556,10 +556,10 @@ Tcl_UtfFindFirst(
#if TCL_UTF_MAX == 4
if (!len) {
len += TclUtfToUniChar(src, &find);
- fullchar = (((fullchar & 0x3ff) << 10) | (ch & 0x3ff)) + 0x10000;
+ fullchar = (((fullchar & 0x3ff) << 10) | (find & 0x3ff)) + 0x10000;
}
#endif
- if (find == fullchar) {
+ if (fullchar == ch) {
return src;
}
if (*src == '\0') {
@@ -579,7 +579,7 @@ Tcl_UtfFindFirst(
* part of the UTF-8 string. Equivalent to Plan 9 utfrrune().
*
* Results:
- * As above. If the Tcl_UniChar does not exist in the given string, the
+ * As above. If the Unicode character does not exist in the given string, the
* return value is NULL.
*
* Side effects:
@@ -604,10 +604,10 @@ Tcl_UtfFindLast(
#if TCL_UTF_MAX == 4
if (!len) {
len += TclUtfToUniChar(src, &find);
- fullchar = (((fullchar & 0x3ff) << 10) | (ch & 0x3ff)) + 0x10000;
+ fullchar = (((fullchar & 0x3ff) << 10) | (find & 0x3ff)) + 0x10000;
}
#endif
- if (find == fullchar) {
+ if (fullchar == ch) {
last = src;
}
if (*src == '\0') {
@@ -707,7 +707,7 @@ Tcl_UtfPrev(
*
* Tcl_UniCharAtIndex --
*
- * Returns the Unicode character represented at the specified character
+ * Returns the Tcl_UniChar represented at the specified character
* (not byte) position in the UTF-8 string.
*
* Results: