Go to the source code of this file.
|
struct { |
unsigned short | upper |
|
signed char | lower |
|
unsigned char | len |
|
} | casemaps [] |
|
static const unsigned short | pairs [][2] |
|
◆ CASELACE
#define CASELACE |
( |
|
u1, |
|
|
|
u2 |
|
) |
| CASEMAP((u1), (u2), (u1) + 1) |
◆ CASEMAP
#define CASEMAP |
( |
|
u1, |
|
|
|
u2, |
|
|
|
l |
|
) |
| |
Value:{ \
(u1), (l) - (u1), (u2) - (u1) + 1 \
}
Definition at line 3 of file towccase.c.
◆ __towcase()
wchar_t __towcase |
( |
wchar_t |
wc, |
|
|
int |
lower |
|
) |
| |
Definition at line 218 of file towccase.c.
221 int lmul = 2 * lower - 1;
222 int lmask = lower - 1;
224 if(!
iswalpha((
wint_t)wc) || (
unsigned)wc - 0x0600 <= 0x0fff - 0x0600 ||
225 (
unsigned)wc - 0x2e00 <= 0xa63f - 0x2e00 || (
unsigned)wc - 0xa800 <= 0xab52 - 0xa800 ||
226 (
unsigned)wc - 0xabc0 <= 0xfeff - 0xabc0)
232 if(lower && (
unsigned)wc - 0x10a0 < 0x2e)
234 if(wc > 0x10c5 && wc != 0x10c7 && wc != 0x10cd)
239 return wc + 0x2d00 - 0x10a0;
242 if(!lower && (
unsigned)wc - 0x2d00 < 0x26)
244 if(wc > 0x2d25 && wc != 0x2d27 && wc != 0x2d2d)
249 return wc + 0x10a0 - 0x2d00;
252 if(lower && (
unsigned)wc - 0x13a0 < 0x50)
254 return wc + 0xab70 - 0x13a0;
257 if(!lower && (
unsigned)wc - 0xab70 < 0x50)
259 return wc + 0x13a0 - 0xab70;
269 return wc + lower - ((wc -
casemaps[i].upper) & 1);
271 return wc + lmul *
casemaps[i].lower;
275 for(i = 0;
pairs[i][1 - lower]; i++)
277 if(
pairs[i][1 - lower] == wc)
279 return pairs[i][lower];
283 if(wc - (0x10428 - 0x28 * lower) < 0x28)
285 return wc - 0x28 + 0x50 * lower;
288 if(wc - (0x104d8 - 0x28 * lower) < 0x24)
290 return wc - 0x28 + 0x50 * lower;
293 if(wc - (0x10cc0 - 0x40 * lower) < 0x33)
295 return wc - 0x40 + 0x80 * lower;
298 if(wc - (0x118c0 - 0x20 * lower) < 0x20)
300 return wc - 0x20 + 0x40 * lower;
303 if(wc - (0x1e922 - 0x22 * lower) < 0x22)
305 return wc - 0x22 + 0x44 * lower;
static const unsigned short pairs[][2]
static const struct @2 casemaps[]
References casemaps, iswalpha(), and pairs.
Referenced by towlower(), and towupper().
◆ casemaps
◆ pairs
const unsigned short pairs[][2] |
|
static |