summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index f9f6ae0..3ab741a 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1717,7 +1717,7 @@ TclTrimRight(
pp = Tcl_UtfPrev(p, bytes);
do {
pp += pInc;
- pInc = TclUtfToUCS4(pp, &ch1);
+ pInc = Tcl_UtfToUniChar(pp, &ch1);
} while (pp + pInc < p);
/*
@@ -1725,7 +1725,7 @@ TclTrimRight(
*/
do {
- pInc = TclUtfToUCS4(q, &ch2);
+ pInc = Tcl_UtfToUniChar(q, &ch2);
if (ch1 == ch2) {
break;
@@ -1790,7 +1790,7 @@ TclTrimLeft(
*/
do {
- Tcl_Size pInc = TclUtfToUCS4(p, &ch1);
+ Tcl_Size pInc = Tcl_UtfToUniChar(p, &ch1);
const char *q = trim;
Tcl_Size bytesLeft = numTrim;
@@ -1799,7 +1799,7 @@ TclTrimLeft(
*/
do {
- Tcl_Size qInc = TclUtfToUCS4(q, &ch2);
+ Tcl_Size qInc = Tcl_UtfToUniChar(q, &ch2);
if (ch1 == ch2) {
break;
@@ -1866,7 +1866,7 @@ TclTrim(
if (numBytes > 0) {
int ch;
const char *first = bytes + trimLeft;
- bytes += TclUtfToUCS4(first, &ch);
+ bytes += Tcl_UtfToUniChar(first, &ch);
numBytes -= (bytes - first);
if (numBytes > 0) {
@@ -2221,7 +2221,7 @@ Tcl_StringCaseMatch(
ch2 = (int)
(nocase ? tolower(UCHAR(*pattern)) : UCHAR(*pattern));
} else {
- TclUtfToUCS4(pattern, &ch2);
+ Tcl_UtfToUniChar(pattern, &ch2);
if (nocase) {
ch2 = Tcl_UniCharToLower(ch2);
}
@@ -2237,7 +2237,7 @@ Tcl_StringCaseMatch(
if ((p != '[') && (p != '?') && (p != '\\')) {
if (nocase) {
while (*str) {
- charLen = TclUtfToUCS4(str, &ch1);
+ charLen = Tcl_UtfToUniChar(str, &ch1);
if (ch2==ch1 || ch2==Tcl_UniCharToLower(ch1)) {
break;
}
@@ -2251,7 +2251,7 @@ Tcl_StringCaseMatch(
*/
while (*str) {
- charLen = TclUtfToUCS4(str, &ch1);
+ charLen = Tcl_UtfToUniChar(str, &ch1);
if (ch2 == ch1) {
break;
}
@@ -2265,7 +2265,7 @@ Tcl_StringCaseMatch(
if (*str == '\0') {
return 0;
}
- str += TclUtfToUCS4(str, &ch1);
+ str += Tcl_UtfToUniChar(str, &ch1);
}
}
@@ -2276,7 +2276,7 @@ Tcl_StringCaseMatch(
if (p == '?') {
pattern++;
- str += TclUtfToUCS4(str, &ch1);
+ str += Tcl_UtfToUniChar(str, &ch1);
continue;
}
@@ -2295,7 +2295,7 @@ Tcl_StringCaseMatch(
(nocase ? tolower(UCHAR(*str)) : UCHAR(*str));
str++;
} else {
- str += TclUtfToUCS4(str, &ch1);
+ str += Tcl_UtfToUniChar(str, &ch1);
if (nocase) {
ch1 = Tcl_UniCharToLower(ch1);
}
@@ -2309,7 +2309,7 @@ Tcl_StringCaseMatch(
? tolower(UCHAR(*pattern)) : UCHAR(*pattern));
pattern++;
} else {
- pattern += TclUtfToUCS4(pattern, &startChar);
+ pattern += Tcl_UtfToUniChar(pattern, &startChar);
if (nocase) {
startChar = Tcl_UniCharToLower(startChar);
}
@@ -2324,7 +2324,7 @@ Tcl_StringCaseMatch(
? tolower(UCHAR(*pattern)) : UCHAR(*pattern));
pattern++;
} else {
- pattern += TclUtfToUCS4(pattern, &endChar);
+ pattern += Tcl_UtfToUniChar(pattern, &endChar);
if (nocase) {
endChar = Tcl_UniCharToLower(endChar);
}
@@ -2372,8 +2372,8 @@ Tcl_StringCaseMatch(
* each string match.
*/
- str += TclUtfToUCS4(str, &ch1);
- pattern += TclUtfToUCS4(pattern, &ch2);
+ str += Tcl_UtfToUniChar(str, &ch1);
+ pattern += Tcl_UtfToUniChar(pattern, &ch2);
if (nocase) {
if (Tcl_UniCharToLower(ch1) != Tcl_UniCharToLower(ch2)) {
return 0;
@@ -2601,8 +2601,8 @@ TclStringMatchObj(
if (TclHasInternalRep(strObj, &tclUniCharStringType) || (strObj->typePtr == NULL)) {
Tcl_UniChar *udata, *uptn;
- udata = TclGetUnicodeFromObj_(strObj, &length);
- uptn = TclGetUnicodeFromObj_(ptnObj, &plen);
+ udata = TclGetUnicodeFromObj(strObj, &length);
+ uptn = TclGetUnicodeFromObj(ptnObj, &plen);
match = TclUniCharMatch(udata, length, uptn, plen, flags);
} else if (TclIsPureByteArray(strObj) && TclIsPureByteArray(ptnObj)
&& !flags) {