/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
+ * are subject to the Apple Public Source License Version 2.0 (the
* "License"). You may not use this file except in compliance with the
* License. Please obtain a copy of the License at
* http://www.apple.com/publicsource and read it before using this file.
ignored characters in that block. Ignored characters are mapped to zero.
*/
+#if UNCOMPRESSED
u_int16_t gLowerCaseTable[] = {
// High-byte indices ( == 0 iff no case mapping and no ignorables )
/* F */ 0xFFF0, 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, 0xFFF7, 0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, 0xFFFF,
};
-
/* RelString case folding table */
unsigned short gCompareTable[] = {
/* F */ 0xF000, 0xF100, 0xF200, 0xF300, 0xF400, 0xF500, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00,
};
+#else /* ! UNCOMPRESSED */
+
+enum {
+ kTypeLiteral = 0,
+ kTypeAscending = 1,
+ kTypeAscending256 = 2
+};
+
+struct compressed_block {
+ unsigned char type;
+ unsigned char count;
+ unsigned short data;
+};
+
+unsigned short *gLowerCaseTable;
+
+struct compressed_block gLowerCaseTableCompressed[] = {
+ {0x0, 0x1, 0x100},
+ {0x0, 0x1, 0x200},
+ {0x0, 0x1, 0x0},
+ {0x0, 0x1, 0x300},
+ {0x0, 0x1, 0x400},
+ {0x0, 0x1, 0x500},
+ {0x0, 0xa, 0x0},
+ {0x0, 0x1, 0x600},
+ {0x0, 0xf, 0x0},
+ {0x0, 0x1, 0x700},
+ {0x0, 0x1, 0x800},
+ {0x0, 0xdc, 0x0},
+ {0x0, 0x1, 0x900},
+ {0x0, 0x1, 0xa00},
+ {0x0, 0x1, 0xffff},
+ {0x1, 0x40, 0x1},
+ {0x1, 0x1a, 0x61},
+ {0x1, 0x6b, 0x5b},
+ {0x0, 0x1, 0xe6},
+ {0x1, 0x9, 0xc7},
+ {0x0, 0x1, 0xf0},
+ {0x1, 0x7, 0xd1},
+ {0x0, 0x1, 0xf8},
+ {0x1, 0x5, 0xd9},
+ {0x0, 0x1, 0xfe},
+ {0x1, 0x31, 0xdf},
+ {0x0, 0x2, 0x111},
+ {0x1, 0x14, 0x112},
+ {0x0, 0x2, 0x127},
+ {0x1, 0xa, 0x128},
+ {0x0, 0x2, 0x133},
+ {0x1, 0xb, 0x134},
+ {0x0, 0x2, 0x140},
+ {0x0, 0x2, 0x142},
+ {0x1, 0x7, 0x143},
+ {0x0, 0x2, 0x14b},
+ {0x1, 0x6, 0x14c},
+ {0x0, 0x2, 0x153},
+ {0x1, 0x12, 0x154},
+ {0x0, 0x2, 0x167},
+ {0x1, 0x19, 0x168},
+ {0x0, 0x1, 0x253},
+ {0x0, 0x2, 0x183},
+ {0x0, 0x2, 0x185},
+ {0x0, 0x1, 0x254},
+ {0x0, 0x2, 0x188},
+ {0x1, 0x2, 0x256},
+ {0x0, 0x2, 0x18c},
+ {0x0, 0x1, 0x18d},
+ {0x0, 0x1, 0x1dd},
+ {0x0, 0x1, 0x259},
+ {0x0, 0x1, 0x25b},
+ {0x0, 0x2, 0x192},
+ {0x0, 0x1, 0x260},
+ {0x0, 0x1, 0x263},
+ {0x0, 0x1, 0x195},
+ {0x0, 0x1, 0x269},
+ {0x0, 0x1, 0x268},
+ {0x0, 0x2, 0x199},
+ {0x1, 0x2, 0x19a},
+ {0x0, 0x1, 0x26f},
+ {0x0, 0x1, 0x272},
+ {0x0, 0x1, 0x19e},
+ {0x0, 0x1, 0x275},
+ {0x1, 0x2, 0x1a0},
+ {0x0, 0x2, 0x1a3},
+ {0x0, 0x2, 0x1a5},
+ {0x0, 0x1, 0x1a6},
+ {0x0, 0x2, 0x1a8},
+ {0x0, 0x1, 0x283},
+ {0x1, 0x2, 0x1aa},
+ {0x0, 0x2, 0x1ad},
+ {0x0, 0x1, 0x288},
+ {0x1, 0x2, 0x1af},
+ {0x1, 0x2, 0x28a},
+ {0x0, 0x2, 0x1b4},
+ {0x0, 0x2, 0x1b6},
+ {0x0, 0x1, 0x292},
+ {0x0, 0x2, 0x1b9},
+ {0x1, 0x2, 0x1ba},
+ {0x0, 0x2, 0x1bd},
+ {0x1, 0x6, 0x1be},
+ {0x0, 0x3, 0x1c6},
+ {0x0, 0x3, 0x1c9},
+ {0x0, 0x3, 0x1cc},
+ {0x1, 0x17, 0x1cd},
+ {0x0, 0x2, 0x1e5},
+ {0x1, 0xb, 0x1e6},
+ {0x0, 0x3, 0x1f3},
+ {0x1, 0xc, 0x1f4},
+ {0x1, 0x91, 0x300},
+ {0x1, 0x11, 0x3b1},
+ {0x0, 0x1, 0x3a2},
+ {0x1, 0x7, 0x3c3},
+ {0x1, 0x38, 0x3aa},
+ {0x0, 0x2, 0x3e3},
+ {0x0, 0x2, 0x3e5},
+ {0x0, 0x2, 0x3e7},
+ {0x0, 0x2, 0x3e9},
+ {0x0, 0x2, 0x3eb},
+ {0x0, 0x2, 0x3ed},
+ {0x0, 0x2, 0x3ef},
+ {0x1, 0x12, 0x3f0},
+ {0x0, 0x1, 0x452},
+ {0x0, 0x1, 0x403},
+ {0x1, 0x3, 0x454},
+ {0x0, 0x1, 0x407},
+ {0x1, 0x4, 0x458},
+ {0x1, 0x3, 0x40c},
+ {0x0, 0x1, 0x45f},
+ {0x1, 0x9, 0x430},
+ {0x0, 0x1, 0x419},
+ {0x1, 0x16, 0x43a},
+ {0x1, 0x30, 0x430},
+ {0x0, 0x2, 0x461},
+ {0x0, 0x2, 0x463},
+ {0x0, 0x2, 0x465},
+ {0x0, 0x2, 0x467},
+ {0x0, 0x2, 0x469},
+ {0x0, 0x2, 0x46b},
+ {0x0, 0x2, 0x46d},
+ {0x0, 0x2, 0x46f},
+ {0x0, 0x2, 0x471},
+ {0x0, 0x2, 0x473},
+ {0x0, 0x2, 0x475},
+ {0x1, 0x2, 0x476},
+ {0x0, 0x2, 0x479},
+ {0x0, 0x2, 0x47b},
+ {0x0, 0x2, 0x47d},
+ {0x0, 0x2, 0x47f},
+ {0x0, 0x2, 0x481},
+ {0x1, 0xe, 0x482},
+ {0x0, 0x2, 0x491},
+ {0x0, 0x2, 0x493},
+ {0x0, 0x2, 0x495},
+ {0x0, 0x2, 0x497},
+ {0x0, 0x2, 0x499},
+ {0x0, 0x2, 0x49b},
+ {0x0, 0x2, 0x49d},
+ {0x0, 0x2, 0x49f},
+ {0x0, 0x2, 0x4a1},
+ {0x0, 0x2, 0x4a3},
+ {0x0, 0x2, 0x4a5},
+ {0x0, 0x2, 0x4a7},
+ {0x0, 0x2, 0x4a9},
+ {0x0, 0x2, 0x4ab},
+ {0x0, 0x2, 0x4ad},
+ {0x0, 0x2, 0x4af},
+ {0x0, 0x2, 0x4b1},
+ {0x0, 0x2, 0x4b3},
+ {0x0, 0x2, 0x4b5},
+ {0x0, 0x2, 0x4b7},
+ {0x0, 0x2, 0x4b9},
+ {0x0, 0x2, 0x4bb},
+ {0x0, 0x2, 0x4bd},
+ {0x0, 0x2, 0x4bf},
+ {0x1, 0x3, 0x4c0},
+ {0x0, 0x2, 0x4c4},
+ {0x1, 0x2, 0x4c5},
+ {0x0, 0x2, 0x4c8},
+ {0x1, 0x2, 0x4c9},
+ {0x0, 0x2, 0x4cc},
+ {0x1, 0x64, 0x4cd},
+ {0x1, 0x26, 0x561},
+ {0x1, 0xa9, 0x557},
+ {0x1, 0xa0, 0x1000},
+ {0x1, 0x26, 0x10d0},
+ {0x1, 0x3a, 0x10c6},
+ {0x1, 0xc, 0x2000},
+ {0x0, 0x4, 0x0},
+ {0x1, 0x1a, 0x2010},
+ {0x0, 0x5, 0x0},
+ {0x1, 0x3b, 0x202f},
+ {0x0, 0x6, 0x0},
+ {0x1, 0xf0, 0x2070},
+ {0x1, 0x10, 0x2170},
+ {0x1, 0x90, 0x2170},
+ {0x1, 0xff, 0xfe00},
+ {0x0, 0x1, 0x0},
+ {0x1, 0x21, 0xff00},
+ {0x1, 0x1a, 0xff41},
+ {0x1, 0xc5, 0xff3b},
+};
+#define kLowerCaseTableNBlocks 182
+#define kLowerCaseTableDataSize 5632 /* size of uncompressed structure in bytes */
+
+unsigned short *gCompareTable;
+
+struct compressed_block gCompareTableCompressed[] = {
+ {0x2, 0x60, 0x0},
+ {0x0, 0x1, 0x4180},
+ {0x2, 0x1a, 0x4100},
+ {0x2, 0x5, 0x7b00},
+ {0x0, 0x1, 0x4108},
+ {0x0, 0x1, 0x410c},
+ {0x0, 0x1, 0x4310},
+ {0x0, 0x1, 0x4502},
+ {0x0, 0x1, 0x4e0a},
+ {0x0, 0x1, 0x4f08},
+ {0x0, 0x1, 0x5508},
+ {0x0, 0x1, 0x4182},
+ {0x0, 0x1, 0x4104},
+ {0x0, 0x1, 0x4186},
+ {0x0, 0x1, 0x4108},
+ {0x0, 0x1, 0x410a},
+ {0x0, 0x1, 0x410c},
+ {0x0, 0x1, 0x4310},
+ {0x0, 0x1, 0x4502},
+ {0x0, 0x1, 0x4584},
+ {0x0, 0x1, 0x4586},
+ {0x0, 0x1, 0x4588},
+ {0x0, 0x1, 0x4982},
+ {0x0, 0x1, 0x4984},
+ {0x0, 0x1, 0x4986},
+ {0x0, 0x1, 0x4988},
+ {0x0, 0x1, 0x4e0a},
+ {0x0, 0x1, 0x4f82},
+ {0x0, 0x1, 0x4f84},
+ {0x0, 0x1, 0x4f86},
+ {0x0, 0x1, 0x4f08},
+ {0x0, 0x1, 0x4f0a},
+ {0x0, 0x1, 0x5582},
+ {0x0, 0x1, 0x5584},
+ {0x0, 0x1, 0x5586},
+ {0x0, 0x1, 0x5508},
+ {0x2, 0x7, 0xa000},
+ {0x0, 0x1, 0x5382},
+ {0x2, 0x6, 0xa800},
+ {0x0, 0x1, 0x4114},
+ {0x0, 0x1, 0x4f0e},
+ {0x2, 0xb, 0xb000},
+ {0x0, 0x1, 0x4192},
+ {0x0, 0x1, 0x4f92},
+ {0x0, 0x1, 0xbd00},
+ {0x0, 0x1, 0x4114},
+ {0x0, 0x1, 0x4f0e},
+ {0x2, 0x7, 0xc000},
+ {0x0, 0x1, 0x2206},
+ {0x0, 0x1, 0x2208},
+ {0x0, 0x1, 0xc900},
+ {0x0, 0x1, 0x2000},
+ {0x0, 0x1, 0x4104},
+ {0x0, 0x1, 0x410a},
+ {0x0, 0x1, 0x4f0a},
+ {0x0, 0x2, 0x4f14},
+ {0x2, 0x2, 0xd000},
+ {0x0, 0x1, 0x2202},
+ {0x0, 0x1, 0x2204},
+ {0x0, 0x1, 0x2702},
+ {0x0, 0x1, 0x2704},
+ {0x2, 0x2, 0xd600},
+ {0x0, 0x1, 0x5988},
+ {0x2, 0x27, 0xd900},
+};
+#define kCompareTableNBlocks 255
+#define kCompareTableDataSize 512 /* size of uncompressed structure in bytes */
+
+#endif /* UNCOMPRESSED */