morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base.git
Log | Files | Refs

runetypebody.h (26116B)


      1 /* MIT/X Consortium Copyright (c) 2012 Connor Lane Smith <cls@lubutu.com>
      2  *
      3  * Permission is hereby granted, free of charge, to any person obtaining a
      4  * copy of this software and associated documentation files (the "Software"),
      5  * to deal in the Software without restriction, including without limitation
      6  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      7  * and/or sell copies of the Software, and to permit persons to whom the
      8  * Software is furnished to do so, subject to the following conditions:
      9  *
     10  * The above copyright notice and this permission notice shall be included in
     11  * all copies or substantial portions of the Software.
     12  *
     13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     16  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     18  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
     19  * DEALINGS IN THE SOFTWARE.
     20  */
     21 
     22 /* Automatically generated from UnicodeData-6.1.0.txt by mkrunetype.awk */
     23 
     24 static Rune alpha2[][2] = {
     25 	{ 0x0041, 0x005A },
     26 	{ 0x0061, 0x007A },
     27 	{ 0x00C0, 0x00D6 },
     28 	{ 0x00D8, 0x00F6 },
     29 	{ 0x00F8, 0x02C1 },
     30 	{ 0x02C6, 0x02D1 },
     31 	{ 0x02E0, 0x02E4 },
     32 	{ 0x0370, 0x0374 },
     33 	{ 0x0376, 0x0377 },
     34 	{ 0x037A, 0x037D },
     35 	{ 0x0388, 0x038A },
     36 	{ 0x038E, 0x03A1 },
     37 	{ 0x03A3, 0x03F5 },
     38 	{ 0x03F7, 0x0481 },
     39 	{ 0x048A, 0x0527 },
     40 	{ 0x0531, 0x0556 },
     41 	{ 0x0561, 0x0587 },
     42 	{ 0x05D0, 0x05EA },
     43 	{ 0x05F0, 0x05F2 },
     44 	{ 0x0620, 0x064A },
     45 	{ 0x066E, 0x066F },
     46 	{ 0x0671, 0x06D3 },
     47 	{ 0x06E5, 0x06E6 },
     48 	{ 0x06EE, 0x06EF },
     49 	{ 0x06FA, 0x06FC },
     50 	{ 0x0712, 0x072F },
     51 	{ 0x074D, 0x07A5 },
     52 	{ 0x07CA, 0x07EA },
     53 	{ 0x07F4, 0x07F5 },
     54 	{ 0x0800, 0x0815 },
     55 	{ 0x0840, 0x0858 },
     56 	{ 0x08A2, 0x08AC },
     57 	{ 0x0904, 0x0939 },
     58 	{ 0x0958, 0x0961 },
     59 	{ 0x0971, 0x0977 },
     60 	{ 0x0979, 0x097F },
     61 	{ 0x0985, 0x098C },
     62 	{ 0x098F, 0x0990 },
     63 	{ 0x0993, 0x09A8 },
     64 	{ 0x09AA, 0x09B0 },
     65 	{ 0x09B6, 0x09B9 },
     66 	{ 0x09DC, 0x09DD },
     67 	{ 0x09DF, 0x09E1 },
     68 	{ 0x09F0, 0x09F1 },
     69 	{ 0x0A05, 0x0A0A },
     70 	{ 0x0A0F, 0x0A10 },
     71 	{ 0x0A13, 0x0A28 },
     72 	{ 0x0A2A, 0x0A30 },
     73 	{ 0x0A32, 0x0A33 },
     74 	{ 0x0A35, 0x0A36 },
     75 	{ 0x0A38, 0x0A39 },
     76 	{ 0x0A59, 0x0A5C },
     77 	{ 0x0A72, 0x0A74 },
     78 	{ 0x0A85, 0x0A8D },
     79 	{ 0x0A8F, 0x0A91 },
     80 	{ 0x0A93, 0x0AA8 },
     81 	{ 0x0AAA, 0x0AB0 },
     82 	{ 0x0AB2, 0x0AB3 },
     83 	{ 0x0AB5, 0x0AB9 },
     84 	{ 0x0AE0, 0x0AE1 },
     85 	{ 0x0B05, 0x0B0C },
     86 	{ 0x0B0F, 0x0B10 },
     87 	{ 0x0B13, 0x0B28 },
     88 	{ 0x0B2A, 0x0B30 },
     89 	{ 0x0B32, 0x0B33 },
     90 	{ 0x0B35, 0x0B39 },
     91 	{ 0x0B5C, 0x0B5D },
     92 	{ 0x0B5F, 0x0B61 },
     93 	{ 0x0B85, 0x0B8A },
     94 	{ 0x0B8E, 0x0B90 },
     95 	{ 0x0B92, 0x0B95 },
     96 	{ 0x0B99, 0x0B9A },
     97 	{ 0x0B9E, 0x0B9F },
     98 	{ 0x0BA3, 0x0BA4 },
     99 	{ 0x0BA8, 0x0BAA },
    100 	{ 0x0BAE, 0x0BB9 },
    101 	{ 0x0C05, 0x0C0C },
    102 	{ 0x0C0E, 0x0C10 },
    103 	{ 0x0C12, 0x0C28 },
    104 	{ 0x0C2A, 0x0C33 },
    105 	{ 0x0C35, 0x0C39 },
    106 	{ 0x0C58, 0x0C59 },
    107 	{ 0x0C60, 0x0C61 },
    108 	{ 0x0C85, 0x0C8C },
    109 	{ 0x0C8E, 0x0C90 },
    110 	{ 0x0C92, 0x0CA8 },
    111 	{ 0x0CAA, 0x0CB3 },
    112 	{ 0x0CB5, 0x0CB9 },
    113 	{ 0x0CE0, 0x0CE1 },
    114 	{ 0x0CF1, 0x0CF2 },
    115 	{ 0x0D05, 0x0D0C },
    116 	{ 0x0D0E, 0x0D10 },
    117 	{ 0x0D12, 0x0D3A },
    118 	{ 0x0D60, 0x0D61 },
    119 	{ 0x0D7A, 0x0D7F },
    120 	{ 0x0D85, 0x0D96 },
    121 	{ 0x0D9A, 0x0DB1 },
    122 	{ 0x0DB3, 0x0DBB },
    123 	{ 0x0DC0, 0x0DC6 },
    124 	{ 0x0E01, 0x0E30 },
    125 	{ 0x0E32, 0x0E33 },
    126 	{ 0x0E40, 0x0E46 },
    127 	{ 0x0E81, 0x0E82 },
    128 	{ 0x0E87, 0x0E88 },
    129 	{ 0x0E94, 0x0E97 },
    130 	{ 0x0E99, 0x0E9F },
    131 	{ 0x0EA1, 0x0EA3 },
    132 	{ 0x0EAA, 0x0EAB },
    133 	{ 0x0EAD, 0x0EB0 },
    134 	{ 0x0EB2, 0x0EB3 },
    135 	{ 0x0EC0, 0x0EC4 },
    136 	{ 0x0EDC, 0x0EDF },
    137 	{ 0x0F40, 0x0F47 },
    138 	{ 0x0F49, 0x0F6C },
    139 	{ 0x0F88, 0x0F8C },
    140 	{ 0x1000, 0x102A },
    141 	{ 0x1050, 0x1055 },
    142 	{ 0x105A, 0x105D },
    143 	{ 0x1065, 0x1066 },
    144 	{ 0x106E, 0x1070 },
    145 	{ 0x1075, 0x1081 },
    146 	{ 0x10A0, 0x10C5 },
    147 	{ 0x10D0, 0x10FA },
    148 	{ 0x10FC, 0x1248 },
    149 	{ 0x124A, 0x124D },
    150 	{ 0x1250, 0x1256 },
    151 	{ 0x125A, 0x125D },
    152 	{ 0x1260, 0x1288 },
    153 	{ 0x128A, 0x128D },
    154 	{ 0x1290, 0x12B0 },
    155 	{ 0x12B2, 0x12B5 },
    156 	{ 0x12B8, 0x12BE },
    157 	{ 0x12C2, 0x12C5 },
    158 	{ 0x12C8, 0x12D6 },
    159 	{ 0x12D8, 0x1310 },
    160 	{ 0x1312, 0x1315 },
    161 	{ 0x1318, 0x135A },
    162 	{ 0x1380, 0x138F },
    163 	{ 0x13A0, 0x13F4 },
    164 	{ 0x1401, 0x166C },
    165 	{ 0x166F, 0x167F },
    166 	{ 0x1681, 0x169A },
    167 	{ 0x16A0, 0x16EA },
    168 	{ 0x1700, 0x170C },
    169 	{ 0x170E, 0x1711 },
    170 	{ 0x1720, 0x1731 },
    171 	{ 0x1740, 0x1751 },
    172 	{ 0x1760, 0x176C },
    173 	{ 0x176E, 0x1770 },
    174 	{ 0x1780, 0x17B3 },
    175 	{ 0x1820, 0x1877 },
    176 	{ 0x1880, 0x18A8 },
    177 	{ 0x18B0, 0x18F5 },
    178 	{ 0x1900, 0x191C },
    179 	{ 0x1950, 0x196D },
    180 	{ 0x1970, 0x1974 },
    181 	{ 0x1980, 0x19AB },
    182 	{ 0x19C1, 0x19C7 },
    183 	{ 0x1A00, 0x1A16 },
    184 	{ 0x1A20, 0x1A54 },
    185 	{ 0x1B05, 0x1B33 },
    186 	{ 0x1B45, 0x1B4B },
    187 	{ 0x1B83, 0x1BA0 },
    188 	{ 0x1BAE, 0x1BAF },
    189 	{ 0x1BBA, 0x1BE5 },
    190 	{ 0x1C00, 0x1C23 },
    191 	{ 0x1C4D, 0x1C4F },
    192 	{ 0x1C5A, 0x1C7D },
    193 	{ 0x1CE9, 0x1CEC },
    194 	{ 0x1CEE, 0x1CF1 },
    195 	{ 0x1CF5, 0x1CF6 },
    196 	{ 0x1D00, 0x1DBF },
    197 	{ 0x1E00, 0x1F15 },
    198 	{ 0x1F18, 0x1F1D },
    199 	{ 0x1F20, 0x1F45 },
    200 	{ 0x1F48, 0x1F4D },
    201 	{ 0x1F50, 0x1F57 },
    202 	{ 0x1F5F, 0x1F7D },
    203 	{ 0x1F80, 0x1FB4 },
    204 	{ 0x1FB6, 0x1FBC },
    205 	{ 0x1FC2, 0x1FC4 },
    206 	{ 0x1FC6, 0x1FCC },
    207 	{ 0x1FD0, 0x1FD3 },
    208 	{ 0x1FD6, 0x1FDB },
    209 	{ 0x1FE0, 0x1FEC },
    210 	{ 0x1FF2, 0x1FF4 },
    211 	{ 0x1FF6, 0x1FFC },
    212 	{ 0x2090, 0x209C },
    213 	{ 0x210A, 0x2113 },
    214 	{ 0x2119, 0x211D },
    215 	{ 0x212A, 0x212D },
    216 	{ 0x212F, 0x2139 },
    217 	{ 0x213C, 0x213F },
    218 	{ 0x2145, 0x2149 },
    219 	{ 0x2183, 0x2184 },
    220 	{ 0x2C00, 0x2C2E },
    221 	{ 0x2C30, 0x2C5E },
    222 	{ 0x2C60, 0x2CE4 },
    223 	{ 0x2CEB, 0x2CEE },
    224 	{ 0x2CF2, 0x2CF3 },
    225 	{ 0x2D00, 0x2D25 },
    226 	{ 0x2D30, 0x2D67 },
    227 	{ 0x2D80, 0x2D96 },
    228 	{ 0x2DA0, 0x2DA6 },
    229 	{ 0x2DA8, 0x2DAE },
    230 	{ 0x2DB0, 0x2DB6 },
    231 	{ 0x2DB8, 0x2DBE },
    232 	{ 0x2DC0, 0x2DC6 },
    233 	{ 0x2DC8, 0x2DCE },
    234 	{ 0x2DD0, 0x2DD6 },
    235 	{ 0x2DD8, 0x2DDE },
    236 	{ 0x3005, 0x3006 },
    237 	{ 0x3031, 0x3035 },
    238 	{ 0x303B, 0x303C },
    239 	{ 0x3041, 0x3096 },
    240 	{ 0x309D, 0x309F },
    241 	{ 0x30A1, 0x30FA },
    242 	{ 0x30FC, 0x30FF },
    243 	{ 0x3105, 0x312D },
    244 	{ 0x3131, 0x318E },
    245 	{ 0x31A0, 0x31BA },
    246 	{ 0x31F0, 0x31FF },
    247 	{ 0xA000, 0xA48C },
    248 	{ 0xA4D0, 0xA4FD },
    249 	{ 0xA500, 0xA60C },
    250 	{ 0xA610, 0xA61F },
    251 	{ 0xA62A, 0xA62B },
    252 	{ 0xA640, 0xA66E },
    253 	{ 0xA67F, 0xA697 },
    254 	{ 0xA6A0, 0xA6E5 },
    255 	{ 0xA717, 0xA71F },
    256 	{ 0xA722, 0xA788 },
    257 	{ 0xA78B, 0xA78E },
    258 	{ 0xA790, 0xA793 },
    259 	{ 0xA7A0, 0xA7AA },
    260 	{ 0xA7F8, 0xA801 },
    261 	{ 0xA803, 0xA805 },
    262 	{ 0xA807, 0xA80A },
    263 	{ 0xA80C, 0xA822 },
    264 	{ 0xA840, 0xA873 },
    265 	{ 0xA882, 0xA8B3 },
    266 	{ 0xA8F2, 0xA8F7 },
    267 	{ 0xA90A, 0xA925 },
    268 	{ 0xA930, 0xA946 },
    269 	{ 0xA960, 0xA97C },
    270 	{ 0xA984, 0xA9B2 },
    271 	{ 0xAA00, 0xAA28 },
    272 	{ 0xAA40, 0xAA42 },
    273 	{ 0xAA44, 0xAA4B },
    274 	{ 0xAA60, 0xAA76 },
    275 	{ 0xAA80, 0xAAAF },
    276 	{ 0xAAB5, 0xAAB6 },
    277 	{ 0xAAB9, 0xAABD },
    278 	{ 0xAADB, 0xAADD },
    279 	{ 0xAAE0, 0xAAEA },
    280 	{ 0xAAF2, 0xAAF4 },
    281 	{ 0xAB01, 0xAB06 },
    282 	{ 0xAB09, 0xAB0E },
    283 	{ 0xAB11, 0xAB16 },
    284 	{ 0xAB20, 0xAB26 },
    285 	{ 0xAB28, 0xAB2E },
    286 	{ 0xABC0, 0xABE2 },
    287 	{ 0xD7B0, 0xD7C6 },
    288 	{ 0xD7CB, 0xD7FB },
    289 	{ 0xF900, 0xFA6D },
    290 	{ 0xFA70, 0xFAD9 },
    291 	{ 0xFB00, 0xFB06 },
    292 	{ 0xFB13, 0xFB17 },
    293 	{ 0xFB1F, 0xFB28 },
    294 	{ 0xFB2A, 0xFB36 },
    295 	{ 0xFB38, 0xFB3C },
    296 	{ 0xFB40, 0xFB41 },
    297 	{ 0xFB43, 0xFB44 },
    298 	{ 0xFB46, 0xFBB1 },
    299 	{ 0xFBD3, 0xFD3D },
    300 	{ 0xFD50, 0xFD8F },
    301 	{ 0xFD92, 0xFDC7 },
    302 	{ 0xFDF0, 0xFDFB },
    303 	{ 0xFE70, 0xFE74 },
    304 	{ 0xFE76, 0xFEFC },
    305 	{ 0xFF21, 0xFF3A },
    306 	{ 0xFF41, 0xFF5A },
    307 	{ 0xFF66, 0xFFBE },
    308 	{ 0xFFC2, 0xFFC7 },
    309 	{ 0xFFCA, 0xFFCF },
    310 	{ 0xFFD2, 0xFFD7 },
    311 	{ 0xFFDA, 0xFFDC },
    312 	{ 0x10000, 0x1000B },
    313 	{ 0x1000D, 0x10026 },
    314 	{ 0x10028, 0x1003A },
    315 	{ 0x1003C, 0x1003D },
    316 	{ 0x1003F, 0x1004D },
    317 	{ 0x10050, 0x1005D },
    318 	{ 0x10080, 0x100FA },
    319 	{ 0x10280, 0x1029C },
    320 	{ 0x102A0, 0x102D0 },
    321 	{ 0x10300, 0x1031E },
    322 	{ 0x10330, 0x10340 },
    323 	{ 0x10342, 0x10349 },
    324 	{ 0x10380, 0x1039D },
    325 	{ 0x103A0, 0x103C3 },
    326 	{ 0x103C8, 0x103CF },
    327 	{ 0x10400, 0x1049D },
    328 	{ 0x10800, 0x10805 },
    329 	{ 0x1080A, 0x10835 },
    330 	{ 0x10837, 0x10838 },
    331 	{ 0x1083F, 0x10855 },
    332 	{ 0x10900, 0x10915 },
    333 	{ 0x10920, 0x10939 },
    334 	{ 0x10980, 0x109B7 },
    335 	{ 0x109BE, 0x109BF },
    336 	{ 0x10A10, 0x10A13 },
    337 	{ 0x10A15, 0x10A17 },
    338 	{ 0x10A19, 0x10A33 },
    339 	{ 0x10A60, 0x10A7C },
    340 	{ 0x10B00, 0x10B35 },
    341 	{ 0x10B40, 0x10B55 },
    342 	{ 0x10B60, 0x10B72 },
    343 	{ 0x10C00, 0x10C48 },
    344 	{ 0x11003, 0x11037 },
    345 	{ 0x11083, 0x110AF },
    346 	{ 0x110D0, 0x110E8 },
    347 	{ 0x11103, 0x11126 },
    348 	{ 0x11183, 0x111B2 },
    349 	{ 0x111C1, 0x111C4 },
    350 	{ 0x11680, 0x116AA },
    351 	{ 0x12000, 0x1236E },
    352 	{ 0x13000, 0x1342E },
    353 	{ 0x16800, 0x16A38 },
    354 	{ 0x16F00, 0x16F44 },
    355 	{ 0x16F93, 0x16F9F },
    356 	{ 0x1B000, 0x1B001 },
    357 	{ 0x1D400, 0x1D454 },
    358 	{ 0x1D456, 0x1D49C },
    359 	{ 0x1D49E, 0x1D49F },
    360 	{ 0x1D4A5, 0x1D4A6 },
    361 	{ 0x1D4A9, 0x1D4AC },
    362 	{ 0x1D4AE, 0x1D4B9 },
    363 	{ 0x1D4BD, 0x1D4C3 },
    364 	{ 0x1D4C5, 0x1D505 },
    365 	{ 0x1D507, 0x1D50A },
    366 	{ 0x1D50D, 0x1D514 },
    367 	{ 0x1D516, 0x1D51C },
    368 	{ 0x1D51E, 0x1D539 },
    369 	{ 0x1D53B, 0x1D53E },
    370 	{ 0x1D540, 0x1D544 },
    371 	{ 0x1D54A, 0x1D550 },
    372 	{ 0x1D552, 0x1D6A5 },
    373 	{ 0x1D6A8, 0x1D6C0 },
    374 	{ 0x1D6C2, 0x1D6DA },
    375 	{ 0x1D6DC, 0x1D6FA },
    376 	{ 0x1D6FC, 0x1D714 },
    377 	{ 0x1D716, 0x1D734 },
    378 	{ 0x1D736, 0x1D74E },
    379 	{ 0x1D750, 0x1D76E },
    380 	{ 0x1D770, 0x1D788 },
    381 	{ 0x1D78A, 0x1D7A8 },
    382 	{ 0x1D7AA, 0x1D7C2 },
    383 	{ 0x1D7C4, 0x1D7CB },
    384 	{ 0x1EE00, 0x1EE03 },
    385 	{ 0x1EE05, 0x1EE1F },
    386 	{ 0x1EE21, 0x1EE22 },
    387 	{ 0x1EE29, 0x1EE32 },
    388 	{ 0x1EE34, 0x1EE37 },
    389 	{ 0x1EE4D, 0x1EE4F },
    390 	{ 0x1EE51, 0x1EE52 },
    391 	{ 0x1EE61, 0x1EE62 },
    392 	{ 0x1EE67, 0x1EE6A },
    393 	{ 0x1EE6C, 0x1EE72 },
    394 	{ 0x1EE74, 0x1EE77 },
    395 	{ 0x1EE79, 0x1EE7C },
    396 	{ 0x1EE80, 0x1EE89 },
    397 	{ 0x1EE8B, 0x1EE9B },
    398 	{ 0x1EEA1, 0x1EEA3 },
    399 	{ 0x1EEA5, 0x1EEA9 },
    400 	{ 0x1EEAB, 0x1EEBB },
    401 	{ 0x2F800, 0x2FA1D },
    402 };
    403 
    404 static Rune alpha1[] = {
    405 	0x00AA,
    406 	0x00B5,
    407 	0x00BA,
    408 	0x02EC,
    409 	0x02EE,
    410 	0x0386,
    411 	0x038C,
    412 	0x0559,
    413 	0x06D5,
    414 	0x06FF,
    415 	0x0710,
    416 	0x07B1,
    417 	0x07FA,
    418 	0x081A,
    419 	0x0824,
    420 	0x0828,
    421 	0x08A0,
    422 	0x093D,
    423 	0x0950,
    424 	0x09B2,
    425 	0x09BD,
    426 	0x09CE,
    427 	0x0A5E,
    428 	0x0ABD,
    429 	0x0AD0,
    430 	0x0B3D,
    431 	0x0B71,
    432 	0x0B83,
    433 	0x0B9C,
    434 	0x0BD0,
    435 	0x0C3D,
    436 	0x0CBD,
    437 	0x0CDE,
    438 	0x0D3D,
    439 	0x0D4E,
    440 	0x0DBD,
    441 	0x0E84,
    442 	0x0E8A,
    443 	0x0E8D,
    444 	0x0EA5,
    445 	0x0EA7,
    446 	0x0EBD,
    447 	0x0EC6,
    448 	0x0F00,
    449 	0x103F,
    450 	0x1061,
    451 	0x108E,
    452 	0x10C7,
    453 	0x10CD,
    454 	0x1258,
    455 	0x12C0,
    456 	0x17D7,
    457 	0x17DC,
    458 	0x18AA,
    459 	0x1AA7,
    460 	0x1F59,
    461 	0x1F5B,
    462 	0x1F5D,
    463 	0x1FBE,
    464 	0x2071,
    465 	0x207F,
    466 	0x2102,
    467 	0x2107,
    468 	0x2115,
    469 	0x2124,
    470 	0x2126,
    471 	0x2128,
    472 	0x214E,
    473 	0x2D27,
    474 	0x2D2D,
    475 	0x2D6F,
    476 	0x2E2F,
    477 	0x3400,
    478 	0x4DB5,
    479 	0x4E00,
    480 	0x9FCC,
    481 	0xA8FB,
    482 	0xA9CF,
    483 	0xAA7A,
    484 	0xAAB1,
    485 	0xAAC0,
    486 	0xAAC2,
    487 	0xAC00,
    488 	0xD7A3,
    489 	0xFB1D,
    490 	0xFB3E,
    491 	0x10808,
    492 	0x1083C,
    493 	0x10A00,
    494 	0x16F50,
    495 	0x1D4A2,
    496 	0x1D4BB,
    497 	0x1D546,
    498 	0x1EE24,
    499 	0x1EE27,
    500 	0x1EE39,
    501 	0x1EE3B,
    502 	0x1EE42,
    503 	0x1EE47,
    504 	0x1EE49,
    505 	0x1EE4B,
    506 	0x1EE54,
    507 	0x1EE57,
    508 	0x1EE59,
    509 	0x1EE5B,
    510 	0x1EE5D,
    511 	0x1EE5F,
    512 	0x1EE64,
    513 	0x1EE7E,
    514 	0x20000,
    515 	0x2A6D6,
    516 	0x2A700,
    517 	0x2B734,
    518 	0x2B740,
    519 	0x2B81D,
    520 };
    521 
    522 int
    523 isalpharune(Rune r)
    524 {
    525 	if(bsearch(&r, alpha2, nelem(alpha2), sizeof *alpha2, &rune2cmp))
    526 		return 1;
    527 	if(bsearch(&r, alpha1, nelem(alpha1), sizeof *alpha1, &rune1cmp))
    528 		return 1;
    529 	return 0;
    530 }
    531 
    532 static Rune space2[][2] = {
    533 	{ 0x2000, 0x200A },
    534 	{ 0x2028, 0x2029 },
    535 };
    536 
    537 static Rune space1[] = {
    538 	0x0020,
    539 	0x00A0,
    540 	0x1680,
    541 	0x180E,
    542 	0x202F,
    543 	0x205F,
    544 	0x3000,
    545 };
    546 
    547 int
    548 isspacerune(Rune r)
    549 {
    550 	if(bsearch(&r, space2, nelem(space2), sizeof *space2, &rune2cmp))
    551 		return 1;
    552 	if(bsearch(&r, space1, nelem(space1), sizeof *space1, &rune1cmp))
    553 		return 1;
    554 	return 0;
    555 }
    556 
    557 static Rune upper2[][2] = {
    558 	{ 0x0041, 0x005A },
    559 	{ 0x00C0, 0x00D6 },
    560 	{ 0x00D8, 0x00DE },
    561 	{ 0x0178, 0x0179 },
    562 	{ 0x0181, 0x0182 },
    563 	{ 0x0186, 0x0187 },
    564 	{ 0x0189, 0x018B },
    565 	{ 0x018E, 0x0191 },
    566 	{ 0x0193, 0x0194 },
    567 	{ 0x0196, 0x0198 },
    568 	{ 0x019C, 0x019D },
    569 	{ 0x019F, 0x01A0 },
    570 	{ 0x01A6, 0x01A7 },
    571 	{ 0x01AE, 0x01AF },
    572 	{ 0x01B1, 0x01B3 },
    573 	{ 0x01B7, 0x01B8 },
    574 	{ 0x01F6, 0x01F8 },
    575 	{ 0x023A, 0x023B },
    576 	{ 0x023D, 0x023E },
    577 	{ 0x0243, 0x0246 },
    578 	{ 0x0388, 0x038A },
    579 	{ 0x038E, 0x038F },
    580 	{ 0x0391, 0x03A1 },
    581 	{ 0x03A3, 0x03AB },
    582 	{ 0x03D2, 0x03D4 },
    583 	{ 0x03F9, 0x03FA },
    584 	{ 0x03FD, 0x042F },
    585 	{ 0x04C0, 0x04C1 },
    586 	{ 0x0531, 0x0556 },
    587 	{ 0x10A0, 0x10C5 },
    588 	{ 0x1F08, 0x1F0F },
    589 	{ 0x1F18, 0x1F1D },
    590 	{ 0x1F28, 0x1F2F },
    591 	{ 0x1F38, 0x1F3F },
    592 	{ 0x1F48, 0x1F4D },
    593 	{ 0x1F68, 0x1F6F },
    594 	{ 0x1FB8, 0x1FBB },
    595 	{ 0x1FC8, 0x1FCB },
    596 	{ 0x1FD8, 0x1FDB },
    597 	{ 0x1FE8, 0x1FEC },
    598 	{ 0x1FF8, 0x1FFB },
    599 	{ 0x210B, 0x210D },
    600 	{ 0x2110, 0x2112 },
    601 	{ 0x2119, 0x211D },
    602 	{ 0x212A, 0x212D },
    603 	{ 0x2130, 0x2133 },
    604 	{ 0x213E, 0x213F },
    605 	{ 0x2C00, 0x2C2E },
    606 	{ 0x2C62, 0x2C64 },
    607 	{ 0x2C6D, 0x2C70 },
    608 	{ 0x2C7E, 0x2C80 },
    609 	{ 0xA77D, 0xA77E },
    610 	{ 0xFF21, 0xFF3A },
    611 	{ 0x10400, 0x10427 },
    612 	{ 0x1D400, 0x1D419 },
    613 	{ 0x1D434, 0x1D44D },
    614 	{ 0x1D468, 0x1D481 },
    615 	{ 0x1D49E, 0x1D49F },
    616 	{ 0x1D4A5, 0x1D4A6 },
    617 	{ 0x1D4A9, 0x1D4AC },
    618 	{ 0x1D4AE, 0x1D4B5 },
    619 	{ 0x1D4D0, 0x1D4E9 },
    620 	{ 0x1D504, 0x1D505 },
    621 	{ 0x1D507, 0x1D50A },
    622 	{ 0x1D50D, 0x1D514 },
    623 	{ 0x1D516, 0x1D51C },
    624 	{ 0x1D538, 0x1D539 },
    625 	{ 0x1D53B, 0x1D53E },
    626 	{ 0x1D540, 0x1D544 },
    627 	{ 0x1D54A, 0x1D550 },
    628 	{ 0x1D56C, 0x1D585 },
    629 	{ 0x1D5A0, 0x1D5B9 },
    630 	{ 0x1D5D4, 0x1D5ED },
    631 	{ 0x1D608, 0x1D621 },
    632 	{ 0x1D63C, 0x1D655 },
    633 	{ 0x1D670, 0x1D689 },
    634 	{ 0x1D6A8, 0x1D6C0 },
    635 	{ 0x1D6E2, 0x1D6FA },
    636 	{ 0x1D71C, 0x1D734 },
    637 	{ 0x1D756, 0x1D76E },
    638 	{ 0x1D790, 0x1D7A8 },
    639 };
    640 
    641 static Rune upper1[] = {
    642 	0x0100,
    643 	0x0102,
    644 	0x0104,
    645 	0x0106,
    646 	0x0108,
    647 	0x010A,
    648 	0x010C,
    649 	0x010E,
    650 	0x0110,
    651 	0x0112,
    652 	0x0114,
    653 	0x0116,
    654 	0x0118,
    655 	0x011A,
    656 	0x011C,
    657 	0x011E,
    658 	0x0120,
    659 	0x0122,
    660 	0x0124,
    661 	0x0126,
    662 	0x0128,
    663 	0x012A,
    664 	0x012C,
    665 	0x012E,
    666 	0x0130,
    667 	0x0132,
    668 	0x0134,
    669 	0x0136,
    670 	0x0139,
    671 	0x013B,
    672 	0x013D,
    673 	0x013F,
    674 	0x0141,
    675 	0x0143,
    676 	0x0145,
    677 	0x0147,
    678 	0x014A,
    679 	0x014C,
    680 	0x014E,
    681 	0x0150,
    682 	0x0152,
    683 	0x0154,
    684 	0x0156,
    685 	0x0158,
    686 	0x015A,
    687 	0x015C,
    688 	0x015E,
    689 	0x0160,
    690 	0x0162,
    691 	0x0164,
    692 	0x0166,
    693 	0x0168,
    694 	0x016A,
    695 	0x016C,
    696 	0x016E,
    697 	0x0170,
    698 	0x0172,
    699 	0x0174,
    700 	0x0176,
    701 	0x017B,
    702 	0x017D,
    703 	0x0184,
    704 	0x01A2,
    705 	0x01A4,
    706 	0x01A9,
    707 	0x01AC,
    708 	0x01B5,
    709 	0x01BC,
    710 	0x01C4,
    711 	0x01C7,
    712 	0x01CA,
    713 	0x01CD,
    714 	0x01CF,
    715 	0x01D1,
    716 	0x01D3,
    717 	0x01D5,
    718 	0x01D7,
    719 	0x01D9,
    720 	0x01DB,
    721 	0x01DE,
    722 	0x01E0,
    723 	0x01E2,
    724 	0x01E4,
    725 	0x01E6,
    726 	0x01E8,
    727 	0x01EA,
    728 	0x01EC,
    729 	0x01EE,
    730 	0x01F1,
    731 	0x01F4,
    732 	0x01FA,
    733 	0x01FC,
    734 	0x01FE,
    735 	0x0200,
    736 	0x0202,
    737 	0x0204,
    738 	0x0206,
    739 	0x0208,
    740 	0x020A,
    741 	0x020C,
    742 	0x020E,
    743 	0x0210,
    744 	0x0212,
    745 	0x0214,
    746 	0x0216,
    747 	0x0218,
    748 	0x021A,
    749 	0x021C,
    750 	0x021E,
    751 	0x0220,
    752 	0x0222,
    753 	0x0224,
    754 	0x0226,
    755 	0x0228,
    756 	0x022A,
    757 	0x022C,
    758 	0x022E,
    759 	0x0230,
    760 	0x0232,
    761 	0x0241,
    762 	0x0248,
    763 	0x024A,
    764 	0x024C,
    765 	0x024E,
    766 	0x0370,
    767 	0x0372,
    768 	0x0376,
    769 	0x0386,
    770 	0x038C,
    771 	0x03CF,
    772 	0x03D8,
    773 	0x03DA,
    774 	0x03DC,
    775 	0x03DE,
    776 	0x03E0,
    777 	0x03E2,
    778 	0x03E4,
    779 	0x03E6,
    780 	0x03E8,
    781 	0x03EA,
    782 	0x03EC,
    783 	0x03EE,
    784 	0x03F4,
    785 	0x03F7,
    786 	0x0460,
    787 	0x0462,
    788 	0x0464,
    789 	0x0466,
    790 	0x0468,
    791 	0x046A,
    792 	0x046C,
    793 	0x046E,
    794 	0x0470,
    795 	0x0472,
    796 	0x0474,
    797 	0x0476,
    798 	0x0478,
    799 	0x047A,
    800 	0x047C,
    801 	0x047E,
    802 	0x0480,
    803 	0x048A,
    804 	0x048C,
    805 	0x048E,
    806 	0x0490,
    807 	0x0492,
    808 	0x0494,
    809 	0x0496,
    810 	0x0498,
    811 	0x049A,
    812 	0x049C,
    813 	0x049E,
    814 	0x04A0,
    815 	0x04A2,
    816 	0x04A4,
    817 	0x04A6,
    818 	0x04A8,
    819 	0x04AA,
    820 	0x04AC,
    821 	0x04AE,
    822 	0x04B0,
    823 	0x04B2,
    824 	0x04B4,
    825 	0x04B6,
    826 	0x04B8,
    827 	0x04BA,
    828 	0x04BC,
    829 	0x04BE,
    830 	0x04C3,
    831 	0x04C5,
    832 	0x04C7,
    833 	0x04C9,
    834 	0x04CB,
    835 	0x04CD,
    836 	0x04D0,
    837 	0x04D2,
    838 	0x04D4,
    839 	0x04D6,
    840 	0x04D8,
    841 	0x04DA,
    842 	0x04DC,
    843 	0x04DE,
    844 	0x04E0,
    845 	0x04E2,
    846 	0x04E4,
    847 	0x04E6,
    848 	0x04E8,
    849 	0x04EA,
    850 	0x04EC,
    851 	0x04EE,
    852 	0x04F0,
    853 	0x04F2,
    854 	0x04F4,
    855 	0x04F6,
    856 	0x04F8,
    857 	0x04FA,
    858 	0x04FC,
    859 	0x04FE,
    860 	0x0500,
    861 	0x0502,
    862 	0x0504,
    863 	0x0506,
    864 	0x0508,
    865 	0x050A,
    866 	0x050C,
    867 	0x050E,
    868 	0x0510,
    869 	0x0512,
    870 	0x0514,
    871 	0x0516,
    872 	0x0518,
    873 	0x051A,
    874 	0x051C,
    875 	0x051E,
    876 	0x0520,
    877 	0x0522,
    878 	0x0524,
    879 	0x0526,
    880 	0x10C7,
    881 	0x10CD,
    882 	0x1E00,
    883 	0x1E02,
    884 	0x1E04,
    885 	0x1E06,
    886 	0x1E08,
    887 	0x1E0A,
    888 	0x1E0C,
    889 	0x1E0E,
    890 	0x1E10,
    891 	0x1E12,
    892 	0x1E14,
    893 	0x1E16,
    894 	0x1E18,
    895 	0x1E1A,
    896 	0x1E1C,
    897 	0x1E1E,
    898 	0x1E20,
    899 	0x1E22,
    900 	0x1E24,
    901 	0x1E26,
    902 	0x1E28,
    903 	0x1E2A,
    904 	0x1E2C,
    905 	0x1E2E,
    906 	0x1E30,
    907 	0x1E32,
    908 	0x1E34,
    909 	0x1E36,
    910 	0x1E38,
    911 	0x1E3A,
    912 	0x1E3C,
    913 	0x1E3E,
    914 	0x1E40,
    915 	0x1E42,
    916 	0x1E44,
    917 	0x1E46,
    918 	0x1E48,
    919 	0x1E4A,
    920 	0x1E4C,
    921 	0x1E4E,
    922 	0x1E50,
    923 	0x1E52,
    924 	0x1E54,
    925 	0x1E56,
    926 	0x1E58,
    927 	0x1E5A,
    928 	0x1E5C,
    929 	0x1E5E,
    930 	0x1E60,
    931 	0x1E62,
    932 	0x1E64,
    933 	0x1E66,
    934 	0x1E68,
    935 	0x1E6A,
    936 	0x1E6C,
    937 	0x1E6E,
    938 	0x1E70,
    939 	0x1E72,
    940 	0x1E74,
    941 	0x1E76,
    942 	0x1E78,
    943 	0x1E7A,
    944 	0x1E7C,
    945 	0x1E7E,
    946 	0x1E80,
    947 	0x1E82,
    948 	0x1E84,
    949 	0x1E86,
    950 	0x1E88,
    951 	0x1E8A,
    952 	0x1E8C,
    953 	0x1E8E,
    954 	0x1E90,
    955 	0x1E92,
    956 	0x1E94,
    957 	0x1E9E,
    958 	0x1EA0,
    959 	0x1EA2,
    960 	0x1EA4,
    961 	0x1EA6,
    962 	0x1EA8,
    963 	0x1EAA,
    964 	0x1EAC,
    965 	0x1EAE,
    966 	0x1EB0,
    967 	0x1EB2,
    968 	0x1EB4,
    969 	0x1EB6,
    970 	0x1EB8,
    971 	0x1EBA,
    972 	0x1EBC,
    973 	0x1EBE,
    974 	0x1EC0,
    975 	0x1EC2,
    976 	0x1EC4,
    977 	0x1EC6,
    978 	0x1EC8,
    979 	0x1ECA,
    980 	0x1ECC,
    981 	0x1ECE,
    982 	0x1ED0,
    983 	0x1ED2,
    984 	0x1ED4,
    985 	0x1ED6,
    986 	0x1ED8,
    987 	0x1EDA,
    988 	0x1EDC,
    989 	0x1EDE,
    990 	0x1EE0,
    991 	0x1EE2,
    992 	0x1EE4,
    993 	0x1EE6,
    994 	0x1EE8,
    995 	0x1EEA,
    996 	0x1EEC,
    997 	0x1EEE,
    998 	0x1EF0,
    999 	0x1EF2,
   1000 	0x1EF4,
   1001 	0x1EF6,
   1002 	0x1EF8,
   1003 	0x1EFA,
   1004 	0x1EFC,
   1005 	0x1EFE,
   1006 	0x1F59,
   1007 	0x1F5B,
   1008 	0x1F5D,
   1009 	0x1F5F,
   1010 	0x2102,
   1011 	0x2107,
   1012 	0x2115,
   1013 	0x2124,
   1014 	0x2126,
   1015 	0x2128,
   1016 	0x2145,
   1017 	0x2183,
   1018 	0x2C60,
   1019 	0x2C67,
   1020 	0x2C69,
   1021 	0x2C6B,
   1022 	0x2C72,
   1023 	0x2C75,
   1024 	0x2C82,
   1025 	0x2C84,
   1026 	0x2C86,
   1027 	0x2C88,
   1028 	0x2C8A,
   1029 	0x2C8C,
   1030 	0x2C8E,
   1031 	0x2C90,
   1032 	0x2C92,
   1033 	0x2C94,
   1034 	0x2C96,
   1035 	0x2C98,
   1036 	0x2C9A,
   1037 	0x2C9C,
   1038 	0x2C9E,
   1039 	0x2CA0,
   1040 	0x2CA2,
   1041 	0x2CA4,
   1042 	0x2CA6,
   1043 	0x2CA8,
   1044 	0x2CAA,
   1045 	0x2CAC,
   1046 	0x2CAE,
   1047 	0x2CB0,
   1048 	0x2CB2,
   1049 	0x2CB4,
   1050 	0x2CB6,
   1051 	0x2CB8,
   1052 	0x2CBA,
   1053 	0x2CBC,
   1054 	0x2CBE,
   1055 	0x2CC0,
   1056 	0x2CC2,
   1057 	0x2CC4,
   1058 	0x2CC6,
   1059 	0x2CC8,
   1060 	0x2CCA,
   1061 	0x2CCC,
   1062 	0x2CCE,
   1063 	0x2CD0,
   1064 	0x2CD2,
   1065 	0x2CD4,
   1066 	0x2CD6,
   1067 	0x2CD8,
   1068 	0x2CDA,
   1069 	0x2CDC,
   1070 	0x2CDE,
   1071 	0x2CE0,
   1072 	0x2CE2,
   1073 	0x2CEB,
   1074 	0x2CED,
   1075 	0x2CF2,
   1076 	0xA640,
   1077 	0xA642,
   1078 	0xA644,
   1079 	0xA646,
   1080 	0xA648,
   1081 	0xA64A,
   1082 	0xA64C,
   1083 	0xA64E,
   1084 	0xA650,
   1085 	0xA652,
   1086 	0xA654,
   1087 	0xA656,
   1088 	0xA658,
   1089 	0xA65A,
   1090 	0xA65C,
   1091 	0xA65E,
   1092 	0xA660,
   1093 	0xA662,
   1094 	0xA664,
   1095 	0xA666,
   1096 	0xA668,
   1097 	0xA66A,
   1098 	0xA66C,
   1099 	0xA680,
   1100 	0xA682,
   1101 	0xA684,
   1102 	0xA686,
   1103 	0xA688,
   1104 	0xA68A,
   1105 	0xA68C,
   1106 	0xA68E,
   1107 	0xA690,
   1108 	0xA692,
   1109 	0xA694,
   1110 	0xA696,
   1111 	0xA722,
   1112 	0xA724,
   1113 	0xA726,
   1114 	0xA728,
   1115 	0xA72A,
   1116 	0xA72C,
   1117 	0xA72E,
   1118 	0xA732,
   1119 	0xA734,
   1120 	0xA736,
   1121 	0xA738,
   1122 	0xA73A,
   1123 	0xA73C,
   1124 	0xA73E,
   1125 	0xA740,
   1126 	0xA742,
   1127 	0xA744,
   1128 	0xA746,
   1129 	0xA748,
   1130 	0xA74A,
   1131 	0xA74C,
   1132 	0xA74E,
   1133 	0xA750,
   1134 	0xA752,
   1135 	0xA754,
   1136 	0xA756,
   1137 	0xA758,
   1138 	0xA75A,
   1139 	0xA75C,
   1140 	0xA75E,
   1141 	0xA760,
   1142 	0xA762,
   1143 	0xA764,
   1144 	0xA766,
   1145 	0xA768,
   1146 	0xA76A,
   1147 	0xA76C,
   1148 	0xA76E,
   1149 	0xA779,
   1150 	0xA77B,
   1151 	0xA780,
   1152 	0xA782,
   1153 	0xA784,
   1154 	0xA786,
   1155 	0xA78B,
   1156 	0xA78D,
   1157 	0xA790,
   1158 	0xA792,
   1159 	0xA7A0,
   1160 	0xA7A2,
   1161 	0xA7A4,
   1162 	0xA7A6,
   1163 	0xA7A8,
   1164 	0xA7AA,
   1165 	0x1D49C,
   1166 	0x1D4A2,
   1167 	0x1D546,
   1168 	0x1D7CA,
   1169 };
   1170 
   1171 int
   1172 isupperrune(Rune r)
   1173 {
   1174 	if(bsearch(&r, upper2, nelem(upper2), sizeof *upper2, &rune2cmp))
   1175 		return 1;
   1176 	if(bsearch(&r, upper1, nelem(upper1), sizeof *upper1, &rune1cmp))
   1177 		return 1;
   1178 	return 0;
   1179 }
   1180 
   1181 static Rune lower2[][2] = {
   1182 	{ 0x0061, 0x007A },
   1183 	{ 0x00DF, 0x00F6 },
   1184 	{ 0x00F8, 0x00FF },
   1185 	{ 0x0137, 0x0138 },
   1186 	{ 0x0148, 0x0149 },
   1187 	{ 0x017E, 0x0180 },
   1188 	{ 0x018C, 0x018D },
   1189 	{ 0x0199, 0x019B },
   1190 	{ 0x01AA, 0x01AB },
   1191 	{ 0x01B9, 0x01BA },
   1192 	{ 0x01BD, 0x01BF },
   1193 	{ 0x01DC, 0x01DD },
   1194 	{ 0x01EF, 0x01F0 },
   1195 	{ 0x0233, 0x0239 },
   1196 	{ 0x023F, 0x0240 },
   1197 	{ 0x024F, 0x0293 },
   1198 	{ 0x0295, 0x02AF },
   1199 	{ 0x037B, 0x037D },
   1200 	{ 0x03AC, 0x03CE },
   1201 	{ 0x03D0, 0x03D1 },
   1202 	{ 0x03D5, 0x03D7 },
   1203 	{ 0x03EF, 0x03F3 },
   1204 	{ 0x03FB, 0x03FC },
   1205 	{ 0x0430, 0x045F },
   1206 	{ 0x04CE, 0x04CF },
   1207 	{ 0x0561, 0x0587 },
   1208 	{ 0x1D00, 0x1D2B },
   1209 	{ 0x1D6B, 0x1D77 },
   1210 	{ 0x1D79, 0x1D9A },
   1211 	{ 0x1E95, 0x1E9D },
   1212 	{ 0x1EFF, 0x1F07 },
   1213 	{ 0x1F10, 0x1F15 },
   1214 	{ 0x1F20, 0x1F27 },
   1215 	{ 0x1F30, 0x1F37 },
   1216 	{ 0x1F40, 0x1F45 },
   1217 	{ 0x1F50, 0x1F57 },
   1218 	{ 0x1F60, 0x1F67 },
   1219 	{ 0x1F70, 0x1F7D },
   1220 	{ 0x1F80, 0x1F87 },
   1221 	{ 0x1F90, 0x1F97 },
   1222 	{ 0x1FA0, 0x1FA7 },
   1223 	{ 0x1FB0, 0x1FB4 },
   1224 	{ 0x1FB6, 0x1FB7 },
   1225 	{ 0x1FC2, 0x1FC4 },
   1226 	{ 0x1FC6, 0x1FC7 },
   1227 	{ 0x1FD0, 0x1FD3 },
   1228 	{ 0x1FD6, 0x1FD7 },
   1229 	{ 0x1FE0, 0x1FE7 },
   1230 	{ 0x1FF2, 0x1FF4 },
   1231 	{ 0x1FF6, 0x1FF7 },
   1232 	{ 0x210E, 0x210F },
   1233 	{ 0x213C, 0x213D },
   1234 	{ 0x2146, 0x2149 },
   1235 	{ 0x2C30, 0x2C5E },
   1236 	{ 0x2C65, 0x2C66 },
   1237 	{ 0x2C73, 0x2C74 },
   1238 	{ 0x2C76, 0x2C7B },
   1239 	{ 0x2CE3, 0x2CE4 },
   1240 	{ 0x2D00, 0x2D25 },
   1241 	{ 0xA72F, 0xA731 },
   1242 	{ 0xA771, 0xA778 },
   1243 	{ 0xFB00, 0xFB06 },
   1244 	{ 0xFB13, 0xFB17 },
   1245 	{ 0xFF41, 0xFF5A },
   1246 	{ 0x10428, 0x1044F },
   1247 	{ 0x1D41A, 0x1D433 },
   1248 	{ 0x1D44E, 0x1D454 },
   1249 	{ 0x1D456, 0x1D467 },
   1250 	{ 0x1D482, 0x1D49B },
   1251 	{ 0x1D4B6, 0x1D4B9 },
   1252 	{ 0x1D4BD, 0x1D4C3 },
   1253 	{ 0x1D4C5, 0x1D4CF },
   1254 	{ 0x1D4EA, 0x1D503 },
   1255 	{ 0x1D51E, 0x1D537 },
   1256 	{ 0x1D552, 0x1D56B },
   1257 	{ 0x1D586, 0x1D59F },
   1258 	{ 0x1D5BA, 0x1D5D3 },
   1259 	{ 0x1D5EE, 0x1D607 },
   1260 	{ 0x1D622, 0x1D63B },
   1261 	{ 0x1D656, 0x1D66F },
   1262 	{ 0x1D68A, 0x1D6A5 },
   1263 	{ 0x1D6C2, 0x1D6DA },
   1264 	{ 0x1D6DC, 0x1D6E1 },
   1265 	{ 0x1D6FC, 0x1D714 },
   1266 	{ 0x1D716, 0x1D71B },
   1267 	{ 0x1D736, 0x1D74E },
   1268 	{ 0x1D750, 0x1D755 },
   1269 	{ 0x1D770, 0x1D788 },
   1270 	{ 0x1D78A, 0x1D78F },
   1271 	{ 0x1D7AA, 0x1D7C2 },
   1272 	{ 0x1D7C4, 0x1D7C9 },
   1273 };
   1274 
   1275 static Rune lower1[] = {
   1276 	0x00B5,
   1277 	0x0101,
   1278 	0x0103,
   1279 	0x0105,
   1280 	0x0107,
   1281 	0x0109,
   1282 	0x010B,
   1283 	0x010D,
   1284 	0x010F,
   1285 	0x0111,
   1286 	0x0113,
   1287 	0x0115,
   1288 	0x0117,
   1289 	0x0119,
   1290 	0x011B,
   1291 	0x011D,
   1292 	0x011F,
   1293 	0x0121,
   1294 	0x0123,
   1295 	0x0125,
   1296 	0x0127,
   1297 	0x0129,
   1298 	0x012B,
   1299 	0x012D,
   1300 	0x012F,
   1301 	0x0131,
   1302 	0x0133,
   1303 	0x0135,
   1304 	0x013A,
   1305 	0x013C,
   1306 	0x013E,
   1307 	0x0140,
   1308 	0x0142,
   1309 	0x0144,
   1310 	0x0146,
   1311 	0x014B,
   1312 	0x014D,
   1313 	0x014F,
   1314 	0x0151,
   1315 	0x0153,
   1316 	0x0155,
   1317 	0x0157,
   1318 	0x0159,
   1319 	0x015B,
   1320 	0x015D,
   1321 	0x015F,
   1322 	0x0161,
   1323 	0x0163,
   1324 	0x0165,
   1325 	0x0167,
   1326 	0x0169,
   1327 	0x016B,
   1328 	0x016D,
   1329 	0x016F,
   1330 	0x0171,
   1331 	0x0173,
   1332 	0x0175,
   1333 	0x0177,
   1334 	0x017A,
   1335 	0x017C,
   1336 	0x0183,
   1337 	0x0185,
   1338 	0x0188,
   1339 	0x0192,
   1340 	0x0195,
   1341 	0x019E,
   1342 	0x01A1,
   1343 	0x01A3,
   1344 	0x01A5,
   1345 	0x01A8,
   1346 	0x01AD,
   1347 	0x01B0,
   1348 	0x01B4,
   1349 	0x01B6,
   1350 	0x01C6,
   1351 	0x01C9,
   1352 	0x01CC,
   1353 	0x01CE,
   1354 	0x01D0,
   1355 	0x01D2,
   1356 	0x01D4,
   1357 	0x01D6,
   1358 	0x01D8,
   1359 	0x01DA,
   1360 	0x01DF,
   1361 	0x01E1,
   1362 	0x01E3,
   1363 	0x01E5,
   1364 	0x01E7,
   1365 	0x01E9,
   1366 	0x01EB,
   1367 	0x01ED,
   1368 	0x01F3,
   1369 	0x01F5,
   1370 	0x01F9,
   1371 	0x01FB,
   1372 	0x01FD,
   1373 	0x01FF,
   1374 	0x0201,
   1375 	0x0203,
   1376 	0x0205,
   1377 	0x0207,
   1378 	0x0209,
   1379 	0x020B,
   1380 	0x020D,
   1381 	0x020F,
   1382 	0x0211,
   1383 	0x0213,
   1384 	0x0215,
   1385 	0x0217,
   1386 	0x0219,
   1387 	0x021B,
   1388 	0x021D,
   1389 	0x021F,
   1390 	0x0221,
   1391 	0x0223,
   1392 	0x0225,
   1393 	0x0227,
   1394 	0x0229,
   1395 	0x022B,
   1396 	0x022D,
   1397 	0x022F,
   1398 	0x0231,
   1399 	0x023C,
   1400 	0x0242,
   1401 	0x0247,
   1402 	0x0249,
   1403 	0x024B,
   1404 	0x024D,
   1405 	0x0371,
   1406 	0x0373,
   1407 	0x0377,
   1408 	0x0390,
   1409 	0x03D9,
   1410 	0x03DB,
   1411 	0x03DD,
   1412 	0x03DF,
   1413 	0x03E1,
   1414 	0x03E3,
   1415 	0x03E5,
   1416 	0x03E7,
   1417 	0x03E9,
   1418 	0x03EB,
   1419 	0x03ED,
   1420 	0x03F5,
   1421 	0x03F8,
   1422 	0x0461,
   1423 	0x0463,
   1424 	0x0465,
   1425 	0x0467,
   1426 	0x0469,
   1427 	0x046B,
   1428 	0x046D,
   1429 	0x046F,
   1430 	0x0471,
   1431 	0x0473,
   1432 	0x0475,
   1433 	0x0477,
   1434 	0x0479,
   1435 	0x047B,
   1436 	0x047D,
   1437 	0x047F,
   1438 	0x0481,
   1439 	0x048B,
   1440 	0x048D,
   1441 	0x048F,
   1442 	0x0491,
   1443 	0x0493,
   1444 	0x0495,
   1445 	0x0497,
   1446 	0x0499,
   1447 	0x049B,
   1448 	0x049D,
   1449 	0x049F,
   1450 	0x04A1,
   1451 	0x04A3,
   1452 	0x04A5,
   1453 	0x04A7,
   1454 	0x04A9,
   1455 	0x04AB,
   1456 	0x04AD,
   1457 	0x04AF,
   1458 	0x04B1,
   1459 	0x04B3,
   1460 	0x04B5,
   1461 	0x04B7,
   1462 	0x04B9,
   1463 	0x04BB,
   1464 	0x04BD,
   1465 	0x04BF,
   1466 	0x04C2,
   1467 	0x04C4,
   1468 	0x04C6,
   1469 	0x04C8,
   1470 	0x04CA,
   1471 	0x04CC,
   1472 	0x04D1,
   1473 	0x04D3,
   1474 	0x04D5,
   1475 	0x04D7,
   1476 	0x04D9,
   1477 	0x04DB,
   1478 	0x04DD,
   1479 	0x04DF,
   1480 	0x04E1,
   1481 	0x04E3,
   1482 	0x04E5,
   1483 	0x04E7,
   1484 	0x04E9,
   1485 	0x04EB,
   1486 	0x04ED,
   1487 	0x04EF,
   1488 	0x04F1,
   1489 	0x04F3,
   1490 	0x04F5,
   1491 	0x04F7,
   1492 	0x04F9,
   1493 	0x04FB,
   1494 	0x04FD,
   1495 	0x04FF,
   1496 	0x0501,
   1497 	0x0503,
   1498 	0x0505,
   1499 	0x0507,
   1500 	0x0509,
   1501 	0x050B,
   1502 	0x050D,
   1503 	0x050F,
   1504 	0x0511,
   1505 	0x0513,
   1506 	0x0515,
   1507 	0x0517,
   1508 	0x0519,
   1509 	0x051B,
   1510 	0x051D,
   1511 	0x051F,
   1512 	0x0521,
   1513 	0x0523,
   1514 	0x0525,
   1515 	0x0527,
   1516 	0x1E01,
   1517 	0x1E03,
   1518 	0x1E05,
   1519 	0x1E07,
   1520 	0x1E09,
   1521 	0x1E0B,
   1522 	0x1E0D,
   1523 	0x1E0F,
   1524 	0x1E11,
   1525 	0x1E13,
   1526 	0x1E15,
   1527 	0x1E17,
   1528 	0x1E19,
   1529 	0x1E1B,
   1530 	0x1E1D,
   1531 	0x1E1F,
   1532 	0x1E21,
   1533 	0x1E23,
   1534 	0x1E25,
   1535 	0x1E27,
   1536 	0x1E29,
   1537 	0x1E2B,
   1538 	0x1E2D,
   1539 	0x1E2F,
   1540 	0x1E31,
   1541 	0x1E33,
   1542 	0x1E35,
   1543 	0x1E37,
   1544 	0x1E39,
   1545 	0x1E3B,
   1546 	0x1E3D,
   1547 	0x1E3F,
   1548 	0x1E41,
   1549 	0x1E43,
   1550 	0x1E45,
   1551 	0x1E47,
   1552 	0x1E49,
   1553 	0x1E4B,
   1554 	0x1E4D,
   1555 	0x1E4F,
   1556 	0x1E51,
   1557 	0x1E53,
   1558 	0x1E55,
   1559 	0x1E57,
   1560 	0x1E59,
   1561 	0x1E5B,
   1562 	0x1E5D,
   1563 	0x1E5F,
   1564 	0x1E61,
   1565 	0x1E63,
   1566 	0x1E65,
   1567 	0x1E67,
   1568 	0x1E69,
   1569 	0x1E6B,
   1570 	0x1E6D,
   1571 	0x1E6F,
   1572 	0x1E71,
   1573 	0x1E73,
   1574 	0x1E75,
   1575 	0x1E77,
   1576 	0x1E79,
   1577 	0x1E7B,
   1578 	0x1E7D,
   1579 	0x1E7F,
   1580 	0x1E81,
   1581 	0x1E83,
   1582 	0x1E85,
   1583 	0x1E87,
   1584 	0x1E89,
   1585 	0x1E8B,
   1586 	0x1E8D,
   1587 	0x1E8F,
   1588 	0x1E91,
   1589 	0x1E93,
   1590 	0x1E9F,
   1591 	0x1EA1,
   1592 	0x1EA3,
   1593 	0x1EA5,
   1594 	0x1EA7,
   1595 	0x1EA9,
   1596 	0x1EAB,
   1597 	0x1EAD,
   1598 	0x1EAF,
   1599 	0x1EB1,
   1600 	0x1EB3,
   1601 	0x1EB5,
   1602 	0x1EB7,
   1603 	0x1EB9,
   1604 	0x1EBB,
   1605 	0x1EBD,
   1606 	0x1EBF,
   1607 	0x1EC1,
   1608 	0x1EC3,
   1609 	0x1EC5,
   1610 	0x1EC7,
   1611 	0x1EC9,
   1612 	0x1ECB,
   1613 	0x1ECD,
   1614 	0x1ECF,
   1615 	0x1ED1,
   1616 	0x1ED3,
   1617 	0x1ED5,
   1618 	0x1ED7,
   1619 	0x1ED9,
   1620 	0x1EDB,
   1621 	0x1EDD,
   1622 	0x1EDF,
   1623 	0x1EE1,
   1624 	0x1EE3,
   1625 	0x1EE5,
   1626 	0x1EE7,
   1627 	0x1EE9,
   1628 	0x1EEB,
   1629 	0x1EED,
   1630 	0x1EEF,
   1631 	0x1EF1,
   1632 	0x1EF3,
   1633 	0x1EF5,
   1634 	0x1EF7,
   1635 	0x1EF9,
   1636 	0x1EFB,
   1637 	0x1EFD,
   1638 	0x1FBE,
   1639 	0x210A,
   1640 	0x2113,
   1641 	0x212F,
   1642 	0x2134,
   1643 	0x2139,
   1644 	0x214E,
   1645 	0x2184,
   1646 	0x2C61,
   1647 	0x2C68,
   1648 	0x2C6A,
   1649 	0x2C6C,
   1650 	0x2C71,
   1651 	0x2C81,
   1652 	0x2C83,
   1653 	0x2C85,
   1654 	0x2C87,
   1655 	0x2C89,
   1656 	0x2C8B,
   1657 	0x2C8D,
   1658 	0x2C8F,
   1659 	0x2C91,
   1660 	0x2C93,
   1661 	0x2C95,
   1662 	0x2C97,
   1663 	0x2C99,
   1664 	0x2C9B,
   1665 	0x2C9D,
   1666 	0x2C9F,
   1667 	0x2CA1,
   1668 	0x2CA3,
   1669 	0x2CA5,
   1670 	0x2CA7,
   1671 	0x2CA9,
   1672 	0x2CAB,
   1673 	0x2CAD,
   1674 	0x2CAF,
   1675 	0x2CB1,
   1676 	0x2CB3,
   1677 	0x2CB5,
   1678 	0x2CB7,
   1679 	0x2CB9,
   1680 	0x2CBB,
   1681 	0x2CBD,
   1682 	0x2CBF,
   1683 	0x2CC1,
   1684 	0x2CC3,
   1685 	0x2CC5,
   1686 	0x2CC7,
   1687 	0x2CC9,
   1688 	0x2CCB,
   1689 	0x2CCD,
   1690 	0x2CCF,
   1691 	0x2CD1,
   1692 	0x2CD3,
   1693 	0x2CD5,
   1694 	0x2CD7,
   1695 	0x2CD9,
   1696 	0x2CDB,
   1697 	0x2CDD,
   1698 	0x2CDF,
   1699 	0x2CE1,
   1700 	0x2CEC,
   1701 	0x2CEE,
   1702 	0x2CF3,
   1703 	0x2D27,
   1704 	0x2D2D,
   1705 	0xA641,
   1706 	0xA643,
   1707 	0xA645,
   1708 	0xA647,
   1709 	0xA649,
   1710 	0xA64B,
   1711 	0xA64D,
   1712 	0xA64F,
   1713 	0xA651,
   1714 	0xA653,
   1715 	0xA655,
   1716 	0xA657,
   1717 	0xA659,
   1718 	0xA65B,
   1719 	0xA65D,
   1720 	0xA65F,
   1721 	0xA661,
   1722 	0xA663,
   1723 	0xA665,
   1724 	0xA667,
   1725 	0xA669,
   1726 	0xA66B,
   1727 	0xA66D,
   1728 	0xA681,
   1729 	0xA683,
   1730 	0xA685,
   1731 	0xA687,
   1732 	0xA689,
   1733 	0xA68B,
   1734 	0xA68D,
   1735 	0xA68F,
   1736 	0xA691,
   1737 	0xA693,
   1738 	0xA695,
   1739 	0xA697,
   1740 	0xA723,
   1741 	0xA725,
   1742 	0xA727,
   1743 	0xA729,
   1744 	0xA72B,
   1745 	0xA72D,
   1746 	0xA733,
   1747 	0xA735,
   1748 	0xA737,
   1749 	0xA739,
   1750 	0xA73B,
   1751 	0xA73D,
   1752 	0xA73F,
   1753 	0xA741,
   1754 	0xA743,
   1755 	0xA745,
   1756 	0xA747,
   1757 	0xA749,
   1758 	0xA74B,
   1759 	0xA74D,
   1760 	0xA74F,
   1761 	0xA751,
   1762 	0xA753,
   1763 	0xA755,
   1764 	0xA757,
   1765 	0xA759,
   1766 	0xA75B,
   1767 	0xA75D,
   1768 	0xA75F,
   1769 	0xA761,
   1770 	0xA763,
   1771 	0xA765,
   1772 	0xA767,
   1773 	0xA769,
   1774 	0xA76B,
   1775 	0xA76D,
   1776 	0xA76F,
   1777 	0xA77A,
   1778 	0xA77C,
   1779 	0xA77F,
   1780 	0xA781,
   1781 	0xA783,
   1782 	0xA785,
   1783 	0xA787,
   1784 	0xA78C,
   1785 	0xA78E,
   1786 	0xA791,
   1787 	0xA793,
   1788 	0xA7A1,
   1789 	0xA7A3,
   1790 	0xA7A5,
   1791 	0xA7A7,
   1792 	0xA7A9,
   1793 	0xA7FA,
   1794 	0x1D4BB,
   1795 	0x1D7CB,
   1796 };
   1797 
   1798 int
   1799 islowerrune(Rune r)
   1800 {
   1801 	if(bsearch(&r, lower2, nelem(lower2), sizeof *lower2, &rune2cmp))
   1802 		return 1;
   1803 	if(bsearch(&r, lower1, nelem(lower1), sizeof *lower1, &rune1cmp))
   1804 		return 1;
   1805 	return 0;
   1806 }
   1807 
   1808 static Rune title2[][2] = {
   1809 	{ 0x1F88, 0x1F8F },
   1810 	{ 0x1F98, 0x1F9F },
   1811 	{ 0x1FA8, 0x1FAF },
   1812 };
   1813 
   1814 static Rune title1[] = {
   1815 	0x01C5,
   1816 	0x01C8,
   1817 	0x01CB,
   1818 	0x01F2,
   1819 	0x1FBC,
   1820 	0x1FCC,
   1821 	0x1FFC,
   1822 };
   1823 
   1824 int
   1825 istitlerune(Rune r)
   1826 {
   1827 	if(bsearch(&r, title2, nelem(title2), sizeof *title2, &rune2cmp))
   1828 		return 1;
   1829 	if(bsearch(&r, title1, nelem(title1), sizeof *title1, &rune1cmp))
   1830 		return 1;
   1831 	return 0;
   1832 }
   1833 
   1834 static Rune digit2[][2] = {
   1835 	{ 0x0030, 0x0039 },
   1836 	{ 0x0660, 0x0669 },
   1837 	{ 0x06F0, 0x06F9 },
   1838 	{ 0x07C0, 0x07C9 },
   1839 	{ 0x0966, 0x096F },
   1840 	{ 0x09E6, 0x09EF },
   1841 	{ 0x0A66, 0x0A6F },
   1842 	{ 0x0AE6, 0x0AEF },
   1843 	{ 0x0B66, 0x0B6F },
   1844 	{ 0x0BE6, 0x0BEF },
   1845 	{ 0x0C66, 0x0C6F },
   1846 	{ 0x0CE6, 0x0CEF },
   1847 	{ 0x0D66, 0x0D6F },
   1848 	{ 0x0E50, 0x0E59 },
   1849 	{ 0x0ED0, 0x0ED9 },
   1850 	{ 0x0F20, 0x0F29 },
   1851 	{ 0x1040, 0x1049 },
   1852 	{ 0x1090, 0x1099 },
   1853 	{ 0x17E0, 0x17E9 },
   1854 	{ 0x1810, 0x1819 },
   1855 	{ 0x1946, 0x194F },
   1856 	{ 0x19D0, 0x19D9 },
   1857 	{ 0x1A80, 0x1A89 },
   1858 	{ 0x1A90, 0x1A99 },
   1859 	{ 0x1B50, 0x1B59 },
   1860 	{ 0x1BB0, 0x1BB9 },
   1861 	{ 0x1C40, 0x1C49 },
   1862 	{ 0x1C50, 0x1C59 },
   1863 	{ 0xA620, 0xA629 },
   1864 	{ 0xA8D0, 0xA8D9 },
   1865 	{ 0xA900, 0xA909 },
   1866 	{ 0xA9D0, 0xA9D9 },
   1867 	{ 0xAA50, 0xAA59 },
   1868 	{ 0xABF0, 0xABF9 },
   1869 	{ 0xFF10, 0xFF19 },
   1870 	{ 0x104A0, 0x104A9 },
   1871 	{ 0x11066, 0x1106F },
   1872 	{ 0x110F0, 0x110F9 },
   1873 	{ 0x11136, 0x1113F },
   1874 	{ 0x111D0, 0x111D9 },
   1875 	{ 0x116C0, 0x116C9 },
   1876 	{ 0x1D7CE, 0x1D7FF },
   1877 };
   1878 
   1879 int
   1880 isdigitrune(Rune r)
   1881 {
   1882 	if(bsearch(&r, digit2, nelem(digit2), sizeof *digit2, &rune2cmp))
   1883 		return 1;
   1884 	return 0;
   1885 }
   1886