summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-18 13:54:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-18 13:54:06 (GMT)
commit176431f58481aeaba56e3463648fd85990236de4 (patch)
treeacd54df49d264cc7ceef526685b300026bcf7ed7 /generic/tclEncoding.c
parentae243c85b7e7b470ea541cce41e76cd2cd7474f6 (diff)
parentaf7fa225c1d0ec592c7af29ead5922f45c1c15fb (diff)
downloadtcl-176431f58481aeaba56e3463648fd85990236de4.zip
tcl-176431f58481aeaba56e3463648fd85990236de4.tar.gz
tcl-176431f58481aeaba56e3463648fd85990236de4.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 4b99f27..2e4c3f7 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1775,7 +1775,7 @@ LoadTableEncoding(
dataPtr->toUnicode[hi] = pageMemPtr;
p += 2;
for (lo = 0; lo < 256; lo++) {
- if ((lo & 0x0f) == 0) {
+ if ((lo & 0x0F) == 0) {
p++;
}
ch = (staticHex[UCHAR(p[0])] << 12) + (staticHex[UCHAR(p[1])] << 8)
@@ -1836,7 +1836,7 @@ LoadTableEncoding(
pageMemPtr += 256;
dataPtr->fromUnicode[ch >> 8] = page;
}
- page[ch & 0xff] = (unsigned short) ((hi << 8) + lo);
+ page[ch & 0xFF] = (unsigned short) ((hi << 8) + lo);
}
}
}
@@ -1942,7 +1942,7 @@ LoadTableEncoding(
if (from == 0) {
continue;
}
- dataPtr->fromUnicode[from >> 8][from & 0xff] = to;
+ dataPtr->fromUnicode[from >> 8][from & 0xFF] = to;
}
}
doneParse:
@@ -2157,7 +2157,7 @@ BinaryProc(
* UtfIntToUtfExtProc --
*
* Convert from UTF-8 to UTF-8. While converting null-bytes from the
- * Tcl's internal representation (0xc0, 0x80) to the official
+ * Tcl's internal representation (0xC0, 0x80) to the official
* representation (0x00). See UtfToUtfProc for details.
*
* Results:
@@ -2206,7 +2206,7 @@ UtfIntToUtfExtProc(
* UtfExtToUtfIntProc --
*
* Convert from UTF-8 to UTF-8 while converting null-bytes from the
- * official representation (0x00) to Tcl's internal representation (0xc0,
+ * official representation (0x00) to Tcl's internal representation (0xC0,
* 0x80). See UtfToUtfProc for details.
*
* Results:
@@ -2337,14 +2337,14 @@ UtfToUtfProc(
if (UCHAR(*src) < 0x80 && !(UCHAR(*src) == 0 && pureNullMode == 0)) {
/*
* Copy 7bit characters, but skip null-bytes when we are in input
- * mode, so that they get converted to 0xc080.
+ * mode, so that they get converted to 0xC080.
*/
*dst++ = *src++;
- } else if (pureNullMode == 1 && UCHAR(*src) == 0xc0 &&
+ } else if (pureNullMode == 1 && UCHAR(*src) == 0xC0 &&
(src + 1 < srcEnd) && UCHAR(*(src+1)) == 0x80) {
/*
- * Convert 0xc080 to real nulls when we are in output mode.
+ * Convert 0xC080 to real nulls when we are in output mode.
*/
*dst++ = 0;
@@ -2893,7 +2893,7 @@ TableFromUtfProc(
* full support of int Tcl_UniChar. [Bug 1004065]
*/
- if (ch & 0xffff0000) {
+ if (ch & 0xFFFF0000) {
word = 0;
} else
#else
@@ -2901,7 +2901,7 @@ TableFromUtfProc(
word = 0;
} else
#endif
- word = fromUnicode[(ch >> 8)][ch & 0xff];
+ word = fromUnicode[(ch >> 8)][ch & 0xFF];
if ((word == 0) && (ch != 0)) {
if (flags & TCL_ENCODING_STOPONERROR) {
@@ -3087,7 +3087,7 @@ Iso88591FromUtfProc(
* Check for illegal characters.
*/
- if (ch > 0xff
+ if (ch > 0xFF
#if TCL_UTF_MAX <= 3
|| ((ch >= 0xD800) && (len < 3))
#endif
@@ -3474,7 +3474,7 @@ EscapeFromUtfProc(
break;
}
len = TclUtfToUniChar(src, &ch);
- word = tableFromUnicode[(ch >> 8)][ch & 0xff];
+ word = tableFromUnicode[(ch >> 8)][ch & 0xFF];
if ((word == 0) && (ch != 0)) {
int oldState;
@@ -3484,7 +3484,7 @@ EscapeFromUtfProc(
for (state = 0; state < dataPtr->numSubTables; state++) {
encodingPtr = GetTableEncoding(dataPtr, state);
tableDataPtr = (const TableEncodingData *)encodingPtr->clientData;
- word = tableDataPtr->fromUnicode[(ch >> 8)][ch & 0xff];
+ word = tableDataPtr->fromUnicode[(ch >> 8)][ch & 0xFF];
if (word != 0) {
break;
}