diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-01-22 21:50:17 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-01-22 21:50:17 (GMT) |
commit | 26a3fb7a3072463461714be493794326550f969f (patch) | |
tree | 182d9e65ea51b246b7247a782d5da07512f564d9 /generic/tclUtf.c | |
parent | bb56c5cb4d107e5424a13f34c3909d5d25750220 (diff) | |
parent | e9745edddd7cc879d04a3302f3be5937fea5e3d8 (diff) | |
download | tcl-26a3fb7a3072463461714be493794326550f969f.zip tcl-26a3fb7a3072463461714be493794326550f969f.tar.gz tcl-26a3fb7a3072463461714be493794326550f969f.tar.bz2 |
[Frq 3473670]: Various Unicode-related
FossilOrigin-Name: d772d08f8ace74d5cf188e91f7a3dd02bf631d16
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; } /* |