diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-13 22:06:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-13 22:06:10 (GMT) |
commit | 8c3eb78cf7bd96819cbf50c6552954c785098f69 (patch) | |
tree | ef70c73ff15c99c137682381b9c15c4871fe505c /generic/tclEncoding.c | |
parent | 14b5289e4aa4945dd080d1d3d2dad7f54537eec8 (diff) | |
parent | 73cc9cd62f844146e1d9a835511da3b641aafac0 (diff) | |
download | tcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.zip tcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.tar.gz tcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 0f5337e..c888962 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2621,7 +2621,7 @@ UtfToUtf16Proc( */ if (clientData) { -#if TCL_UTF_MAX > 4 +#if TCL_UTF_MAX > 3 if (*chPtr <= 0xFFFF) { *dst++ = (*chPtr & 0xFF); *dst++ = (*chPtr >> 8); @@ -2636,7 +2636,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); @@ -2703,7 +2703,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; @@ -2734,7 +2734,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); @@ -2960,7 +2960,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] @@ -3173,7 +3173,7 @@ Iso88591FromUtfProc( */ if (ch > 0xff -#if TCL_UTF_MAX <= 4 +#if TCL_UTF_MAX <= 3 || ((ch >= 0xD800) && (len < 3)) #endif ) { @@ -3181,7 +3181,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 /* |