summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-17 17:37:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-17 17:37:48 (GMT)
commitb549908df2d5c9b0dba0a55f14c53f2052afeb4b (patch)
treebd019667a72a0afddfe022d9473738d383c78fe1 /generic/tclEncoding.c
parent9bf0f01d3d518909dba4fddd22b5eefdad229a83 (diff)
parent9e89327bdf29379e7d2ca6af75ffad273e8babba (diff)
downloadtcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.zip
tcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.tar.gz
tcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.tar.bz2
Merge 9.0
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index ab8b466..3ef4e58 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -3,7 +3,7 @@
*
* Contains the implementation of the encoding conversion package.
*
- * Copyright (c) 1996-1998 Sun Microsystems, Inc.
+ * Copyright © 1996-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -2507,7 +2507,7 @@ UtfToUtf16Proc(
*dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
*dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
*dst++ = (*chPtr & 0xFF);
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
+ *dst++ = ((*chPtr >> 8) & 0x3) | 0xDC;
}
#else
*dst++ = (*chPtr & 0xFF);
@@ -2519,10 +2519,10 @@ UtfToUtf16Proc(
*dst++ = (*chPtr >> 8);
*dst++ = (*chPtr & 0xFF);
} else {
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
- *dst++ = (*chPtr & 0xFF);
*dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
*dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
+ *dst++ = ((*chPtr >> 8) & 0x3) | 0xDC;
+ *dst++ = (*chPtr & 0xFF);
}
#else
*dst++ = (*chPtr >> 8);
@@ -3700,7 +3700,7 @@ InitializeEncodingSearchPath(
if (*encodingPtr) {
((Encoding *)(*encodingPtr))->refCount++;
}
- bytes = TclGetStringFromObj(searchPathObj, lengthPtr);
+ bytes = Tcl_GetStringFromObj(searchPathObj, lengthPtr);
*valuePtr = (char *)Tcl_Alloc(*lengthPtr + 1);
memcpy(*valuePtr, bytes, *lengthPtr + 1);
Tcl_DecrRefCount(searchPathObj);