From c6d9c4cee08c88cac3ba885b637147fe8808c62a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 5 May 2020 15:56:14 +0000 Subject: Remove PROTO_FLAGS support from the Makefile, since it isn't used anywhere any more. --- unix/Makefile.in | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index df585f5..2f1bb70 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -114,11 +114,6 @@ LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ LDFLAGS = @LDFLAGS_DEFAULT@ @LDFLAGS@ -# To disable ANSI-C procedure prototypes reverse the comment characters on the -# following lines: -PROTO_FLAGS = -#PROTO_FLAGS = -DNO_PROTOTYPE - # If you use the setenv, putenv, or unsetenv procedures to modify environment # variables in your application and you'd like those modifications to appear # in the "env" Tcl variable, switch the comments on the two lines below so @@ -278,7 +273,7 @@ VALGRINDARGS = --tool=memcheck --num-callers=24 \ STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${BUILD_DIR}" -I${UNIX_DIR} -I${GENERIC_DIR} -I${TOMMATH_DIR} \ -${AC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS} ${EXTRA_CFLAGS} @EXTRA_CC_SWITCHES@ +${AC_FLAGS} ${ENV_FLAGS} ${EXTRA_CFLAGS} @EXTRA_CC_SWITCHES@ CC_SWITCHES = $(STUB_CC_SWITCHES) ${NO_DEPRECATED_FLAGS} -DMP_FIXED_CUTOFFS -DMP_NO_STDINT @@ -287,7 +282,7 @@ APP_CC_SWITCHES = $(CC_SWITCHES) @EXTRA_APP_CC_SWITCHES@ LIBS = @TCL_LIBS@ DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \ -${AC_FLAGS} ${PROTO_FLAGS} ${EXTRA_CFLAGS} @EXTRA_CC_SWITCHES@ +${AC_FLAGS} ${EXTRA_CFLAGS} @EXTRA_CC_SWITCHES@ TCLSH_OBJS = tclAppInit.o -- cgit v0.12 From 96f7e93f0b671b1d35f78a5e3058f9a83e2caedc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 5 May 2020 16:00:06 +0000 Subject: More usage of TclUtfToUCS4(), so we can use the whole Unicode range better in TCL_UTF_MAX>3 builds. --- generic/tclCmdIL.c | 10 +++++----- generic/tclInt.h | 1 + generic/tclUtf.c | 17 ++++++++--------- generic/tclUtil.c | 44 ++++++++++++++++++++++---------------------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 7e685bd..3ec1c09 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -4370,7 +4370,7 @@ static int DictionaryCompare( const char *left, const char *right) /* The strings to compare. */ { - Tcl_UniChar uniLeft = 0, uniRight = 0, uniLeftLower, uniRightLower; + int uniLeft = 0, uniRight = 0, uniLeftLower, uniRightLower; int diff, zeros; int secondaryDiff = 0; @@ -4439,8 +4439,8 @@ DictionaryCompare( */ if ((*left != '\0') && (*right != '\0')) { - left += TclUtfToUniChar(left, &uniLeft); - right += TclUtfToUniChar(right, &uniRight); + left += TclUtfToUCS4(left, &uniLeft); + right += TclUtfToUCS4(right, &uniRight); /* * Convert both chars to lower for the comparison, because @@ -4449,8 +4449,8 @@ DictionaryCompare( * other interesting punctuations occur). */ - uniLeftLower = Tcl_UniCharToLower(uniLeft); - uniRightLower = Tcl_UniCharToLower(uniRight); + uniLeftLower = TclUCS4ToLower(uniLeft); + uniRightLower = TclUCS4ToLower(uniRight); } else { diff = UCHAR(*left) - UCHAR(*right); break; diff --git a/generic/tclInt.h b/generic/tclInt.h index 8983659..7fc06c8 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3185,6 +3185,7 @@ MODULE_SCOPE int TclTrimRight(const char *bytes, int numBytes, MODULE_SCOPE int TclUtfCasecmp(const char *cs, const char *ct); MODULE_SCOPE int TclUtfToUCS4(const char *, int *); MODULE_SCOPE int TclUCS4ToUtf(int, char *); +MODULE_SCOPE int TclUCS4ToLower(int ch); #if TCL_UTF_MAX == 4 MODULE_SCOPE int TclGetUCS4(Tcl_Obj *, int); #else diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 5e9b7a1..9792071 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -88,7 +88,6 @@ static const unsigned char totalBytes[256] = { static int UtfCount(int ch); static int Invalid(unsigned char *src); static int UCS4ToUpper(int ch); -static int UCS4ToLower(int ch); static int UCS4ToTitle(int ch); /* @@ -1078,7 +1077,7 @@ Tcl_UtfToLower( src = dst = str; while (*src) { len = TclUtfToUCS4(src, &ch); - lowChar = UCS4ToLower(ch); + lowChar = TclUCS4ToLower(ch); /* * To keep badly formed Utf strings from getting inflated by the @@ -1149,7 +1148,7 @@ Tcl_UtfToTitle( lowChar = ch; /* Special exception for Georgian Asomtavruli chars, no titlecase. */ if ((unsigned)(lowChar - 0x1C90) >= 0x30) { - lowChar = UCS4ToLower(lowChar); + lowChar = TclUCS4ToLower(lowChar); } if (len < UtfCount(lowChar) || ((lowChar & ~0x7FF) == 0xD800)) { @@ -1254,11 +1253,11 @@ Tcl_UtfNcmp( if (ch1 != ch2) { #if TCL_UTF_MAX == 4 /* Surrogates always report higher than non-surrogates */ - if (((ch1 & 0xFC00) == 0xD800)) { - if ((ch2 & 0xFC00) != 0xD800) { + if (((ch1 & ~0x3FF) == 0xD800)) { + if ((ch2 & ~0x3FF) != 0xD800) { return ch1; } - } else if ((ch2 & 0xFC00) == 0xD800) { + } else if ((ch2 & ~0x3FF) == 0xD800) { return -ch2; } #endif @@ -1427,8 +1426,8 @@ Tcl_UniCharToUpper( *---------------------------------------------------------------------- */ -static int -UCS4ToLower( +int +TclUCS4ToLower( int ch) /* Unicode character to convert. */ { if (!UNICODE_OUT_OF_RANGE(ch)) { @@ -1447,7 +1446,7 @@ Tcl_UniChar Tcl_UniCharToLower( int ch) /* Unicode character to convert. */ { - return (Tcl_UniChar) UCS4ToLower(ch); + return (Tcl_UniChar) TclUCS4ToLower(ch); } /* diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 13b0d55..b4a07bb 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2155,7 +2155,7 @@ Tcl_StringCaseMatch( int nocase) /* 0 for case sensitive, 1 for insensitive */ { int p, charLen; - Tcl_UniChar ch1 = 0, ch2 = 0; + int ch1 = 0, ch2 = 0; while (1) { p = *pattern; @@ -2196,12 +2196,12 @@ Tcl_StringCaseMatch( */ if (UCHAR(*pattern) < 0x80) { - ch2 = (Tcl_UniChar) + ch2 = (int) (nocase ? tolower(UCHAR(*pattern)) : UCHAR(*pattern)); } else { - Tcl_UtfToUniChar(pattern, &ch2); + TclUtfToUCS4(pattern, &ch2); if (nocase) { - ch2 = Tcl_UniCharToLower(ch2); + ch2 = TclUCS4ToLower(ch2); } } @@ -2215,8 +2215,8 @@ Tcl_StringCaseMatch( if ((p != '[') && (p != '?') && (p != '\\')) { if (nocase) { while (*str) { - charLen = TclUtfToUniChar(str, &ch1); - if (ch2==ch1 || ch2==Tcl_UniCharToLower(ch1)) { + charLen = TclUtfToUCS4(str, &ch1); + if (ch2==ch1 || ch2==TclUCS4ToLower(ch1)) { break; } str += charLen; @@ -2229,7 +2229,7 @@ Tcl_StringCaseMatch( */ while (*str) { - charLen = TclUtfToUniChar(str, &ch1); + charLen = TclUtfToUCS4(str, &ch1); if (ch2 == ch1) { break; } @@ -2243,7 +2243,7 @@ Tcl_StringCaseMatch( if (*str == '\0') { return 0; } - str += TclUtfToUniChar(str, &ch1); + str += TclUtfToUCS4(str, &ch1); } } @@ -2254,7 +2254,7 @@ Tcl_StringCaseMatch( if (p == '?') { pattern++; - str += TclUtfToUniChar(str, &ch1); + str += TclUtfToUCS4(str, &ch1); continue; } @@ -2265,17 +2265,17 @@ Tcl_StringCaseMatch( */ if (p == '[') { - Tcl_UniChar startChar = 0, endChar = 0; + int startChar = 0, endChar = 0; pattern++; if (UCHAR(*str) < 0x80) { - ch1 = (Tcl_UniChar) + ch1 = (int) (nocase ? tolower(UCHAR(*str)) : UCHAR(*str)); str++; } else { - str += Tcl_UtfToUniChar(str, &ch1); + str += TclUtfToUCS4(str, &ch1); if (nocase) { - ch1 = Tcl_UniCharToLower(ch1); + ch1 = TclUCS4ToLower(ch1); } } while (1) { @@ -2283,13 +2283,13 @@ Tcl_StringCaseMatch( return 0; } if (UCHAR(*pattern) < 0x80) { - startChar = (Tcl_UniChar) (nocase + startChar = (int) (nocase ? tolower(UCHAR(*pattern)) : UCHAR(*pattern)); pattern++; } else { - pattern += Tcl_UtfToUniChar(pattern, &startChar); + pattern += TclUtfToUCS4(pattern, &startChar); if (nocase) { - startChar = Tcl_UniCharToLower(startChar); + startChar = TclUCS4ToLower(startChar); } } if (*pattern == '-') { @@ -2298,13 +2298,13 @@ Tcl_StringCaseMatch( return 0; } if (UCHAR(*pattern) < 0x80) { - endChar = (Tcl_UniChar) (nocase + endChar = (int) (nocase ? tolower(UCHAR(*pattern)) : UCHAR(*pattern)); pattern++; } else { - pattern += Tcl_UtfToUniChar(pattern, &endChar); + pattern += TclUtfToUCS4(pattern, &endChar); if (nocase) { - endChar = Tcl_UniCharToLower(endChar); + endChar = TclUCS4ToLower(endChar); } } if (((startChar <= ch1) && (ch1 <= endChar)) @@ -2350,10 +2350,10 @@ Tcl_StringCaseMatch( * each string match. */ - str += TclUtfToUniChar(str, &ch1); - pattern += TclUtfToUniChar(pattern, &ch2); + str += TclUtfToUCS4(str, &ch1); + pattern += TclUtfToUCS4(pattern, &ch2); if (nocase) { - if (Tcl_UniCharToLower(ch1) != Tcl_UniCharToLower(ch2)) { + if (TclUCS4ToLower(ch1) != TclUCS4ToLower(ch2)) { return 0; } } else if (ch1 != ch2) { -- cgit v0.12 From 22751e62a6fe567905f34d7e485e73142d142a1e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 6 May 2020 07:58:25 +0000 Subject: 3 testcases don't need pairsTo4bytes, fullutf is enough, since the dubble-surrogate-backslash syntac has no relation to the internal byte format. --- tests/utf.test | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/utf.test b/tests/utf.test index c281d11..0b2d368 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -13,8 +13,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} { namespace import -force ::tcltest::* } -namespace path ::tcl::mathop - testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}] testConstraint fullutf [expr {[format %c 0x010000] ne "\uFFFD"}] testConstraint utf16 [expr {[string length [format %c 0x10000]] == 2}] @@ -1226,7 +1224,7 @@ test utf-11.5 {Tcl_UtfToUpper Georgian (new in Unicode 11)} { test utf-11.6 {Tcl_UtfToUpper beyond U+FFFF} {Uesc fullutf} { string toupper \U10428 } \U10400 -test utf-11.7 {Tcl_UtfToUpper beyond U+FFFF} {pairsTo4bytes} { +test utf-11.7 {Tcl_UtfToUpper beyond U+FFFF} fullutf { string toupper \uD801\uDC28 } \uD801\uDC00 test utf-11.8 {Tcl_UtfToUpper low/high surrogate)} { @@ -1254,7 +1252,7 @@ test utf-12.6 {Tcl_UtfToLower low/high surrogate)} { test utf-12.7 {Tcl_UtfToLower beyond U+FFFF} {Uesc fullutf} { string tolower \U10400 } \U10428 -test utf-12.8 {Tcl_UtfToLower beyond U+FFFF} {pairsTo4bytes} { +test utf-12.8 {Tcl_UtfToLower beyond U+FFFF} fullutf { string tolower \uD801\uDC00 } \uD801\uDC28 @@ -1282,7 +1280,7 @@ test utf-13.7 {Tcl_UtfToTitle low/high surrogate)} { test utf-13.8 {Tcl_UtfToTitle beyond U+FFFF} {Uesc fullutf} { string totitle \U10428\U10400 } \U10400\U10428 -test utf-13.9 {Tcl_UtfToTitle beyond U+FFFF} pairsTo4bytes { +test utf-13.9 {Tcl_UtfToTitle beyond U+FFFF} fullutf { string totitle \uD801\uDC28\uD801\uDC00 } \uD801\uDC00\uD801\uDC28 -- cgit v0.12 From 6c9fa195b08a24ca759c7d0e2129a33137bbbccd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 6 May 2020 13:03:29 +0000 Subject: Change Invalid() parameter type to "const char *". Also call Invalid() first in Tcl_UtfNext(), so if src[1] is invalid src[2] doesn't need to be checked any more. Note: This order change, calling Invalid() first was wrong, and is corrected in later commits. Thanks, Don, for noticing this! --- generic/tclUtf.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 528d5de..60e475a 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -81,7 +81,7 @@ static CONST unsigned char totalBytes[256] = { */ static int UtfCount(int ch); -static int Invalid(unsigned char *src); +static int Invalid(const char *src); /* *--------------------------------------------------------------------------- @@ -154,9 +154,9 @@ static CONST unsigned char bounds[28] = { INLINE static int Invalid( - unsigned char *src) /* Points to lead byte of a UTF-8 byte sequence */ + const char *src) /* Points to lead byte of a UTF-8 byte sequence */ { - unsigned char byte = *src; + unsigned char byte = UCHAR(*src); int index; if ((byte & 0xC3) != 0xC0) { @@ -164,7 +164,7 @@ Invalid( return 0; } index = (byte - 0xC0) >> 1; - if (src[1] < bounds[index] || src[1] > bounds[index+1]) { + if (UCHAR(src[1]) < bounds[index] || UCHAR(src[1]) > bounds[index+1]) { /* Out of bounds - report invalid. */ return 1; } @@ -648,9 +648,14 @@ CONST char * Tcl_UtfNext( CONST char *src) /* The current location in the string. */ { - int left = totalBytes[UCHAR(*src)]; - const char *next = src + 1; + int left; + const char *next; + if (Invalid(src)) { + return src + 1; + } + left = totalBytes[UCHAR(*src)]; + next = src + 1; while (--left) { if ((*next & 0xC0) != 0x80) { /* @@ -662,9 +667,6 @@ Tcl_UtfNext( } next++; } - if (Invalid((unsigned char *)src)) { - return src + 1; - } return next; } @@ -699,7 +701,7 @@ Tcl_UtfPrev( /* If we cannot find a lead byte that might * start a prefix of a valid UTF byte sequence, * we will fallback to a one-byte back step */ - unsigned char *look = (unsigned char *)fallback; + const char *look = fallback; /* Start search at the fallback position */ /* Quick boundary case exit. */ @@ -708,7 +710,7 @@ Tcl_UtfPrev( } do { - unsigned char byte = look[0]; + unsigned char byte = UCHAR(look[0]); if (byte < 0x80) { /* -- cgit v0.12 From da60a1af9f3f57904b13bd79121d88d5e354e7b3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 6 May 2020 16:38:45 +0000 Subject: Backport testutfprev/testutfnex testcase improvements from 8.7. This makes testdescriptions/testresults more equal among branches, so the real differences are more visible. --- generic/tclTest.c | 47 +-- tests/utf.test | 1014 ++++++++++++++++++++++++++--------------------------- 2 files changed, 528 insertions(+), 533 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index 27e145c..ae2d7bb 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -5852,7 +5852,6 @@ TestChannelCmd( chanPtr = statePtr->topChanPtr; chan = (Tcl_Channel) chanPtr; } else { - /* lint */ statePtr = NULL; chan = NULL; } @@ -5907,7 +5906,7 @@ TestChannelCmd( /* Remember the channel in the pool of detached channels */ - det = (TestChannel *) ckalloc(sizeof(TestChannel)); + det = (TestChannel *)ckalloc(sizeof(TestChannel)); det->chan = chan; det->nextPtr = firstDetached; firstDetached = det; @@ -6099,7 +6098,7 @@ TestChannelCmd( for (hPtr = Tcl_FirstHashEntry(hTblPtr, &hSearch); hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { - Tcl_AppendElement(interp, Tcl_GetHashKey(hTblPtr, hPtr)); + Tcl_AppendElement(interp, (char *)Tcl_GetHashKey(hTblPtr, hPtr)); } return TCL_OK; } @@ -6140,7 +6139,7 @@ TestChannelCmd( chanPtr = (Channel *) Tcl_GetHashValue(hPtr); statePtr = chanPtr->state; if (statePtr->flags & TCL_READABLE) { - Tcl_AppendElement(interp, Tcl_GetHashKey(hTblPtr, hPtr)); + Tcl_AppendElement(interp, (char *)Tcl_GetHashKey(hTblPtr, hPtr)); } } return TCL_OK; @@ -6197,7 +6196,7 @@ TestChannelCmd( chanPtr = (Channel *) Tcl_GetHashValue(hPtr); statePtr = chanPtr->state; if (statePtr->flags & TCL_WRITABLE) { - Tcl_AppendElement(interp, Tcl_GetHashKey(hTblPtr, hPtr)); + Tcl_AppendElement(interp, (char *)Tcl_GetHashKey(hTblPtr, hPtr)); } } return TCL_OK; @@ -7128,15 +7127,15 @@ TestUtfNextCmd( char *bytes; const char *result, *first; char buffer[32]; - static const char tobetested[] = "\xFF\xFE\xF4\xF2\xF0\xEF\xE8\xE3\xE2\xE1\xE0\xC2\xC1\xC0\x82"; + static const char tobetested[] = "A\xA0\xC0\xC1\xC2\xD0\xE0\xE8\xF2\xF7\xF8\xFE\xFF"; const char *p = tobetested; if (objc < 2 || objc > 3) { - Tcl_WrongNumArgs(interp, 1, objv, "bytes ?numBytes?"); + Tcl_WrongNumArgs(interp, 1, objv, "string ?numBytes?"); return TCL_ERROR; } - bytes = (char *) Tcl_GetByteArrayFromObj(objv[1], &numBytes); + bytes = Tcl_GetStringFromObj(objv[1], &numBytes); offset = numBytes +TCL_UTF_MAX -1; /* If no constraint is given, allow * the terminating NUL to limit @@ -7154,15 +7153,15 @@ TestUtfNextCmd( } } - if (numBytes > sizeof(buffer) - 2) { + if (numBytes > (int)sizeof(buffer) - 3) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"testutfnext\" can only handle %d bytes", - sizeof(buffer) - 2)); + sizeof(buffer) - 3)); return TCL_ERROR; } memcpy(buffer + 1, bytes, numBytes); - buffer[0] = buffer[numBytes + 1] = '\x00'; + buffer[0] = buffer[numBytes + 1] = buffer[numBytes + 2] = '\x00'; if (!Tcl_UtfCharComplete(buffer + 1, offset)) { /* Cannot scan a complete sequence from the data */ @@ -7171,17 +7170,26 @@ TestUtfNextCmd( return TCL_OK; } - first = result = Tcl_UtfNext(buffer + 1); + first = result = TclUtfNext(buffer + 1); while ((buffer[0] = *p++) != '\0') { /* Run Tcl_UtfNext with many more possible bytes at src[-1], all should give the same result */ - result = Tcl_UtfNext(buffer + 1); + result = TclUtfNext(buffer + 1); if (first != result) { Tcl_AppendResult(interp, "Tcl_UtfNext is not supposed to read src[-1]", NULL); return TCL_ERROR; } } + p = tobetested; + while ((buffer[numBytes + 1] = *p++) != '\0') { + /* Run Tcl_UtfNext with many more possible bytes at src[end], all should give the same result */ + result = TclUtfNext(buffer + 1); + if (first != result) { + Tcl_AppendResult(interp, "Tcl_UtfNext is not supposed to read src[end]", NULL); + return TCL_ERROR; + } + } - Tcl_SetObjResult(interp, Tcl_NewIntObj(result - buffer - 1)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(first - buffer - 1)); return TCL_OK; } @@ -7201,14 +7209,13 @@ TestUtfPrevCmd( int numBytes, offset; char *bytes; const char *result; - Tcl_Obj *copy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "bytes ?offset?"); return TCL_ERROR; } - bytes = (char *) Tcl_GetByteArrayFromObj(objv[1], &numBytes); + bytes = Tcl_GetStringFromObj(objv[1], &numBytes); if (objc == 3) { if (TCL_OK != TclGetIntForIndex(interp, objv[2], numBytes, &offset)) { @@ -7223,14 +7230,8 @@ TestUtfPrevCmd( } else { offset = numBytes; } - copy = Tcl_DuplicateObj(objv[1]); - bytes = (char *) Tcl_SetByteArrayLength(copy, numBytes+1); - bytes[numBytes] = '\0'; - - result = Tcl_UtfPrev(bytes + offset, bytes); + result = TclUtfPrev(bytes + offset, bytes); Tcl_SetObjResult(interp, Tcl_NewIntObj(result - bytes)); - - Tcl_DecrRefCount(copy); return TCL_OK; } diff --git a/tests/utf.test b/tests/utf.test index 0b2d368..8aa3757 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -183,451 +183,451 @@ test utf-5.2 {Tcl_UtfFindLast} {testfindlast testbytestring} { testfindlast [testbytestring abcbc] 98 } bc -test utf-6.1 {Tcl_UtfNext} testutfnext { +test utf-6.1 {Tcl_UtfNext} {testutfnext testbytestring} { # This takes the pointer one past the terminating NUL. # This is really an invalid call. testutfnext {} } 1 -test utf-6.2 {Tcl_UtfNext} testutfnext { +test utf-6.2 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext A } 1 -test utf-6.3 {Tcl_UtfNext} testutfnext { +test utf-6.3 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext AA } 1 -test utf-6.4 {Tcl_UtfNext} testutfnext { - testutfnext A\xA0 +test utf-6.4 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext A[testbytestring \xA0] } 1 -test utf-6.5 {Tcl_UtfNext} testutfnext { - testutfnext A\xD0 +test utf-6.5 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext A[testbytestring \xD0] } 1 -test utf-6.6 {Tcl_UtfNext} testutfnext { - testutfnext A\xE8 +test utf-6.6 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext A[testbytestring \xE8] } 1 -test utf-6.7 {Tcl_UtfNext} testutfnext { - testutfnext A\xF2 +test utf-6.7 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext A[testbytestring \xF2] } 1 -test utf-6.8 {Tcl_UtfNext} testutfnext { - testutfnext A\xF8 +test utf-6.8 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext A[testbytestring \xF8] } 1 -test utf-6.9 {Tcl_UtfNext} testutfnext { - testutfnext \xA0 +test utf-6.9 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0] } 1 -test utf-6.10 {Tcl_UtfNext} testutfnext { - testutfnext \xA0G +test utf-6.10 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0]G } 1 -test utf-6.11 {Tcl_UtfNext} testutfnext { - testutfnext \xA0\xA0 +test utf-6.11 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0\xA0] } 1 -test utf-6.12 {Tcl_UtfNext} testutfnext { - testutfnext \xA0\xD0 +test utf-6.12 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0\xD0] } 1 -test utf-6.13 {Tcl_UtfNext} testutfnext { - testutfnext \xA0\xE8 +test utf-6.13 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0\xE8] } 1 -test utf-6.14 {Tcl_UtfNext} testutfnext { - testutfnext \xA0\xF2 +test utf-6.14 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0\xF2] } 1 -test utf-6.15 {Tcl_UtfNext} testutfnext { - testutfnext \xA0\xF8 +test utf-6.15 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0\xF8] } 1 -test utf-6.16 {Tcl_UtfNext} testutfnext { - testutfnext \xD0 +test utf-6.16 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\x00] } 1 -test utf-6.17 {Tcl_UtfNext} testutfnext { - testutfnext \xD0G +test utf-6.17 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0]G } 1 -test utf-6.18 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xA0 +test utf-6.18 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0] } 2 -test utf-6.19 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xD0 +test utf-6.19 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xD0] } 1 -test utf-6.20 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xE8 +test utf-6.20 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xE8] } 1 -test utf-6.21 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xF2 +test utf-6.21 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xF2] } 1 -test utf-6.22 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xF8 +test utf-6.22 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xF8] } 1 -test utf-6.23 {Tcl_UtfNext} testutfnext { - testutfnext \xE8 +test utf-6.23 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8] } 1 -test utf-6.24 {Tcl_UtfNext} testutfnext { - testutfnext \xE8G +test utf-6.24 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8]G } 1 -test utf-6.25 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0 +test utf-6.25 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\x00] } 1 -test utf-6.26 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xD0 +test utf-6.26 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xD0] } 1 -test utf-6.27 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xE8 +test utf-6.27 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xE8] } 1 -test utf-6.28 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xF2 +test utf-6.28 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xF2] } 1 -test utf-6.29 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xF8 +test utf-6.29 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xF8] } 1 -test utf-6.30 {Tcl_UtfNext} testutfnext { - testutfnext \xF2 +test utf-6.30 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2] } 1 -test utf-6.31 {Tcl_UtfNext} testutfnext { - testutfnext \xF2G +test utf-6.31 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2]G } 1 -test utf-6.32 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0 +test utf-6.32 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0] } 1 -test utf-6.33 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xD0 +test utf-6.33 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xD0] } 1 -test utf-6.34 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xE8 +test utf-6.34 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xE8] } 1 -test utf-6.35 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xF2 +test utf-6.35 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xF2] } 1 -test utf-6.36 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xF8 +test utf-6.36 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xF8] } 1 -test utf-6.37 {Tcl_UtfNext} testutfnext { - testutfnext \xF8 +test utf-6.37 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF8] } 1 -test utf-6.38 {Tcl_UtfNext} testutfnext { - testutfnext \xF8G +test utf-6.38 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF8]G } 1 -test utf-6.39 {Tcl_UtfNext} testutfnext { - testutfnext \xF8\xA0 +test utf-6.39 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF8\xA0] } 1 -test utf-6.40 {Tcl_UtfNext} testutfnext { - testutfnext \xF8\xD0 +test utf-6.40 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF8\xD0] } 1 -test utf-6.41 {Tcl_UtfNext} testutfnext { - testutfnext \xF8\xE8 +test utf-6.41 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF8\xE8] } 1 -test utf-6.42 {Tcl_UtfNext} testutfnext { - testutfnext \xF8\xF2 +test utf-6.42 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF8\xF2] } 1 -test utf-6.43 {Tcl_UtfNext} testutfnext { - testutfnext \xF8\xF8 +test utf-6.43 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF8\xF8] } 1 -test utf-6.44 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xA0G +test utf-6.44 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0]G } 2 -test utf-6.45 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xA0\xA0 +test utf-6.45 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0\xA0] } 2 -test utf-6.46 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xA0\xD0 +test utf-6.46 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0\xD0] } 2 -test utf-6.47 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xA0\xE8 +test utf-6.47 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0\xE8] } 2 -test utf-6.48 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xA0\xF2 +test utf-6.48 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0\xF2] } 2 -test utf-6.49 {Tcl_UtfNext} testutfnext { - testutfnext \xD0\xA0\xF8 +test utf-6.49 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0\xF8] } 2 -test utf-6.50 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0G +test utf-6.50 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0]G } 1 test utf-6.51 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xA0 + testutfnext \u8820 } 3 -test utf-6.52 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xD0 +test utf-6.52 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xD0] } 1 -test utf-6.53 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xE8 +test utf-6.53 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xE8] } 1 -test utf-6.54 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xF2 +test utf-6.54 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xF2] } 1 -test utf-6.55 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xF8 +test utf-6.55 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xF8] } 1 -test utf-6.56 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0G +test utf-6.56 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0]G } 1 -test utf-6.57 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xA0 +test utf-6.57 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xA0\x00] } 1 -test utf-6.58 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xD0 +test utf-6.58 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xD0] } 1 -test utf-6.59 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xE8 +test utf-6.59 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xE8] } 1 -test utf-6.60 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xF2 +test utf-6.60 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xF2] } 1 -test utf-6.61 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xF8 +test utf-6.61 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xF8] } 1 test utf-6.62 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xA0G + testutfnext \u8820G } 3 -test utf-6.63 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xA0\xA0 +test utf-6.63 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext \u8820[testbytestring \xA0] } 3 -test utf-6.64 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xA0\xD0 +test utf-6.64 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext \u8820[testbytestring \xD0] } 3 -test utf-6.65 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xA0\xE8 +test utf-6.65 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext \u8820[testbytestring \xE8] } 3 -test utf-6.66 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xA0\xF2 +test utf-6.66 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext \u8820[testbytestring \xF2] } 3 -test utf-6.67 {Tcl_UtfNext} testutfnext { - testutfnext \xE8\xA0\xA0\xF8 +test utf-6.67 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext \u8820[testbytestring \xF8] } 3 -test utf-6.68 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xA0G +test utf-6.68 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xA0]G } 1 -test utf-6.69.0 {Tcl_UtfNext} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0 +test utf-6.69.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0] } 1 -test utf-6.69.1 {Tcl_UtfNext} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0 +test utf-6.69.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0] } 4 -test utf-6.70 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xA0\xD0 +test utf-6.70 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xA0\xD0] } 1 -test utf-6.71 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xA0\xE8 +test utf-6.71 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xA0\xE8] } 1 -test utf-6.72 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xA0\xF2 +test utf-6.72 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xA0\xF2] } 1 -test utf-6.73 {Tcl_UtfNext} testutfnext { - testutfnext \xF2\xA0\xA0\xF8 +test utf-6.73 {Tcl_UtfNext} {testutfnext testbytestring} { + testutfnext [testbytestring \xF2\xA0\xA0\xF8] } 1 -test utf-6.74.0 {Tcl_UtfNext} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0G +test utf-6.74.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G } 1 -test utf-6.74.1 {Tcl_UtfNext} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0G +test utf-6.74.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G } 4 -test utf-6.75.0 {Tcl_UtfNext} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xA0 +test utf-6.75.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] } 1 -test utf-6.75.1 {Tcl_UtfNext} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xA0 +test utf-6.75.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] } 4 -test utf-6.76.0 {Tcl_UtfNext} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xD0 +test utf-6.76.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xD0] } 1 -test utf-6.76.1 {Tcl_UtfNext} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xD0 +test utf-6.76.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xD0] } 4 -test utf-6.77.0 {Tcl_UtfNext} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xE8 +test utf-6.77.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xE8] } 1 -test utf-6.77.1 {Tcl_UtfNext} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xE8 +test utf-6.77.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xE8] } 4 -test utf-6.78.0 {Tcl_UtfNext} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xF2 +test utf-6.78.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xF2] } 1 -test utf-6.78.1 {Tcl_UtfNext} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xF2 +test utf-6.78.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xF2] } 4 -test utf-6.79.0 {Tcl_UtfNext} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0G\xF8 +test utf-6.79.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G\xF8] } 1 -test utf-6.79.1 {Tcl_UtfNext} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0G\xF8 +test utf-6.79.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G\xF8] } 4 -test utf-6.80 {Tcl_UtfNext - overlong sequences} testutfnext { - testutfnext \xC0\x80 +test utf-6.80 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { + testutfnext [testbytestring \xC0\x80] } 2 -test utf-6.81 {Tcl_UtfNext - overlong sequences} testutfnext { - testutfnext \xC0\x81 +test utf-6.81 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { + testutfnext [testbytestring \xC0\x81] } 1 -test utf-6.82 {Tcl_UtfNext - overlong sequences} testutfnext { - testutfnext \xC1\x80 +test utf-6.82 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { + testutfnext [testbytestring \xC1\x80] } 1 -test utf-6.83 {Tcl_UtfNext - overlong sequences} testutfnext { - testutfnext \xC2\x80 +test utf-6.83 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { + testutfnext [testbytestring \xC2\x80] } 2 -test utf-6.84 {Tcl_UtfNext - overlong sequences} testutfnext { - testutfnext \xE0\x80\x80 +test utf-6.84 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { + testutfnext [testbytestring \xE0\x80\x80] } 1 -test utf-6.85 {Tcl_UtfNext - overlong sequences} testutfnext { - testutfnext \xE0\xA0\x80 +test utf-6.85 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { + testutfnext [testbytestring \xE0\xA0\x80] } 3 -test utf-6.86 {Tcl_UtfNext - overlong sequences} testutfnext { - testutfnext \xF0\x80\x80\x80 +test utf-6.86 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { + testutfnext [testbytestring \xF0\x80\x80\x80] } 1 -test utf-6.87.0 {Tcl_UtfNext - overlong sequences} {testutfnext ucs2} { - testutfnext \xF0\x90\x80\x80 +test utf-6.87.0 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF0\x90\x80\x80] } 1 -test utf-6.87.1 {Tcl_UtfNext - overlong sequences} {testutfnext fullutf} { - testutfnext \xF0\x90\x80\x80 +test utf-6.87.1 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF0\x90\x80\x80] } 4 -test utf-6.88 {Tcl_UtfNext, pointing to 2th byte of 3-byte valid sequence} testutfnext { - testutfnext \xA0\xA0 +test utf-6.88 {Tcl_UtfNext, pointing to 2th byte of 3-byte valid sequence} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0\xA0] } 1 -test utf-6.89 {Tcl_UtfNext, pointing to 2th byte of 3-byte invalid sequence} testutfnext { - testutfnext \x80\x80 +test utf-6.89 {Tcl_UtfNext, pointing to 2th byte of 3-byte invalid sequence} {testutfnext testbytestring} { + testutfnext [testbytestring \x80\x80] } 1 test utf-6.90.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} { - testutfnext \xF4\x8F\xBF\xBF + testutfnext [testbytestring \xF4\x8F\xBF\xBF] } 1 test utf-6.90.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} { - testutfnext \xF4\x8F\xBF\xBF + testutfnext [testbytestring \xF4\x8F\xBF\xBF] } 4 -test utf-6.91.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} { - testutfnext \xF4\x90\x80\x80 +test utf-6.91.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF4\x90\x80\x80] } 1 -test utf-6.91.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} { - testutfnext \xF4\x90\x80\x80 +test utf-6.91.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF4\x90\x80\x80] } 1 -test utf-6.92.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext ucs2} { - testutfnext \xA0\xA0\xA0 +test utf-6.92.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0\xA0] } 1 -test utf-6.92.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext utf16} { - testutfnext \xA0\xA0\xA0 +test utf-6.92.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext testbytestring utf16} { + testutfnext [testbytestring \xA0\xA0\xA0] } 3 -test utf-6.92.2 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext ucs4} { - testutfnext \xA0\xA0\xA0 +test utf-6.92.2 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \xA0\xA0\xA0] } 1 -test utf-6.93.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext ucs2} { - testutfnext \x80\x80\x80 +test utf-6.93.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \x80\x80\x80] } 1 -test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext utf16} { - testutfnext \x80\x80\x80 +test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext testbytestring utf16} { + testutfnext [testbytestring \x80\x80\x80] } 3 -test utf-6.93.2 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext ucs4} { - testutfnext \x80\x80\x80 +test utf-6.93.2 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \x80\x80\x80] } 1 -test utf-6.94 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext ucs2} { - testutfnext \xA0\xA0\xA0\xA0 +test utf-6.94 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0\xA0\xA0] } 1 -test utf-6.95 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext ucs2} { - testutfnext \x80\x80\x80\x80 +test utf-6.95 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \x80\x80\x80\x80] } 1 -test utf-6.96 {Tcl_UtfNext, read limits} testutfnext { - testutfnext G 0 +test utf-6.96 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring G] 0 } 0 -test utf-6.97 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xA0 0 +test utf-6.97 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0] 0 } 0 -test utf-6.98 {Tcl_UtfNext, read limits} testutfnext { - testutfnext AG 1 +test utf-6.98 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext A[testbytestring G] 1 } 1 -test utf-6.99 {Tcl_UtfNext, read limits} testutfnext { - testutfnext A\xA0 1 +test utf-6.99 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext A[testbytestring \xA0] 1 } 1 -test utf-6.100 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xD0\xA0G 1 +test utf-6.100 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0G] 1 } 0 -test utf-6.101 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xD0\xA0G 2 +test utf-6.101 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0G] 2 } 2 -test utf-6.102 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xD0\xA0\xA0 1 +test utf-6.102 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0\xA0] 1 } 0 -test utf-6.103 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xD0\xA0\xA0 2 +test utf-6.103 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xD0\xA0\xA0] 2 } 2 -test utf-6.104 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xE8\xA0\xA0G 1 +test utf-6.104 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xA0G] 1 } 0 -test utf-6.105 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xE8\xA0\xA0G 2 +test utf-6.105 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xA0G] 2 } 0 -test utf-6.106 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xE8\xA0\xA0G 3 +test utf-6.106 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xA0G] 3 } 3 -test utf-6.107 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xE8\xA0\xA0\xA0 1 +test utf-6.107 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xA0\xA0] 1 } 0 -test utf-6.108 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xE8\xA0\xA0\xA0 2 +test utf-6.108 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xA0\xA0] 2 } 0 -test utf-6.109 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xE8\xA0\xA0\xA0 3 +test utf-6.109 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xE8\xA0\xA0\xA0] 3 } 3 -test utf-6.110.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0G 1 +test utf-6.110.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 1 } 1 -test utf-6.110.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0G 1 +test utf-6.110.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 1 } 0 -test utf-6.111.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0G 2 +test utf-6.111.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 2 } 1 -test utf-6.111.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0G 2 +test utf-6.111.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 2 } 0 -test utf-6.112.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0G 3 +test utf-6.112.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 3 } 1 -test utf-6.112.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0G 3 +test utf-6.112.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 3 } 0 -test utf-6.113.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0G 4 +test utf-6.113.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 4 } 1 -test utf-6.113.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0G 4 +test utf-6.113.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 4 } 4 -test utf-6.114.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xA0 1 +test utf-6.114.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 1 } 1 -test utf-6.114.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xA0 1 +test utf-6.114.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 1 } 0 -test utf-6.115.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xA0 2 +test utf-6.115.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 2 } 1 -test utf-6.115.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xA0 2 +test utf-6.115.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 2 } 0 -test utf-6.116.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xA0 3 +test utf-6.116.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 3 } 1 -test utf-6.116.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xA0 3 +test utf-6.116.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 3 } 0 -test utf-6.117.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xF2\xA0\xA0\xA0\xA0 4 +test utf-6.117.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 4 } 1 -test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { - testutfnext \xF2\xA0\xA0\xA0\xA0 4 +test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 4 } 4 -test utf-6.118 {Tcl_UtfNext, read limits} testutfnext { - testutfnext \xA0G 0 +test utf-6.118 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { + testutfnext [testbytestring \xA0G] 0 } 0 -test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0G 1 +test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0G] 1 } 1 -test utf-6.120 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0\xA0 1 +test utf-6.120 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0] 1 } 1 -test utf-6.121 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0\xA0G 2 +test utf-6.121 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0G] 2 } 1 -test utf-6.122 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0\xA0\xA0 2 +test utf-6.122 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0\xA0] 2 } 1 -test utf-6.123 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0\xA0\xA0G 3 +test utf-6.123 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0\xA0G] 3 } 1 -test utf-6.124 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0\xA0\xA0\xA0 3 +test utf-6.124 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0\xA0\xA0] 3 } 1 -test utf-6.125 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0\xA0\xA0\xA0G 4 +test utf-6.125 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0\xA0\xA0G] 4 } 1 -test utf-6.126 {Tcl_UtfNext, read limits} {testutfnext ucs2} { - testutfnext \xA0\xA0\xA0\xA0\xA0 4 +test utf-6.126 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0\xA0\xA0\xA0\xA0] 4 } 1 test utf-7.1 {Tcl_UtfPrev} testutfprev { @@ -639,341 +639,335 @@ test utf-7.2 {Tcl_UtfPrev} testutfprev { test utf-7.3 {Tcl_UtfPrev} testutfprev { testutfprev AA } 1 -test utf-7.4 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8 +test utf-7.4 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8] } 1 -test utf-7.4.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xA0\xA0\xA0 2 +test utf-7.4.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xA0\xA0\xA0] 2 } 1 -test utf-7.4.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xF8\xA0\xA0 2 +test utf-7.4.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xF8\xA0\xA0] 2 } 1 -test utf-7.5 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF2 +test utf-7.5 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF2] } 1 -test utf-7.5.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF2\xA0\xA0\xA0 2 +test utf-7.5.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 2 } 1 -test utf-7.5.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF2\xF8\xA0\xA0 2 +test utf-7.5.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF2\xF8\xA0\xA0] 2 } 1 -test utf-7.6 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8 +test utf-7.6 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE8] } 1 -test utf-7.6.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0\xA0\xA0 2 +test utf-7.6.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A\u8820[testbytestring \xA0] 2 } 1 -test utf-7.6.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xF8\xA0\xA0 2 +test utf-7.6.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE8\xF8\xA0\xA0] 2 } 1 -test utf-7.7 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0 +test utf-7.7 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0] } 1 -test utf-7.7.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xA0\xA0\xA0 2 +test utf-7.7.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xA0\xA0\xA0] 2 } 1 -test utf-7.7.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xF8\xA0\xA0 2 +test utf-7.7.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xF8\xA0\xA0] 2 } 1 -test utf-7.8 {Tcl_UtfPrev} testutfprev { - testutfprev A\xA0 +test utf-7.8 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xA0] } 1 -test utf-7.8.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xA0\xA0\xA0\xA0 2 +test utf-7.8.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xA0\xA0\xA0\xA0] 2 } 1 -test utf-7.8.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xA0\xF8\xA0\xA0 2 +test utf-7.8.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xA0\xF8\xA0\xA0] 2 } 1 -test utf-7.9 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xA0 +test utf-7.9 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xA0] } 2 -test utf-7.9.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xA0\xA0\xA0 3 +test utf-7.9.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xA0\xA0\xA0] 3 } 2 -test utf-7.9.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xA0\xF8\xA0 3 +test utf-7.9.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xA0\xF8\xA0] 3 } 2 -test utf-7.10.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF2\xA0 +test utf-7.10.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF2\xA0] } 2 -test utf-7.10.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF2\xA0 +test utf-7.10.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF2\xA0] } 1 -test utf-7.10.2 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF2\xA0\xA0\xA0 3 +test utf-7.10.2 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 3 } 2 -test utf-7.10.3 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF2\xA0\xA0\xA0 3 +test utf-7.10.3 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 3 } 1 -test utf-7.10.4 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF2\xA0\xF8\xA0 3 +test utf-7.10.4 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF2\xA0\xF8\xA0] 3 } 2 -test utf-7.10.5 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF2\xA0\xF8\xA0 3 +test utf-7.10.5 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF2\xA0\xF8\xA0] 3 } 1 -test utf-7.11 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0 +test utf-7.11 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE8\xA0] } 1 -test utf-7.11.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0\xA0\xA0 3 +test utf-7.11.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A\u8820[testbytestring \xA0] 3 } 1 -test utf-7.11.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0\xF8\xA0 3 +test utf-7.11.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE8\xA0\xF8\xA0] 3 } 1 -test utf-7.11.3 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0\xF8 3 +test utf-7.11.3 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE8\xA0\xF8] 3 } 1 -test utf-7.12 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xA0 +test utf-7.12 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xA0] } 1 -test utf-7.12.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xA0\xA0\xA0 3 +test utf-7.12.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xA0\xA0\xA0] 3 } 1 -test utf-7.12.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xA0\xF8\xA0 3 +test utf-7.12.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xA0\xF8\xA0] 3 } 1 -test utf-7.13 {Tcl_UtfPrev} testutfprev { - testutfprev A\xA0\xA0 +test utf-7.13 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xA0\xA0] } 2 -test utf-7.13.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xA0\xA0\xA0\xA0 3 +test utf-7.13.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xA0\xA0\xA0\xA0] 3 } 2 -test utf-7.13.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xA0\xA0\xF8\xA0 3 +test utf-7.13.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xA0\xA0\xF8\xA0] 3 } 2 -test utf-7.14 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xA0\xA0 +test utf-7.14 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xA0\xA0] } 3 -test utf-7.14.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xA0\xA0\xA0 4 +test utf-7.14.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xA0\xA0\xA0] 4 } 3 -test utf-7.14.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF8\xA0\xA0\xF8 4 +test utf-7.14.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF8\xA0\xA0\xF8] 4 } 3 -test utf-7.15.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF2\xA0\xA0 +test utf-7.15.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF2\xA0\xA0] } 3 -test utf-7.15.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF2\xA0\xA0 +test utf-7.15.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF2\xA0\xA0] } 1 -test utf-7.15.1.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF2\xA0\xA0\xA0 4 +test utf-7.15.1.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 4 } 3 -test utf-7.15.1.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF2\xA0\xA0\xA0 4 +test utf-7.15.1.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 4 } 1 -test utf-7.15.2.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF2\xA0\xA0\xF8 4 +test utf-7.15.2.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF2\xA0\xA0\xF8] 4 } 3 -test utf-7.15.2.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF2\xA0\xA0\xF8 4 +test utf-7.15.2.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF2\xA0\xA0\xF8] 4 } 1 test utf-7.16 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0\xA0 + testutfprev A\u8820 } 1 -test utf-7.16.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0\xA0\xA0 4 +test utf-7.16.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A\u8820[testbytestring \xA0] 4 } 1 -test utf-7.16.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xE8\xA0\xA0\xF8 4 +test utf-7.16.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A\u8820[testbytestring \xF8] 4 } 1 -test utf-7.17 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xA0\xA0 +test utf-7.17 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xA0\xA0] } 3 -test utf-7.17.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xA0\xA0\xA0 4 +test utf-7.17.1 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xA0\xA0\xA0] 4 } 3 -test utf-7.17.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xD0\xA0\xA0\xF8 4 +test utf-7.17.2 {Tcl_UtfPrev} {testutfprev testbytestring} { + testutfprev A[testbytestring \xD0\xA0\xA0\xF8] 4 } 3 -test utf-7.18.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xA0\xA0\xA0 +test utf-7.18.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xA0\xA0\xA0] } 3 -test utf-7.18.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xA0\xA0\xA0 +test utf-7.18.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xA0\xA0\xA0] } 3 -test utf-7.18.2 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xA0\xA0\xA0\xA0 4 +test utf-7.18.2 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xA0\xA0\xA0\xA0] 4 } 3 -test utf-7.18.3 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xA0\xA0\xA0\xA0 4 +test utf-7.18.3 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xA0\xA0\xA0\xA0] 4 } 3 -test utf-7.18.4 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xA0\xA0\xA0\xF8 4 +test utf-7.18.4 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xA0\xA0\xA0\xF8] 4 } 3 -test utf-7.18.5 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xA0\xA0\xA0\xF8 4 +test utf-7.18.5 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xA0\xA0\xA0\xF8] 4 } 3 -test utf-7.19.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF8\xA0\xA0\xA0 +test utf-7.19.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF8\xA0\xA0\xA0] } 4 -test utf-7.19.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF8\xA0\xA0\xA0 +test utf-7.19.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF8\xA0\xA0\xA0] } 4 -test utf-7.20.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xF2\xA0\xA0\xA0 +test utf-7.20.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF2\xA0\xA0\xA0] } 4 -test utf-7.20.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xF2\xA0\xA0\xA0 +test utf-7.20.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF2\xA0\xA0\xA0] } 1 -test utf-7.21.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xE8\xA0\xA0\xA0 +test utf-7.21.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A\u8820[testbytestring \xA0] } 4 -test utf-7.21.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xE8\xA0\xA0\xA0 +test utf-7.21.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A\u8820[testbytestring \xA0] } 4 -test utf-7.22.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xD0\xA0\xA0\xA0 +test utf-7.22.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xD0\xA0\xA0\xA0] } 4 -test utf-7.22.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xD0\xA0\xA0\xA0 +test utf-7.22.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xD0\xA0\xA0\xA0] } 4 -test utf-7.23.0 {Tcl_UtfPrev} {testutfprev ucs2} { - testutfprev A\xA0\xA0\xA0\xA0 +test utf-7.23.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xA0\xA0\xA0\xA0] } 4 -test utf-7.23.1 {Tcl_UtfPrev} {testutfprev fullutf} { - testutfprev A\xA0\xA0\xA0\xA0 +test utf-7.23.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xA0\xA0\xA0\xA0] } 4 -test utf-7.24 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xC0\x81 +test utf-7.24 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xC0\x81] } 2 -test utf-7.25 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xC0\x81 2 +test utf-7.25 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xC0\x81] 2 } 1 -test utf-7.26 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0\x80\x80 +test utf-7.26 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0\x80\x80] } 3 -test utf-7.27 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0\x80 +test utf-7.27 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0\x80] } 2 -test utf-7.27.1 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0\x80\x80 3 +test utf-7.27.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0\x80\x80] 3 } 2 -test utf-7.28 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0 +test utf-7.28 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0] } 1 -test utf-7.28.1 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0\x80\x80 2 +test utf-7.28.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0\x80\x80] 2 } 1 -test utf-7.29.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} { - testutfprev A\xF0\x80\x80\x80 +test utf-7.29.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF0\x80\x80\x80] } 4 -test utf-7.29.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} { - testutfprev A\xF0\x80\x80\x80 +test utf-7.29.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF0\x80\x80\x80] } 4 -test utf-7.30 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xF0\x80\x80\x80 4 +test utf-7.30 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF0\x80\x80\x80] 4 } 3 -test utf-7.31 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xF0\x80\x80\x80 3 +test utf-7.31 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF0\x80\x80\x80] 3 } 2 -test utf-7.32 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xF0\x80\x80\x80 2 +test utf-7.32 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF0\x80\x80\x80] 2 } 1 -test utf-7.33 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xC0\x80 +test utf-7.33 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xC0\x80] } 1 -test utf-7.34 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xC1\x80 +test utf-7.34 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xC1\x80] } 2 -test utf-7.35 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xC2\x80 +test utf-7.35 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xC2\x80] } 1 -test utf-7.36 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0\xA0\x80 +test utf-7.36 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0\xA0\x80] } 1 -test utf-7.37 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0\xA0\x80 3 +test utf-7.37 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0\xA0\x80] 3 } 1 -test utf-7.38 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xE0\xA0\x80 2 +test utf-7.38 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { + testutfprev A[testbytestring \xE0\xA0\x80] 2 } 1 -test utf-7.39.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} { - testutfprev A\xF0\x90\x80\x80 +test utf-7.39.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF0\x90\x80\x80] } 4 -test utf-7.39.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} { - testutfprev A\xF0\x90\x80\x80 +test utf-7.39.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF0\x90\x80\x80] } 1 -test utf-7.40.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} { - testutfprev A\xF0\x90\x80\x80 4 +test utf-7.40.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF0\x90\x80\x80] 4 } 3 -test utf-7.40.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} { - testutfprev A\xF0\x90\x80\x80 4 +test utf-7.40.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF0\x90\x80\x80] 4 } 1 -test utf-7.41.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} { - testutfprev A\xF0\x90\x80\x80 3 +test utf-7.41.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF0\x90\x80\x80] 3 } 2 -test utf-7.41.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} { - testutfprev A\xF0\x90\x80\x80 3 +test utf-7.41.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF0\x90\x80\x80] 3 } 1 test utf-7.42 {Tcl_UtfPrev -- overlong sequence} testutfprev { - testutfprev A\xF0\x90\x80\x80 2 + testutfprev A[testbytestring \xF0\x90\x80\x80] 2 } 1 test utf-7.43 {Tcl_UtfPrev -- no lead byte at start} testutfprev { - testutfprev \xA0 + testutfprev [testbytestring \xA0] } 0 test utf-7.44 {Tcl_UtfPrev -- no lead byte at start} testutfprev { - testutfprev \xA0\xA0 + testutfprev [testbytestring \xA0\xA0] } 1 test utf-7.45 {Tcl_UtfPrev -- no lead byte at start} testutfprev { - testutfprev \xA0\xA0\xA0 + testutfprev [testbytestring \xA0\xA0\xA0] } 2 -test utf-7.46.0 {Tcl_UtfPrev -- no lead byte at start} {testutfprev ucs2} { - testutfprev \xA0\xA0\xA0\xA0 +test utf-7.46.0 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring ucs2} { + testutfprev [testbytestring \xA0\xA0\xA0\xA0] } 3 -test utf-7.46.1 {Tcl_UtfPrev -- no lead byte at start} {testutfprev fullutf} { - testutfprev \xA0\xA0\xA0\xA0 +test utf-7.46.1 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring fullutf} { + testutfprev [testbytestring \xA0\xA0\xA0\xA0] } 3 -test utf-7.47 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} testutfprev { - testutfprev \xE8\xA0 +test utf-7.47 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} {testutfprev testbytestring} { + testutfprev [testbytestring \xE8\xA0] } 0 -test utf-7.47.1 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} testutfprev { - testutfprev \xE8\xA0\xA0 2 +test utf-7.47.1 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} {testutfprev testbytestring} { + testutfprev \u8820 2 } 0 -test utf-7.47.2 {Tcl_UtfPrev, pointing to 3th byte of 3-byte invalid sequence} testutfprev { - testutfprev \xE8\xA0\x00 2 +test utf-7.47.2 {Tcl_UtfPrev, pointing to 3th byte of 3-byte invalid sequence} {testutfprev testbytestring} { + testutfprev [testbytestring \xE8\xA0\x00] 2 } 0 -test utf-7.48.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { - testutfprev A\xF4\x8F\xBF\xBF +test utf-7.48.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF4\x8F\xBF\xBF] } 4 -test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { - testutfprev A\xF4\x8F\xBF\xBF +test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF4\x8F\xBF\xBF] } 1 -test utf-7.48.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { - testutfprev A\xF4\x8F\xBF\xBF 4 +test utf-7.48.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 4 } 3 -test utf-7.48.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { - testutfprev A\xF4\x8F\xBF\xBF 4 +test utf-7.48.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 4 } 1 -test utf-7.48.4 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { - testutfprev A\xF4\x8F\xBF\xBF 3 +test utf-7.48.4 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 3 } 2 -test utf-7.48.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { - testutfprev A\xF4\x8F\xBF\xBF 3 +test utf-7.48.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 3 } 1 -test utf-7.48.6 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { - testutfprev A\xF4\x8F\xBF\xBF 2 +test utf-7.48.6 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 2 } 1 -test utf-7.49.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { - testutfprev A\xF4\x90\x80\x80 +test utf-7.49.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { + testutfprev A[testbytestring \xF4\x90\x80\x80] } 4 -test utf-7.49.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { - testutfprev A\xF4\x90\x80\x80 +test utf-7.49.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { + testutfprev A[testbytestring \xF4\x90\x80\x80] } 4 -test utf-7.49.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { - testutfprev A\xF4\x90\x80\x80 4 +test utf-7.49.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF4\x90\x80\x80] 4 } 3 -test utf-7.49.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { - testutfprev A\xF4\x90\x80\x80 4 -} 3 -test utf-7.49.4 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { - testutfprev A\xF4\x90\x80\x80 3 -} 2 -test utf-7.49.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { - testutfprev A\xF4\x90\x80\x80 3 +test utf-7.49.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF4\x90\x80\x80] 3 } 2 -test utf-7.49.6 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { - testutfprev A\xF4\x90\x80\x80 2 +test utf-7.49.4 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring} { + testutfprev A[testbytestring \xF4\x90\x80\x80] 2 } 1 test utf-8.1 {Tcl_UniCharAtIndex: index = 0} { -- cgit v0.12 From 30f444a254b28780964a86da83bd6a3d1ca60271 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 6 May 2020 16:58:51 +0000 Subject: The routine Invalid() has been revised to do something different. Update the comments to describe what it does now, and cautions that callers take into account. --- generic/tclUtf.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 60e475a..199ff83 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -122,15 +122,23 @@ UtfCount( * * Invalid -- * - * Utility routine to report whether /src/ points to the start of an - * invald byte sequence that should be rejected. This might be because - * it is an overlong encoding, or because it encodes something out of - * the proper range. Caller guarantees that src[0] and src[1] are - * readable, and - * - * (src[0] >= 0xC0) && (src[0] != 0xC1) - * (src[1] >= 0x80) && (src[1] < 0xC0) - * (src[0] < ((TCL_UTF_MAX > 3) ? 0xF5 : 0xF0)) + * Given a pointer to a two-byte prefix of a well-formed UTF-8 byte + * sequence (a lead byte followed by a trail byte) this routine + * examines those two bytes to determine whether the sequence is + * invalid in UTF-8. This might be because it is an overlong + * encoding, or because it encodes something out of the proper range. + * + * Given a pointer to the bytes \xF8 or \xFC , this routine will + * try to read beyond the end of the "bounds" table. Callers must + * prevent this. + * + * Given a pointer to something else (an ASCII byte, a trail byte, + * or another byte that can never begin a valid byte sequence such + * as \xF5) this routine returns false. That makes the routine poorly + * named, as it does not detect and report all invalid sequences. + * + * Callers have to take care that this routine does something useful + * for their needs. * * Results: * A boolean. -- cgit v0.12 From 391bf996873721fdcb8d68003d96121b378d2654 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 6 May 2020 19:22:25 +0000 Subject: Restore safe calls of Invalid(). --- generic/tclUtf.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 199ff83..24ec3d2 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -659,9 +659,6 @@ Tcl_UtfNext( int left; const char *next; - if (Invalid(src)) { - return src + 1; - } left = totalBytes[UCHAR(*src)]; next = src + 1; while (--left) { @@ -675,6 +672,16 @@ Tcl_UtfNext( } next++; } + /* + * Call Invalid() here only if required conditions are met: + * src[0] is known a lead byte. + * src[1] is known a trail byte. + * Especially important to prevent calls when src[0] == '\xF8' or '\xFC' + * See tests utf-6.37 through utf-6.43 through valgrind or similar tool. + */ + if ((next == src + 1) || Invalid(src)) { + return src + 1; + } return next; } -- cgit v0.12 From c2fa3a3fa94ad6516014f5376cb9d97e8b5550bb Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 6 May 2020 21:08:35 +0000 Subject: Tighten optimization in Tcl_NumUtfChars. Explain in comments. --- generic/tclUtf.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 24ec3d2..6a142bc 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -512,38 +512,49 @@ Tcl_UtfCharComplete( int Tcl_NumUtfChars( - register CONST char *src, /* The UTF-8 string to measure. */ - int length) /* The length of the string in bytes, or -1 - * for strlen(string). */ + CONST char *src, /* The UTF-8 string to measure. */ + int length) /* The length of the string in bytes, or -1 + * for strlen(string). */ { Tcl_UniChar ch; - register int i = 0; - - /* - * The separate implementations are faster. - * - * Since this is a time-sensitive function, we also do the check for the - * single-byte char case specially. - */ + int i = 0; if (length < 0) { + /* string is NUL-terminated, so TclUtfToUniChar calls are safe. */ while ((*src != '\0') && (i < INT_MAX)) { src += TclUtfToUniChar(src, &ch); i++; } } else { - register const char *endPtr = src + length - TCL_UTF_MAX; + /* Will return value between 0 and length. No overflow checks. */ + + /* Pointer to the end of string. Never read endPtr[0] */ + const char *endPtr = src + length; + /* Pointer to breakpoint in scan where optimization is lost */ + const char *optPtr = endPtr - TCL_UTF_MAX + 1; - while (src < endPtr) { + /* + * Optimize away the call in this loop. Justified because... + * when (src < optPtr), (endPtr - src) > (endPtr - optPtr) + * By initialization above (endPtr - optPtr) = TCL_UTF_MAX - 1 + * So (endPtr - src) >= TCL_UTF_MAX, and passing that to + * Tcl_UtfCharComplete we know will cause return of 1. + */ + while ((src < optPtr) + /* && Tcl_UtfCharComplete(src, endPtr - src) */ ) { src += TclUtfToUniChar(src, &ch); i++; } - endPtr += TCL_UTF_MAX; + /* Loop over the remaining string where call must happen */ while ((src < endPtr) && Tcl_UtfCharComplete(src, endPtr - src)) { src += TclUtfToUniChar(src, &ch); i++; } if (src < endPtr) { + /* + * String ends in an incomplete UTF-8 sequence. + * Count every byte in it. + */ i += endPtr - src; } } -- cgit v0.12 From 846b23ab0a9dfcfb2675ae37c1451ee573609196 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 7 May 2020 09:31:32 +0000 Subject: Tighten optimization in Tcl_UtfToUniCharDString(), just as in Tcl_NumUtfChars(). Don't use "-1" in the Tcl_NumUtfChars() calculation, since that raises more questions than it solves, but that's easy to be remedied as well: Juse use >= in stead of > in the comparation. Great idea, Don! Backport more code formatting from Tcl 8.6 (e.g. use of CONST, which makes no sense any more in c-files) --- generic/tclUtf.c | 160 +++++++++++++++++++++++++++---------------------------- 1 file changed, 79 insertions(+), 81 deletions(-) diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 6a142bc..4147bbc 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -59,7 +59,7 @@ * UTF-8. */ -static CONST unsigned char totalBytes[256] = { +static const unsigned char totalBytes[256] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -99,7 +99,7 @@ static int Invalid(const char *src); *--------------------------------------------------------------------------- */ -INLINE static int +static INLINE int UtfCount( int ch) /* The Unicode character whose size is returned. */ { @@ -145,7 +145,7 @@ UtfCount( *--------------------------------------------------------------------------- */ -static CONST unsigned char bounds[28] = { +static const unsigned char bounds[28] = { 0x80, 0x80, /* \xC0 accepts \x80 only */ 0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF, /* (\xC4 - \xDC) -- all sequences valid */ @@ -160,7 +160,7 @@ static CONST unsigned char bounds[28] = { #endif }; -INLINE static int +static INLINE int Invalid( const char *src) /* Points to lead byte of a UTF-8 byte sequence */ { @@ -259,13 +259,13 @@ three: char * Tcl_UniCharToUtfDString( - CONST Tcl_UniChar *uniStr, /* Unicode string to convert to UTF-8. */ + const Tcl_UniChar *uniStr, /* Unicode string to convert to UTF-8. */ int uniLength, /* Length of Unicode string in Tcl_UniChars * (must be >= 0). */ Tcl_DString *dsPtr) /* UTF-8 representation of string is appended * to this previously initialized DString. */ { - CONST Tcl_UniChar *w, *wEnd; + const Tcl_UniChar *w, *wEnd; char *p, *string; int oldLength; @@ -317,17 +317,17 @@ Tcl_UniCharToUtfDString( int Tcl_UtfToUniChar( - register CONST char *src, /* The UTF-8 string. */ - register Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by + const char *src, /* The UTF-8 string. */ + Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by * the UTF-8 string. */ { - register int byte; + Tcl_UniChar byte; /* - * Unroll 1 to 3 byte UTF-8 sequences, use loop to handle longer ones. + * Unroll 1 to 3 (or 4) byte UTF-8 sequences. */ - byte = *((unsigned char *) src); + byte = UCHAR(*src); if (byte < 0xC0) { /* * Handles properly formed UTF-8 characters between 0x01 and 0x7F. @@ -335,7 +335,7 @@ Tcl_UtfToUniChar( * characters representing themselves. */ - *chPtr = (Tcl_UniChar) byte; + *chPtr = byte; return 1; } else if (byte < 0xE0) { if ((src[1] & 0xC0) == 0x80) { @@ -415,7 +415,7 @@ Tcl_UtfToUniChar( Tcl_UniChar * Tcl_UtfToUniCharDString( - CONST char *src, /* UTF-8 string to convert to Unicode. */ + const char *src, /* UTF-8 string to convert to Unicode. */ int length, /* Length of UTF-8 string in bytes, or -1 for * strlen(). */ Tcl_DString *dsPtr) /* Unicode representation of string is @@ -423,8 +423,12 @@ Tcl_UtfToUniCharDString( * DString. */ { Tcl_UniChar *w, *wString; - CONST char *p, *end; + const char *p; int oldLength; + /* Pointer to the end of string. Never read endPtr[0] */ + const char *endPtr = src + length; + /* Pointer to breakpoint in scan where optimization is lost */ + const char *optPtr = endPtr - TCL_UTF_MAX; if (length < 0) { length = strlen(src); @@ -438,24 +442,22 @@ Tcl_UtfToUniCharDString( oldLength = Tcl_DStringLength(dsPtr); Tcl_DStringSetLength(dsPtr, - oldLength + (int) ((length + 1) * sizeof(Tcl_UniChar))); + oldLength + ((length + 1) * sizeof(Tcl_UniChar))); wString = (Tcl_UniChar *) (Tcl_DStringValue(dsPtr) + oldLength); w = wString; p = src; - end = src + length - TCL_UTF_MAX; - while (p < end) { + endPtr = src + length; + optPtr = endPtr - TCL_UTF_MAX; + while (p <= optPtr) { p += TclUtfToUniChar(p, w); w++; } - end += TCL_UTF_MAX; - while (p < end) { - if (Tcl_UtfCharComplete(p, end-p)) { - p += TclUtfToUniChar(p, w); - } else { - *w = UCHAR(*p++); - } - w++; + while ((p < endPtr) && Tcl_UtfCharComplete(p, endPtr-p)) { + p += TclUtfToUniChar(p, w++); + } + while (p < endPtr) { + *w++ = UCHAR(*p++); } *w = '\0'; Tcl_DStringSetLength(dsPtr, @@ -485,11 +487,11 @@ Tcl_UtfToUniCharDString( int Tcl_UtfCharComplete( - CONST char *src, /* String to check if first few bytes contain + const char *src, /* String to check if first few bytes contain * a complete UTF-8 character. */ int length) /* Length of above string in bytes. */ { - return length >= totalBytes[(unsigned char)*src]; + return length >= totalBytes[UCHAR(*src)]; } /* @@ -512,7 +514,7 @@ Tcl_UtfCharComplete( int Tcl_NumUtfChars( - CONST char *src, /* The UTF-8 string to measure. */ + const char *src, /* The UTF-8 string to measure. */ int length) /* The length of the string in bytes, or -1 * for strlen(string). */ { @@ -530,17 +532,17 @@ Tcl_NumUtfChars( /* Pointer to the end of string. Never read endPtr[0] */ const char *endPtr = src + length; - /* Pointer to breakpoint in scan where optimization is lost */ - const char *optPtr = endPtr - TCL_UTF_MAX + 1; + /* Pointer to last byte where optimization still can be used */ + const char *optPtr = endPtr - TCL_UTF_MAX; /* * Optimize away the call in this loop. Justified because... - * when (src < optPtr), (endPtr - src) > (endPtr - optPtr) - * By initialization above (endPtr - optPtr) = TCL_UTF_MAX - 1 + * when (src <= optPtr), (endPtr - src) >= (endPtr - optPtr) + * By initialization above (endPtr - optPtr) = TCL_UTF_MAX * So (endPtr - src) >= TCL_UTF_MAX, and passing that to * Tcl_UtfCharComplete we know will cause return of 1. */ - while ((src < optPtr) + while (src <= optPtr /* && Tcl_UtfCharComplete(src, endPtr - src) */ ) { src += TclUtfToUniChar(src, &ch); i++; @@ -580,16 +582,14 @@ Tcl_NumUtfChars( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfFindFirst( - CONST char *src, /* The UTF-8 string to be searched. */ + const char *src, /* The UTF-8 string to be searched. */ int ch) /* The Tcl_UniChar to search for. */ { - int len; - Tcl_UniChar find; - while (1) { - len = TclUtfToUniChar(src, &find); + Tcl_UniChar find; + int len = TclUtfToUniChar(src, &find); if (find == ch) { return src; } @@ -619,18 +619,17 @@ Tcl_UtfFindFirst( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfFindLast( - CONST char *src, /* The UTF-8 string to be searched. */ + const char *src, /* The UTF-8 string to be searched. */ int ch) /* The Unicode character to search for. */ { - int len; - Tcl_UniChar find; - CONST char *last; + const char *last = NULL; - last = NULL; while (1) { - len = TclUtfToUniChar(src, &find); + Tcl_UniChar find; + int len = TclUtfToUniChar(src, &find); + if (find == ch) { last = src; } @@ -663,9 +662,9 @@ Tcl_UtfFindLast( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfNext( - CONST char *src) /* The current location in the string. */ + const char *src) /* The current location in the string. */ { int left; const char *next; @@ -717,13 +716,13 @@ Tcl_UtfNext( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfPrev( - CONST char *src, /* A location in a UTF-8 string. */ - CONST char *start) /* Pointer to the beginning of the string */ + const char *src, /* A location in a UTF-8 string. */ + const char *start) /* Pointer to the beginning of the string */ { int trailBytesSeen = 0; /* How many trail bytes have been verified? */ - CONST char *fallback = src - 1; + const char *fallback = src - 1; /* If we cannot find a lead byte that might * start a prefix of a valid UTF byte sequence, * we will fallback to a one-byte back step */ @@ -779,13 +778,13 @@ Tcl_UtfPrev( /* Reject */ return fallback; } - return (CONST char *)look; + return (const char *)look; } /* We saw a trail byte. */ trailBytesSeen++; - if ((CONST char *)look == start) { + if ((const char *)look == start) { /* * Do not read before the start of the string * @@ -829,8 +828,8 @@ Tcl_UtfPrev( Tcl_UniChar Tcl_UniCharAtIndex( - register CONST char *src, /* The UTF-8 string to dereference. */ - register int index) /* The position of the desired character. */ + const char *src, /* The UTF-8 string to dereference. */ + int index) /* The position of the desired character. */ { Tcl_UniChar ch; @@ -855,15 +854,14 @@ Tcl_UniCharAtIndex( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfAtIndex( - register CONST char *src, /* The UTF-8 string. */ - register int index) /* The position of the desired character. */ + const char *src, /* The UTF-8 string. */ + int index) /* The position of the desired character. */ { Tcl_UniChar ch; - while (index > 0) { - index--; + while (index-- > 0) { src += TclUtfToUniChar(src, &ch); } return src; @@ -897,7 +895,7 @@ Tcl_UtfAtIndex( int Tcl_UtfBackslash( - CONST char *src, /* Points to the backslash character of a + const char *src, /* Points to the backslash character of a * backslash sequence. */ int *readPtr, /* Fill in with number of characters read from * src, unless NULL. */ @@ -1113,8 +1111,8 @@ Tcl_UtfToTitle( int TclpUtfNcmp2( - CONST char *cs, /* UTF string to compare to ct. */ - CONST char *ct, /* UTF string cs is compared to. */ + const char *cs, /* UTF string to compare to ct. */ + const char *ct, /* UTF string cs is compared to. */ unsigned long numBytes) /* Number of *bytes* to compare. */ { /* @@ -1123,7 +1121,7 @@ TclpUtfNcmp2( * fine in the strcmp manner. */ - register int result = 0; + int result = 0; for ( ; numBytes != 0; numBytes--, cs++, ct++) { if (*cs != *ct) { @@ -1160,8 +1158,8 @@ TclpUtfNcmp2( int Tcl_UtfNcmp( - CONST char *cs, /* UTF string to compare to ct. */ - CONST char *ct, /* UTF string cs is compared to. */ + const char *cs, /* UTF string to compare to ct. */ + const char *ct, /* UTF string cs is compared to. */ unsigned long numChars) /* Number of UTF chars to compare. */ { Tcl_UniChar ch1, ch2; @@ -1208,8 +1206,8 @@ Tcl_UtfNcmp( int Tcl_UtfNcasecmp( - CONST char *cs, /* UTF string to compare to ct. */ - CONST char *ct, /* UTF string cs is compared to. */ + const char *cs, /* UTF string to compare to ct. */ + const char *ct, /* UTF string cs is compared to. */ unsigned long numChars) /* Number of UTF chars to compare. */ { Tcl_UniChar ch1, ch2; @@ -1252,8 +1250,8 @@ Tcl_UtfNcasecmp( int TclUtfCasecmp( - CONST char *cs, /* UTF string to compare to ct. */ - CONST char *ct) /* UTF string cs is compared to. */ + const char *cs, /* UTF string to compare to ct. */ + const char *ct) /* UTF string cs is compared to. */ { Tcl_UniChar ch1, ch2; @@ -1409,7 +1407,7 @@ Tcl_UniCharToTitle( int Tcl_UniCharLen( - CONST Tcl_UniChar *uniStr) /* Unicode string to find length of. */ + const Tcl_UniChar *uniStr) /* Unicode string to find length of. */ { int len = 0; @@ -1439,8 +1437,8 @@ Tcl_UniCharLen( int Tcl_UniCharNcmp( - CONST Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ - CONST Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ + const Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ + const Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ unsigned long numChars) /* Number of unichars to compare. */ { #ifdef WORDS_BIGENDIAN @@ -1484,8 +1482,8 @@ Tcl_UniCharNcmp( int Tcl_UniCharNcasecmp( - CONST Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ - CONST Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ + const Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ + const Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ unsigned long numChars) /* Number of unichars to compare. */ { for ( ; numChars != 0; numChars--, ucs++, uct++) { @@ -1860,8 +1858,8 @@ Tcl_UniCharIsWordChar( int Tcl_UniCharCaseMatch( - CONST Tcl_UniChar *uniStr, /* Unicode String. */ - CONST Tcl_UniChar *uniPattern, + const Tcl_UniChar *uniStr, /* Unicode String. */ + const Tcl_UniChar *uniPattern, /* Pattern, which may contain special * characters. */ int nocase) /* 0 for case sensitive, 1 for insensitive */ @@ -2048,14 +2046,14 @@ Tcl_UniCharCaseMatch( int TclUniCharMatch( - CONST Tcl_UniChar *string, /* Unicode String. */ + const Tcl_UniChar *string, /* Unicode String. */ int strLen, /* Length of String */ - CONST Tcl_UniChar *pattern, /* Pattern, which may contain special + const Tcl_UniChar *pattern, /* Pattern, which may contain special * characters. */ int ptnLen, /* Length of Pattern */ int nocase) /* 0 for case sensitive, 1 for insensitive */ { - CONST Tcl_UniChar *stringEnd, *patternEnd; + const Tcl_UniChar *stringEnd, *patternEnd; Tcl_UniChar p; stringEnd = string + strLen; -- cgit v0.12