diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-01-22 21:50:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-01-22 21:50:17 (GMT) |
commit | 15bbd44e264be94e24949b80352e24d8fd676d97 (patch) | |
tree | 182d9e65ea51b246b7247a782d5da07512f564d9 /generic/tclUtf.c | |
parent | edc866e029899e5fc2a23621625b1a3199f9aac5 (diff) | |
parent | a2f9926dbfa80edc8f823d9182d3ccaa8f976240 (diff) | |
download | tcl-15bbd44e264be94e24949b80352e24d8fd676d97.zip tcl-15bbd44e264be94e24949b80352e24d8fd676d97.tar.gz tcl-15bbd44e264be94e24949b80352e24d8fd676d97.tar.bz2 |
[Frq 3473670]: Various Unicode-related
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r-- | generic/tclUtf.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c index e13bf92..f0d08e7 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -1126,10 +1126,9 @@ Tcl_UniCharToUpper( int info = GetUniCharInfo(ch); if (GetCaseType(info) & 0x04) { - return (Tcl_UniChar) (ch - GetDelta(info)); - } else { - return ch; + ch -= GetDelta(info); } + return (Tcl_UniChar) ch; } /* @@ -1155,10 +1154,9 @@ Tcl_UniCharToLower( int info = GetUniCharInfo(ch); if (GetCaseType(info) & 0x02) { - return (Tcl_UniChar) (ch + GetDelta(info)); - } else { - return ch; + ch += GetDelta(info); } + return (Tcl_UniChar) ch; } /* @@ -1189,12 +1187,11 @@ Tcl_UniCharToTitle( * Subtract or add one depending on the original case. */ - return (Tcl_UniChar) (ch + ((mode & 0x4) ? -1 : 1)); + ch += ((mode & 0x4) ? -1 : 1); } else if (mode == 0x4) { - return (Tcl_UniChar) (ch - GetDelta(info)); - } else { - return ch; + ch -= GetDelta(info); } + return (Tcl_UniChar) ch; } /* |