xref: /linux/fs/nls/mac-gaelic.c (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
18b8c0daaSLinus Torvalds /*
28b8c0daaSLinus Torvalds  * linux/fs/nls/mac-gaelic.c
38b8c0daaSLinus Torvalds  *
48b8c0daaSLinus Torvalds  * Charset macgaelic translation tables.
58b8c0daaSLinus Torvalds  * Generated automatically from the Unicode and charset
68b8c0daaSLinus Torvalds  * tables from the Unicode Organization (www.unicode.org).
78b8c0daaSLinus Torvalds  * The Unicode to charset table has only exact mappings.
88b8c0daaSLinus Torvalds  */
98b8c0daaSLinus Torvalds 
108b8c0daaSLinus Torvalds /*
118b8c0daaSLinus Torvalds  * COPYRIGHT AND PERMISSION NOTICE
128b8c0daaSLinus Torvalds  *
138b8c0daaSLinus Torvalds  * Copyright 1991-2012 Unicode, Inc.  All rights reserved.  Distributed under
148b8c0daaSLinus Torvalds  * the Terms of Use in http://www.unicode.org/copyright.html.
158b8c0daaSLinus Torvalds  *
168b8c0daaSLinus Torvalds  * Permission is hereby granted, free of charge, to any person obtaining a
178b8c0daaSLinus Torvalds  * copy of the Unicode data files and any associated documentation (the "Data
188b8c0daaSLinus Torvalds  * Files") or Unicode software and any associated documentation (the
198b8c0daaSLinus Torvalds  * "Software") to deal in the Data Files or Software without restriction,
208b8c0daaSLinus Torvalds  * including without limitation the rights to use, copy, modify, merge,
218b8c0daaSLinus Torvalds  * publish, distribute, and/or sell copies of the Data Files or Software, and
228b8c0daaSLinus Torvalds  * to permit persons to whom the Data Files or Software are furnished to do
238b8c0daaSLinus Torvalds  * so, provided that (a) the above copyright notice(s) and this permission
248b8c0daaSLinus Torvalds  * notice appear with all copies of the Data Files or Software, (b) both the
258b8c0daaSLinus Torvalds  * above copyright notice(s) and this permission notice appear in associated
268b8c0daaSLinus Torvalds  * documentation, and (c) there is clear notice in each modified Data File or
278b8c0daaSLinus Torvalds  * in the Software as well as in the documentation associated with the Data
288b8c0daaSLinus Torvalds  * File(s) or Software that the data or software has been modified.
298b8c0daaSLinus Torvalds  *
308b8c0daaSLinus Torvalds  * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
318b8c0daaSLinus Torvalds  * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
328b8c0daaSLinus Torvalds  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
338b8c0daaSLinus Torvalds  * THIRD PARTY RIGHTS.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
348b8c0daaSLinus Torvalds  * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
358b8c0daaSLinus Torvalds  * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
368b8c0daaSLinus Torvalds  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
378b8c0daaSLinus Torvalds  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
388b8c0daaSLinus Torvalds  * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
398b8c0daaSLinus Torvalds  *
408b8c0daaSLinus Torvalds  * Except as contained in this notice, the name of a copyright holder shall
418b8c0daaSLinus Torvalds  * not be used in advertising or otherwise to promote the sale, use or other
428b8c0daaSLinus Torvalds  * dealings in these Data Files or Software without prior written
438b8c0daaSLinus Torvalds  * authorization of the copyright holder.
448b8c0daaSLinus Torvalds  */
458b8c0daaSLinus Torvalds 
468b8c0daaSLinus Torvalds #include <linux/module.h>
478b8c0daaSLinus Torvalds #include <linux/kernel.h>
488b8c0daaSLinus Torvalds #include <linux/string.h>
498b8c0daaSLinus Torvalds #include <linux/nls.h>
508b8c0daaSLinus Torvalds #include <linux/errno.h>
518b8c0daaSLinus Torvalds 
528b8c0daaSLinus Torvalds static const wchar_t charset2uni[256] = {
538b8c0daaSLinus Torvalds 	/* 0x00 */
548b8c0daaSLinus Torvalds 	0x0000, 0x0001, 0x0002, 0x0003,
558b8c0daaSLinus Torvalds 	0x0004, 0x0005, 0x0006, 0x0007,
568b8c0daaSLinus Torvalds 	0x0008, 0x0009, 0x000a, 0x000b,
578b8c0daaSLinus Torvalds 	0x000c, 0x000d, 0x000e, 0x000f,
588b8c0daaSLinus Torvalds 	/* 0x10 */
598b8c0daaSLinus Torvalds 	0x0010, 0x0011, 0x0012, 0x0013,
608b8c0daaSLinus Torvalds 	0x0014, 0x0015, 0x0016, 0x0017,
618b8c0daaSLinus Torvalds 	0x0018, 0x0019, 0x001a, 0x001b,
628b8c0daaSLinus Torvalds 	0x001c, 0x001d, 0x001e, 0x001f,
638b8c0daaSLinus Torvalds 	/* 0x20 */
648b8c0daaSLinus Torvalds 	0x0020, 0x0021, 0x0022, 0x0023,
658b8c0daaSLinus Torvalds 	0x0024, 0x0025, 0x0026, 0x0027,
668b8c0daaSLinus Torvalds 	0x0028, 0x0029, 0x002a, 0x002b,
678b8c0daaSLinus Torvalds 	0x002c, 0x002d, 0x002e, 0x002f,
688b8c0daaSLinus Torvalds 	/* 0x30 */
698b8c0daaSLinus Torvalds 	0x0030, 0x0031, 0x0032, 0x0033,
708b8c0daaSLinus Torvalds 	0x0034, 0x0035, 0x0036, 0x0037,
718b8c0daaSLinus Torvalds 	0x0038, 0x0039, 0x003a, 0x003b,
728b8c0daaSLinus Torvalds 	0x003c, 0x003d, 0x003e, 0x003f,
738b8c0daaSLinus Torvalds 	/* 0x40 */
748b8c0daaSLinus Torvalds 	0x0040, 0x0041, 0x0042, 0x0043,
758b8c0daaSLinus Torvalds 	0x0044, 0x0045, 0x0046, 0x0047,
768b8c0daaSLinus Torvalds 	0x0048, 0x0049, 0x004a, 0x004b,
778b8c0daaSLinus Torvalds 	0x004c, 0x004d, 0x004e, 0x004f,
788b8c0daaSLinus Torvalds 	/* 0x50 */
798b8c0daaSLinus Torvalds 	0x0050, 0x0051, 0x0052, 0x0053,
808b8c0daaSLinus Torvalds 	0x0054, 0x0055, 0x0056, 0x0057,
818b8c0daaSLinus Torvalds 	0x0058, 0x0059, 0x005a, 0x005b,
828b8c0daaSLinus Torvalds 	0x005c, 0x005d, 0x005e, 0x005f,
838b8c0daaSLinus Torvalds 	/* 0x60 */
848b8c0daaSLinus Torvalds 	0x0060, 0x0061, 0x0062, 0x0063,
858b8c0daaSLinus Torvalds 	0x0064, 0x0065, 0x0066, 0x0067,
868b8c0daaSLinus Torvalds 	0x0068, 0x0069, 0x006a, 0x006b,
878b8c0daaSLinus Torvalds 	0x006c, 0x006d, 0x006e, 0x006f,
888b8c0daaSLinus Torvalds 	/* 0x70 */
898b8c0daaSLinus Torvalds 	0x0070, 0x0071, 0x0072, 0x0073,
908b8c0daaSLinus Torvalds 	0x0074, 0x0075, 0x0076, 0x0077,
918b8c0daaSLinus Torvalds 	0x0078, 0x0079, 0x007a, 0x007b,
928b8c0daaSLinus Torvalds 	0x007c, 0x007d, 0x007e, 0x007f,
938b8c0daaSLinus Torvalds 	/* 0x80 */
948b8c0daaSLinus Torvalds 	0x00c4, 0x00c5, 0x00c7, 0x00c9,
958b8c0daaSLinus Torvalds 	0x00d1, 0x00d6, 0x00dc, 0x00e1,
968b8c0daaSLinus Torvalds 	0x00e0, 0x00e2, 0x00e4, 0x00e3,
978b8c0daaSLinus Torvalds 	0x00e5, 0x00e7, 0x00e9, 0x00e8,
988b8c0daaSLinus Torvalds 	/* 0x90 */
998b8c0daaSLinus Torvalds 	0x00ea, 0x00eb, 0x00ed, 0x00ec,
1008b8c0daaSLinus Torvalds 	0x00ee, 0x00ef, 0x00f1, 0x00f3,
1018b8c0daaSLinus Torvalds 	0x00f2, 0x00f4, 0x00f6, 0x00f5,
1028b8c0daaSLinus Torvalds 	0x00fa, 0x00f9, 0x00fb, 0x00fc,
1038b8c0daaSLinus Torvalds 	/* 0xa0 */
1048b8c0daaSLinus Torvalds 	0x2020, 0x00b0, 0x00a2, 0x00a3,
1058b8c0daaSLinus Torvalds 	0x00a7, 0x2022, 0x00b6, 0x00df,
1068b8c0daaSLinus Torvalds 	0x00ae, 0x00a9, 0x2122, 0x00b4,
1078b8c0daaSLinus Torvalds 	0x00a8, 0x2260, 0x00c6, 0x00d8,
1088b8c0daaSLinus Torvalds 	/* 0xb0 */
1098b8c0daaSLinus Torvalds 	0x1e02, 0x00b1, 0x2264, 0x2265,
1108b8c0daaSLinus Torvalds 	0x1e03, 0x010a, 0x010b, 0x1e0a,
1118b8c0daaSLinus Torvalds 	0x1e0b, 0x1e1e, 0x1e1f, 0x0120,
1128b8c0daaSLinus Torvalds 	0x0121, 0x1e40, 0x00e6, 0x00f8,
1138b8c0daaSLinus Torvalds 	/* 0xc0 */
1148b8c0daaSLinus Torvalds 	0x1e41, 0x1e56, 0x1e57, 0x027c,
1158b8c0daaSLinus Torvalds 	0x0192, 0x017f, 0x1e60, 0x00ab,
1168b8c0daaSLinus Torvalds 	0x00bb, 0x2026, 0x00a0, 0x00c0,
1178b8c0daaSLinus Torvalds 	0x00c3, 0x00d5, 0x0152, 0x0153,
1188b8c0daaSLinus Torvalds 	/* 0xd0 */
1198b8c0daaSLinus Torvalds 	0x2013, 0x2014, 0x201c, 0x201d,
1208b8c0daaSLinus Torvalds 	0x2018, 0x2019, 0x1e61, 0x1e9b,
1218b8c0daaSLinus Torvalds 	0x00ff, 0x0178, 0x1e6a, 0x20ac,
1228b8c0daaSLinus Torvalds 	0x2039, 0x203a, 0x0176, 0x0177,
1238b8c0daaSLinus Torvalds 	/* 0xe0 */
1248b8c0daaSLinus Torvalds 	0x1e6b, 0x00b7, 0x1ef2, 0x1ef3,
1258b8c0daaSLinus Torvalds 	0x204a, 0x00c2, 0x00ca, 0x00c1,
1268b8c0daaSLinus Torvalds 	0x00cb, 0x00c8, 0x00cd, 0x00ce,
1278b8c0daaSLinus Torvalds 	0x00cf, 0x00cc, 0x00d3, 0x00d4,
1288b8c0daaSLinus Torvalds 	/* 0xf0 */
1298b8c0daaSLinus Torvalds 	0x2663, 0x00d2, 0x00da, 0x00db,
1308b8c0daaSLinus Torvalds 	0x00d9, 0x0131, 0x00dd, 0x00fd,
1318b8c0daaSLinus Torvalds 	0x0174, 0x0175, 0x1e84, 0x1e85,
1328b8c0daaSLinus Torvalds 	0x1e80, 0x1e81, 0x1e82, 0x1e83,
1338b8c0daaSLinus Torvalds };
1348b8c0daaSLinus Torvalds 
1358b8c0daaSLinus Torvalds static const unsigned char page00[256] = {
1368b8c0daaSLinus Torvalds 	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
1378b8c0daaSLinus Torvalds 	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
1388b8c0daaSLinus Torvalds 	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
1398b8c0daaSLinus Torvalds 	0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */
1408b8c0daaSLinus Torvalds 	0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */
1418b8c0daaSLinus Torvalds 	0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */
1428b8c0daaSLinus Torvalds 	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */
1438b8c0daaSLinus Torvalds 	0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */
1448b8c0daaSLinus Torvalds 	0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40-0x47 */
1458b8c0daaSLinus Torvalds 	0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x48-0x4f */
1468b8c0daaSLinus Torvalds 	0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50-0x57 */
1478b8c0daaSLinus Torvalds 	0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */
1488b8c0daaSLinus Torvalds 	0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60-0x67 */
1498b8c0daaSLinus Torvalds 	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x68-0x6f */
1508b8c0daaSLinus Torvalds 	0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70-0x77 */
1518b8c0daaSLinus Torvalds 	0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */
1528b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
1538b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
1548b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
1558b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
1568b8c0daaSLinus Torvalds 	0xca, 0x00, 0xa2, 0xa3, 0x00, 0x00, 0x00, 0xa4, /* 0xa0-0xa7 */
1578b8c0daaSLinus Torvalds 	0xac, 0xa9, 0x00, 0xc7, 0x00, 0x00, 0xa8, 0x00, /* 0xa8-0xaf */
1588b8c0daaSLinus Torvalds 	0xa1, 0xb1, 0x00, 0x00, 0xab, 0x00, 0xa6, 0xe1, /* 0xb0-0xb7 */
1598b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
1608b8c0daaSLinus Torvalds 	0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, /* 0xc0-0xc7 */
1618b8c0daaSLinus Torvalds 	0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, /* 0xc8-0xcf */
1628b8c0daaSLinus Torvalds 	0x00, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x00, /* 0xd0-0xd7 */
1638b8c0daaSLinus Torvalds 	0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xf6, 0x00, 0xa7, /* 0xd8-0xdf */
1648b8c0daaSLinus Torvalds 	0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, /* 0xe0-0xe7 */
1658b8c0daaSLinus Torvalds 	0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, /* 0xe8-0xef */
1668b8c0daaSLinus Torvalds 	0x00, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0x00, /* 0xf0-0xf7 */
1678b8c0daaSLinus Torvalds 	0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xf7, 0x00, 0xd8, /* 0xf8-0xff */
1688b8c0daaSLinus Torvalds };
1698b8c0daaSLinus Torvalds 
1708b8c0daaSLinus Torvalds static const unsigned char page01[256] = {
1718b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
1728b8c0daaSLinus Torvalds 	0x00, 0x00, 0xb5, 0xb6, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
1738b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
1748b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
1758b8c0daaSLinus Torvalds 	0xbb, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
1768b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
1778b8c0daaSLinus Torvalds 	0x00, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
1788b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
1798b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
1808b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
1818b8c0daaSLinus Torvalds 	0x00, 0x00, 0xce, 0xcf, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
1828b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
1838b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
1848b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
1858b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0xf8, 0xf9, 0xde, 0xdf, /* 0x70-0x77 */
1868b8c0daaSLinus Torvalds 	0xd9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, /* 0x78-0x7f */
1878b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
1888b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
1898b8c0daaSLinus Torvalds 	0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
1908b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
1918b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
1928b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
1938b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
1948b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
1958b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
1968b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
1978b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
1988b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
1998b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
2008b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
2018b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
2028b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
2038b8c0daaSLinus Torvalds };
2048b8c0daaSLinus Torvalds 
2058b8c0daaSLinus Torvalds static const unsigned char page02[256] = {
2068b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
2078b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
2088b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
2098b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
2108b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
2118b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
2128b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
2138b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
2148b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
2158b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
2168b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
2178b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
2188b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
2198b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
2208b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
2218b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, /* 0x78-0x7f */
2228b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
2238b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
2248b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
2258b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
2268b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
2278b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
2288b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
2298b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
2308b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
2318b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
2328b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
2338b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
2348b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
2358b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
2368b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
2378b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
2388b8c0daaSLinus Torvalds };
2398b8c0daaSLinus Torvalds 
2408b8c0daaSLinus Torvalds static const unsigned char page1e[256] = {
2418b8c0daaSLinus Torvalds 	0x00, 0x00, 0xb0, 0xb4, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
2428b8c0daaSLinus Torvalds 	0x00, 0x00, 0xb7, 0xb8, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
2438b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
2448b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0xba, /* 0x18-0x1f */
2458b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
2468b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
2478b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
2488b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
2498b8c0daaSLinus Torvalds 	0xbd, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
2508b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
2518b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc2, /* 0x50-0x57 */
2528b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
2538b8c0daaSLinus Torvalds 	0xc6, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
2548b8c0daaSLinus Torvalds 	0x00, 0x00, 0xda, 0xe0, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
2558b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
2568b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
2578b8c0daaSLinus Torvalds 	0xfc, 0xfd, 0xfe, 0xff, 0xfa, 0xfb, 0x00, 0x00, /* 0x80-0x87 */
2588b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
2598b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
2608b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0xd7, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
2618b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
2628b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
2638b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
2648b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
2658b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
2668b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
2678b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
2688b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
2698b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
2708b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
2718b8c0daaSLinus Torvalds 	0x00, 0x00, 0xe2, 0xe3, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
2728b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
2738b8c0daaSLinus Torvalds };
2748b8c0daaSLinus Torvalds 
2758b8c0daaSLinus Torvalds static const unsigned char page20[256] = {
2768b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
2778b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
2788b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0xd0, 0xd1, 0x00, 0x00, 0x00, /* 0x10-0x17 */
2798b8c0daaSLinus Torvalds 	0xd4, 0xd5, 0x00, 0x00, 0xd2, 0xd3, 0x00, 0x00, /* 0x18-0x1f */
2808b8c0daaSLinus Torvalds 	0xa0, 0x00, 0xa5, 0x00, 0x00, 0x00, 0xc9, 0x00, /* 0x20-0x27 */
2818b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
2828b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
2838b8c0daaSLinus Torvalds 	0x00, 0xdc, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
2848b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
2858b8c0daaSLinus Torvalds 	0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
2868b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
2878b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
2888b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
2898b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
2908b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
2918b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
2928b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
2938b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
2948b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
2958b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
2968b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
2978b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
2988b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
2998b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
3008b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
3018b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
3028b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
3038b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
3048b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
3058b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
3068b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
3078b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
3088b8c0daaSLinus Torvalds };
3098b8c0daaSLinus Torvalds 
3108b8c0daaSLinus Torvalds static const unsigned char page21[256] = {
3118b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
3128b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
3138b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
3148b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
3158b8c0daaSLinus Torvalds 	0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
3168b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
3178b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
3188b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
3198b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
3208b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
3218b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
3228b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
3238b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
3248b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
3258b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
3268b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
3278b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
3288b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
3298b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
3308b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
3318b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
3328b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
3338b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
3348b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
3358b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
3368b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
3378b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
3388b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
3398b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
3408b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
3418b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
3428b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
3438b8c0daaSLinus Torvalds };
3448b8c0daaSLinus Torvalds 
3458b8c0daaSLinus Torvalds static const unsigned char page22[256] = {
3468b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
3478b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
3488b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
3498b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
3508b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
3518b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
3528b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
3538b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
3548b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
3558b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
3568b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
3578b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
3588b8c0daaSLinus Torvalds 	0xad, 0x00, 0x00, 0x00, 0xb2, 0xb3, 0x00, 0x00, /* 0x60-0x67 */
3598b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
3608b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
3618b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
3628b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
3638b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
3648b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
3658b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
3668b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
3678b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
3688b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
3698b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
3708b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
3718b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
3728b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
3738b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
3748b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
3758b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
3768b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
3778b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
3788b8c0daaSLinus Torvalds };
3798b8c0daaSLinus Torvalds 
3808b8c0daaSLinus Torvalds static const unsigned char page26[256] = {
3818b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
3828b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
3838b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
3848b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
3858b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
3868b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
3878b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
3888b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
3898b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
3908b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
3918b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
3928b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
3938b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
3948b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
3958b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
3968b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
3978b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
3988b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
3998b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
4008b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
4018b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
4028b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
4038b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
4048b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
4058b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
4068b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
4078b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
4088b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
4098b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
4108b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
4118b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
4128b8c0daaSLinus Torvalds 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
4138b8c0daaSLinus Torvalds };
4148b8c0daaSLinus Torvalds 
4158b8c0daaSLinus Torvalds static const unsigned char *const page_uni2charset[256] = {
4168b8c0daaSLinus Torvalds 	page00, page01, page02, NULL,   NULL,   NULL,   NULL,   NULL,
4178b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4188b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4198b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   page1e, NULL,
4208b8c0daaSLinus Torvalds 	page20, page21, page22, NULL,   NULL,   NULL,   page26, NULL,
4218b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4228b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4238b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4248b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4258b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4268b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4278b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4288b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4298b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4308b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4318b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4328b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4338b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4348b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4358b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4368b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4378b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4388b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4398b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4408b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4418b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4428b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4438b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4448b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4458b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4468b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4478b8c0daaSLinus Torvalds 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
4488b8c0daaSLinus Torvalds };
4498b8c0daaSLinus Torvalds 
4508b8c0daaSLinus Torvalds static const unsigned char charset2lower[256] = {
4518b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x00-0x07 */
4528b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x08-0x0f */
4538b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x10-0x17 */
4548b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x18-0x1f */
4558b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x20-0x27 */
4568b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x28-0x2f */
4578b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x30-0x37 */
4588b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x38-0x3f */
4598b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x40-0x47 */
4608b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x48-0x4f */
4618b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x50-0x57 */
4628b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x58-0x5f */
4638b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x60-0x67 */
4648b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x68-0x6f */
4658b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x70-0x77 */
4668b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x78-0x7f */
4678b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x80-0x87 */
4688b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x88-0x8f */
4698b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x90-0x97 */
4708b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x98-0x9f */
4718b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xa0-0xa7 */
4728b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xa8-0xaf */
4738b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xb0-0xb7 */
4748b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xb8-0xbf */
4758b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xc0-0xc7 */
4768b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xc8-0xcf */
4778b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xd0-0xd7 */
4788b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xd8-0xdf */
4798b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xe0-0xe7 */
4808b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xe8-0xef */
4818b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xf0-0xf7 */
4828b8c0daaSLinus Torvalds 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0xf8-0xff */
4838b8c0daaSLinus Torvalds };
4848b8c0daaSLinus Torvalds 
4858b8c0daaSLinus Torvalds static const unsigned char charset2upper[256] = {
4868b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x00-0x07 */
4878b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x08-0x0f */
4888b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x10-0x17 */
4898b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x18-0x1f */
4908b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x20-0x27 */
4918b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x28-0x2f */
4928b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x30-0x37 */
4938b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x38-0x3f */
4948b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x40-0x47 */
4958b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x48-0x4f */
4968b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x50-0x57 */
4978b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x58-0x5f */
4988b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x60-0x67 */
4998b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x68-0x6f */
5008b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x70-0x77 */
5018b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x78-0x7f */
5028b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x80-0x87 */
5038b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x88-0x8f */
5048b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x90-0x97 */
5058b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0x98-0x9f */
5068b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xa0-0xa7 */
5078b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xa8-0xaf */
5088b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xb0-0xb7 */
5098b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xb8-0xbf */
5108b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xc0-0xc7 */
5118b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xc8-0xcf */
5128b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xd0-0xd7 */
5138b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xd8-0xdf */
5148b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xe0-0xe7 */
5158b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xe8-0xef */
5168b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xf0-0xf7 */
5178b8c0daaSLinus Torvalds 	0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, /* 0xf8-0xff */
5188b8c0daaSLinus Torvalds };
5198b8c0daaSLinus Torvalds 
uni2char(wchar_t uni,unsigned char * out,int boundlen)5208b8c0daaSLinus Torvalds static int uni2char(wchar_t uni, unsigned char *out, int boundlen)
5218b8c0daaSLinus Torvalds {
5228b8c0daaSLinus Torvalds 	const unsigned char *uni2charset;
5238b8c0daaSLinus Torvalds 	unsigned char cl = uni & 0x00ff;
5248b8c0daaSLinus Torvalds 	unsigned char ch = (uni & 0xff00) >> 8;
5258b8c0daaSLinus Torvalds 
5268b8c0daaSLinus Torvalds 	if (boundlen <= 0)
5278b8c0daaSLinus Torvalds 		return -ENAMETOOLONG;
5288b8c0daaSLinus Torvalds 
5298b8c0daaSLinus Torvalds 	uni2charset = page_uni2charset[ch];
5308b8c0daaSLinus Torvalds 	if (uni2charset && uni2charset[cl])
5318b8c0daaSLinus Torvalds 		out[0] = uni2charset[cl];
5328b8c0daaSLinus Torvalds 	else
5338b8c0daaSLinus Torvalds 		return -EINVAL;
5348b8c0daaSLinus Torvalds 	return 1;
5358b8c0daaSLinus Torvalds }
5368b8c0daaSLinus Torvalds 
char2uni(const unsigned char * rawstring,int boundlen,wchar_t * uni)5378b8c0daaSLinus Torvalds static int char2uni(const unsigned char *rawstring, int boundlen, wchar_t *uni)
5388b8c0daaSLinus Torvalds {
5398b8c0daaSLinus Torvalds 	*uni = charset2uni[*rawstring];
5408b8c0daaSLinus Torvalds 	if (*uni == 0x0000)
5418b8c0daaSLinus Torvalds 		return -EINVAL;
5428b8c0daaSLinus Torvalds 	return 1;
5438b8c0daaSLinus Torvalds }
5448b8c0daaSLinus Torvalds 
5458b8c0daaSLinus Torvalds static struct nls_table table = {
5468b8c0daaSLinus Torvalds 	.charset	= "macgaelic",
5478b8c0daaSLinus Torvalds 	.uni2char	= uni2char,
5488b8c0daaSLinus Torvalds 	.char2uni	= char2uni,
5498b8c0daaSLinus Torvalds 	.charset2lower	= charset2lower,
5508b8c0daaSLinus Torvalds 	.charset2upper	= charset2upper,
5518b8c0daaSLinus Torvalds };
5528b8c0daaSLinus Torvalds 
init_nls_macgaelic(void)5538b8c0daaSLinus Torvalds static int __init init_nls_macgaelic(void)
5548b8c0daaSLinus Torvalds {
5558b8c0daaSLinus Torvalds 	return register_nls(&table);
5568b8c0daaSLinus Torvalds }
5578b8c0daaSLinus Torvalds 
exit_nls_macgaelic(void)5588b8c0daaSLinus Torvalds static void __exit exit_nls_macgaelic(void)
5598b8c0daaSLinus Torvalds {
5608b8c0daaSLinus Torvalds 	unregister_nls(&table);
5618b8c0daaSLinus Torvalds }
5628b8c0daaSLinus Torvalds 
5638b8c0daaSLinus Torvalds module_init(init_nls_macgaelic)
5648b8c0daaSLinus Torvalds module_exit(exit_nls_macgaelic)
5658b8c0daaSLinus Torvalds 
566*d694e46aSJeff Johnson MODULE_DESCRIPTION("NLS Codepage macgaelic");
5678b8c0daaSLinus Torvalds MODULE_LICENSE("Dual BSD/GPL");
568