mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: Some type adjustments for CharSet
git-svn-id: svn://ultimatepp.org/upp/trunk@11188 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4b16094c2c
commit
d01597dd6f
3 changed files with 9 additions and 9 deletions
|
|
@ -126,7 +126,7 @@ extern byte unicode_fast_info__[2048];
|
|||
|
||||
dword ToUpperRest_(dword c);
|
||||
dword ToLowerRest_(dword c);
|
||||
dword ToAsciiRest_(dword c);
|
||||
char ToAsciiRest_(dword c);
|
||||
bool IsRTL_(dword c);
|
||||
bool IsMark_(dword c);
|
||||
bool IsLetter_(dword c);
|
||||
|
|
@ -135,7 +135,7 @@ bool IsLower_(dword c);
|
|||
|
||||
inline dword ToUpper(dword c) { return c < 2048 ? unicode_fast_upper__[c] : ToUpperRest_(c); }
|
||||
inline dword ToLower(dword c) { return c < 2048 ? unicode_fast_lower__[c] : ToLowerRest_(c); }
|
||||
inline dword ToAscii(dword c) { return c < 2048 ? unicode_fast_ascii__[c] : ToAsciiRest_(c); }
|
||||
inline char ToAscii(dword c) { return c < 2048 ? unicode_fast_ascii__[c] : ToAsciiRest_(c); }
|
||||
inline bool IsLower(dword c) { return c < 2048 ? unicode_fast_info__[c] & 1 : IsLower_(c); }
|
||||
inline bool IsUpper(dword c) { return c < 2048 ? unicode_fast_info__[c] & 2 : IsUpper_(c); }
|
||||
inline bool IsLetter(dword c) { return c < 2048 ? unicode_fast_info__[c] & 4 : IsLetter_(c); }
|
||||
|
|
@ -156,28 +156,28 @@ inline bool IsUpper(int c) { return IsUpper((dword) c); }
|
|||
inline bool IsLower(int c) { return IsLower((dword) c); }
|
||||
inline int ToUpper(int c) { return ToUpper((dword) c); }
|
||||
inline int ToLower(int c) { return ToLower((dword) c); }
|
||||
inline int ToAscii(int c) { return ToAscii((dword) c); }
|
||||
inline char ToAscii(int c) { return ToAscii((dword) c); }
|
||||
|
||||
inline bool IsLetter(char c) { return IsLetter((dword)(byte) c); }
|
||||
inline bool IsUpper(char c) { return IsUpper((dword)(byte) c); }
|
||||
inline bool IsLower(char c) { return IsLower((dword)(byte) c); }
|
||||
inline dword ToUpper(char c) { return ToUpper((dword)(byte) c); }
|
||||
inline dword ToLower(char c) { return ToLower((dword)(byte) c); }
|
||||
inline dword ToAscii(char c) { return ToAscii((dword)(byte) c); }
|
||||
inline char ToAscii(char c) { return ToAscii((dword)(byte) c); }
|
||||
|
||||
inline bool IsLetter(signed char c) { return IsLetter((dword)(byte) c); }
|
||||
inline bool IsUpper(signed char c) { return IsUpper((dword)(byte) c); }
|
||||
inline bool IsLower(signed char c) { return IsLower((dword)(byte) c); }
|
||||
inline dword ToUpper(signed char c) { return ToUpper((dword)(byte) c); }
|
||||
inline dword ToLower(signed char c) { return ToLower((dword)(byte) c); }
|
||||
inline dword ToAscii(signed char c) { return ToAscii((dword)(byte) c); }
|
||||
inline char ToAscii(signed char c) { return ToAscii((dword)(byte) c); }
|
||||
|
||||
inline bool IsLetter(wchar c) { return IsLetter((dword) c); }
|
||||
inline bool IsUpper(wchar c) { return IsUpper((dword) c); }
|
||||
inline bool IsLower(wchar c) { return IsLower((dword) c); }
|
||||
inline dword ToUpper(wchar c) { return ToUpper((dword) c); }
|
||||
inline dword ToLower(wchar c) { return ToLower((dword) c); }
|
||||
inline dword ToAscii(wchar c) { return ToAscii((dword) c); }
|
||||
inline char ToAscii(wchar c) { return ToAscii((dword) c); }
|
||||
|
||||
inline bool IsDigit(int c) { return c >= '0' && c <= '9'; }
|
||||
inline bool IsAlpha(int c) { return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z'; }
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ dword ToLowerRest_(dword c)
|
|||
return q >= 0 ? f.lower[q] : c;
|
||||
}
|
||||
|
||||
dword ToAsciiRest_(dword c)
|
||||
char ToAsciiRest_(dword c)
|
||||
{
|
||||
UnicodeInfo& f = Single<UnicodeInfo>();
|
||||
int q = f.composed.Find(c);
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ int ChooseAccessKey(const char *text, dword used)
|
|||
return MAKELONG(ac, s - text + 1);
|
||||
}
|
||||
for(const char *s = text; *s; s++) {
|
||||
byte ac = ToUpper(*s);
|
||||
dword ac = ToUpper(*s);
|
||||
if(ac < 128 && ac >= 'A' && ac <= 'Z' && ac != 'I' && ac != 'L' && (Ctrl::AccessKeyBit(ac) & used) == 0)
|
||||
return ac;
|
||||
}
|
||||
for(const char *s = text; *s; s++) {
|
||||
byte ac = ToUpper(*s);
|
||||
dword ac = ToUpper(*s);
|
||||
if(ac < 128 && ac >= 'A' && ac <= 'Z' && (Ctrl::AccessKeyBit(ac) & used) == 0)
|
||||
return ac;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue