diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-11-29 12:28:21 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-11-29 12:28:21 (GMT) |
| commit | 4190501ec7f6c70650e90c3d9f885a938d3e7795 (patch) | |
| tree | 8ecd150a0d93ece0fc3ebc0609718c14f041de7f /generic/tclUtf.c | |
| parent | c032f5043e88e8f54ac32f526413a3b62c9a20f4 (diff) | |
| parent | e87d0bcdf463e1858295c83daaee867dd695dba0 (diff) | |
| download | tcl-4190501ec7f6c70650e90c3d9f885a938d3e7795.zip tcl-4190501ec7f6c70650e90c3d9f885a938d3e7795.tar.gz tcl-4190501ec7f6c70650e90c3d9f885a938d3e7795.tar.bz2 | |
merge core-8-6-branch
Diffstat (limited to 'generic/tclUtf.c')
| -rw-r--r-- | generic/tclUtf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 1a8367b..a72394d 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -94,7 +94,7 @@ static const unsigned char totalBytes[256] = { int TclUtfCount( - 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; @@ -550,10 +550,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') { @@ -573,7 +573,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: @@ -598,10 +598,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') { @@ -701,7 +701,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: |
