summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-29 16:13:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-29 16:13:16 (GMT)
commite490c27bea05bfbc960ca9e0c101a8f7ae1f8da8 (patch)
tree604f0782b4191f2610703e338b0250bd3c59f2e7 /generic/tclEncoding.c
parent7ed7fa90ffa88ab4144d20e91139e6f36abdf133 (diff)
parent9d8c640e00e432782bc30d6dcbd78b83a959dfee (diff)
downloadtcl-e490c27bea05bfbc960ca9e0c101a8f7ae1f8da8.zip
tcl-e490c27bea05bfbc960ca9e0c101a8f7ae1f8da8.tar.gz
tcl-e490c27bea05bfbc960ca9e0c101a8f7ae1f8da8.tar.bz2
Merge trunk
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 7496f83..89a71c8 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -2554,7 +2554,7 @@ UtfToUtf16Proc(
*/
if (clientData) {
-#if TCL_UTF_MAX > 4
+#if TCL_UTF_MAX > 3
if (*chPtr <= 0xFFFF) {
*dst++ = (*chPtr & 0xFF);
*dst++ = (*chPtr >> 8);
@@ -2569,7 +2569,7 @@ UtfToUtf16Proc(
*dst++ = (*chPtr >> 8);
#endif
} else {
-#if TCL_UTF_MAX > 4
+#if TCL_UTF_MAX > 3
if (*chPtr <= 0xFFFF) {
*dst++ = (*chPtr >> 8);
*dst++ = (*chPtr & 0xFF);
@@ -2636,7 +2636,7 @@ UtfToUcs2Proc(
{
const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd;
int result, numChars;
-#if TCL_UTF_MAX <= 4
+#if TCL_UTF_MAX <= 3
int len;
#endif
Tcl_UniChar ch = 0;
@@ -2666,7 +2666,7 @@ UtfToUcs2Proc(
result = TCL_CONVERT_NOSPACE;
break;
}
-#if TCL_UTF_MAX <= 4
+#if TCL_UTF_MAX <= 3
src += (len = TclUtfToUniChar(src, &ch));
if ((ch >= 0xD800) && (len < 3)) {
src += TclUtfToUniChar(src, &ch);
@@ -2890,7 +2890,7 @@ TableFromUtfProc(
}
len = TclUtfToUniChar(src, &ch);
-#if TCL_UTF_MAX > 4
+#if TCL_UTF_MAX > 3
/*
* This prevents a crash condition. More evaluation is required for
* full support of int Tcl_UniChar. [Bug 1004065]
@@ -3101,7 +3101,7 @@ Iso88591FromUtfProc(
*/
if (ch > 0xff
-#if TCL_UTF_MAX <= 4
+#if TCL_UTF_MAX <= 3
|| ((ch >= 0xD800) && (len < 3))
#endif
) {
@@ -3109,7 +3109,7 @@ Iso88591FromUtfProc(
result = TCL_CONVERT_UNKNOWN;
break;
}
-#if TCL_UTF_MAX <= 4
+#if TCL_UTF_MAX <= 3
if ((ch >= 0xD800) && (len < 3)) len = 4;
#endif
/*