reformatted

This commit is contained in:
Markus Fröschle
2015-10-11 19:13:02 +00:00
parent 479dd69eb6
commit a14f3a8b59
29 changed files with 43510 additions and 43430 deletions

View File

@@ -46,7 +46,7 @@
#define SREC_ADDR24(a) (0x10000 * (a)[2] + 0x100 * \ #define SREC_ADDR24(a) (0x10000 * (a)[2] + 0x100 * \
(a)[3] + (a)[4]) /* 3 byte address field */ (a)[3] + (a)[4]) /* 3 byte address field */
#define SREC_ADDR32(a) (0x1000000 * a[2] + 0x10000 * \ #define SREC_ADDR32(a) (0x1000000 * a[2] + 0x10000 * \
a[3] + 0x100 * (a)[4] + (a)[5]) /* 4 byte address field */ (a)[3] + 0x100 * (a)[4] + (a)[5]) /* 4 byte address field */
#define SREC_DATA16(a) ((uint8_t *)&((a)[4])) /* address of first byte of data in a record */ #define SREC_DATA16(a) ((uint8_t *)&((a)[4])) /* address of first byte of data in a record */
#define SREC_DATA24(a) ((uint8_t *)&((a)[5])) /* address of first data byte in 24 bit record */ #define SREC_DATA24(a) ((uint8_t *)&((a)[5])) /* address of first data byte in 24 bit record */
#define SREC_DATA32(a) ((uint8_t *)&((a)[6])) /* adress of first byte of a record with 32 bit address field */ #define SREC_DATA32(a) ((uint8_t *)&((a)[6])) /* adress of first byte of a record with 32 bit address field */

View File

@@ -15,7 +15,7 @@
static static
const WCHAR uni2sjis[] = { const WCHAR uni2sjis[] = {
/* Unicode - Sjis, Unicode - Sjis, Unicode - Sjis, Unicode - Sjis, */ /* Unicode - Sjis, Unicode - Sjis, Unicode - Sjis, Unicode - Sjis, */
0x00A7, 0x8198, 0x00A8, 0x814E, 0x00B0, 0x818B, 0x00B1, 0x817D, 0x00A7, 0x8198, 0x00A8, 0x814E, 0x00B0, 0x818B, 0x00B1, 0x817D,
0x00B4, 0x814C, 0x00B6, 0x81F7, 0x00D7, 0x817E, 0x00F7, 0x8180, 0x00B4, 0x814C, 0x00B6, 0x81F7, 0x00D7, 0x817E, 0x00F7, 0x8180,
0x0391, 0x839F, 0x0392, 0x83A0, 0x0393, 0x83A1, 0x0394, 0x83A2, 0x0391, 0x839F, 0x0392, 0x83A0, 0x0393, 0x83A1, 0x0394, 0x83A2,
@@ -1869,7 +1869,7 @@ const WCHAR uni2sjis[] = {
#if !_TINY_TABLE #if !_TINY_TABLE
static static
const WCHAR sjis2uni[] = { const WCHAR sjis2uni[] = {
/* SJIS - Unicode, SJIS - Unicode, SJIS - Unicode, SJIS - Unicode, */ /* SJIS - Unicode, SJIS - Unicode, SJIS - Unicode, SJIS - Unicode, */
0x00A1, 0xFF61, 0x00A2, 0xFF62, 0x00A3, 0xFF63, 0x00A4, 0xFF64, 0x00A1, 0xFF61, 0x00A2, 0xFF62, 0x00A3, 0xFF63, 0x00A4, 0xFF64,
0x00A5, 0xFF65, 0x00A6, 0xFF66, 0x00A7, 0xFF67, 0x00A8, 0xFF68, 0x00A5, 0xFF65, 0x00A6, 0xFF66, 0x00A7, 0xFF67, 0x00A8, 0xFF68,
0x00A9, 0xFF69, 0x00AA, 0xFF6A, 0x00AB, 0xFF6B, 0x00AC, 0xFF6C, 0x00A9, 0xFF69, 0x00AA, 0xFF6A, 0x00AB, 0xFF6B, 0x00AC, 0xFF6C,
@@ -3726,7 +3726,7 @@ const WCHAR sjis2uni[] = {
WCHAR ff_convert ( /* Converted code, 0 means conversion error */ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR src, /* Character code to be converted */ WCHAR src, /* Character code to be converted */
UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
) )
{ {
const WCHAR *p; const WCHAR *p;
WCHAR c; WCHAR c;
@@ -3785,7 +3785,7 @@ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR ff_wtoupper ( /* Upper converted character */ WCHAR ff_wtoupper ( /* Upper converted character */
WCHAR chr /* Input character */ WCHAR chr /* Input character */
) )
{ {
static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 }; static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 }; static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };

View File

@@ -13,7 +13,7 @@
static static
const WCHAR uni2oem[] = { const WCHAR uni2oem[] = {
/* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */ /* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */
0x00A4, 0xA1E8, 0x00A7, 0xA1EC, 0x00A8, 0xA1A7, 0x00B0, 0xA1E3, 0x00A4, 0xA1E8, 0x00A7, 0xA1EC, 0x00A8, 0xA1A7, 0x00B0, 0xA1E3,
0x00B1, 0xA1C0, 0x00B7, 0xA1A4, 0x00D7, 0xA1C1, 0x00E0, 0xA8A4, 0x00B1, 0xA1C0, 0x00B7, 0xA1A4, 0x00D7, 0xA1C1, 0x00E0, 0xA8A4,
0x00E1, 0xA8A2, 0x00E8, 0xA8A8, 0x00E9, 0xA8A6, 0x00EA, 0xA8BA, 0x00E1, 0xA8A2, 0x00E8, 0xA8A8, 0x00E9, 0xA8A6, 0x00EA, 0xA8BA,
@@ -5467,7 +5467,7 @@ const WCHAR uni2oem[] = {
static static
const WCHAR oem2uni[] = { const WCHAR oem2uni[] = {
/* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */ /* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */
0x0080, 0x20AC, 0x8140, 0x4E02, 0x8141, 0x4E04, 0x8142, 0x4E05, 0x0080, 0x20AC, 0x8140, 0x4E02, 0x8141, 0x4E04, 0x8142, 0x4E05,
0x8143, 0x4E06, 0x8144, 0x4E0F, 0x8145, 0x4E12, 0x8146, 0x4E17, 0x8143, 0x4E06, 0x8144, 0x4E0F, 0x8145, 0x4E12, 0x8146, 0x4E17,
0x8147, 0x4E1F, 0x8148, 0x4E20, 0x8149, 0x4E21, 0x814A, 0x4E23, 0x8147, 0x4E1F, 0x8148, 0x4E20, 0x8149, 0x4E21, 0x814A, 0x4E23,
@@ -10924,7 +10924,7 @@ const WCHAR oem2uni[] = {
WCHAR ff_convert ( /* Converted code, 0 means conversion error */ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR src, /* Character code to be converted */ WCHAR src, /* Character code to be converted */
UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
) )
{ {
const WCHAR *p; const WCHAR *p;
WCHAR c; WCHAR c;
@@ -10960,7 +10960,7 @@ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR ff_wtoupper ( /* Upper converted character */ WCHAR ff_wtoupper ( /* Upper converted character */
WCHAR chr /* Input character */ WCHAR chr /* Input character */
) )
{ {
static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 }; static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 }; static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };

View File

@@ -14,7 +14,7 @@
static static
const WCHAR uni2oem[] = { const WCHAR uni2oem[] = {
/* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */ /* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */
0x00A1, 0xA2AE, 0x00A4, 0xA2B4, 0x00A7, 0xA1D7, 0x00A8, 0xA1A7, 0x00A1, 0xA2AE, 0x00A4, 0xA2B4, 0x00A7, 0xA1D7, 0x00A8, 0xA1A7,
0x00AA, 0xA8A3, 0x00AD, 0xA1A9, 0x00AE, 0xA2E7, 0x00B0, 0xA1C6, 0x00AA, 0xA8A3, 0x00AD, 0xA1A9, 0x00AE, 0xA2E7, 0x00B0, 0xA1C6,
0x00B1, 0xA1BE, 0x00B2, 0xA9F7, 0x00B3, 0xA9F8, 0x00B4, 0xA2A5, 0x00B1, 0xA1BE, 0x00B2, 0xA9F7, 0x00B3, 0xA9F8, 0x00B4, 0xA2A5,
@@ -4282,7 +4282,7 @@ const WCHAR uni2oem[] = {
static static
const WCHAR oem2uni[] = { const WCHAR oem2uni[] = {
/* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */ /* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */
0x8141, 0xAC02, 0x8142, 0xAC03, 0x8143, 0xAC05, 0x8144, 0xAC06, 0x8141, 0xAC02, 0x8142, 0xAC03, 0x8143, 0xAC05, 0x8144, 0xAC06,
0x8145, 0xAC0B, 0x8146, 0xAC0C, 0x8147, 0xAC0D, 0x8148, 0xAC0E, 0x8145, 0xAC0B, 0x8146, 0xAC0C, 0x8147, 0xAC0D, 0x8148, 0xAC0E,
0x8149, 0xAC0F, 0x814A, 0xAC18, 0x814B, 0xAC1E, 0x814C, 0xAC1F, 0x8149, 0xAC0F, 0x814A, 0xAC18, 0x814B, 0xAC1E, 0x814C, 0xAC1F,
@@ -8553,7 +8553,7 @@ const WCHAR oem2uni[] = {
WCHAR ff_convert ( /* Converted code, 0 means conversion error */ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR src, /* Character code to be converted */ WCHAR src, /* Character code to be converted */
UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
) )
{ {
const WCHAR *p; const WCHAR *p;
WCHAR c; WCHAR c;
@@ -8590,7 +8590,7 @@ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR ff_wtoupper ( /* Upper converted character */ WCHAR ff_wtoupper ( /* Upper converted character */
WCHAR chr /* Input character */ WCHAR chr /* Input character */
) )
{ {
static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 }; static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 }; static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };

View File

@@ -14,7 +14,7 @@
static static
const WCHAR uni2oem[] = { const WCHAR uni2oem[] = {
/* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */ /* Unicode - OEM, Unicode - OEM, Unicode - OEM, Unicode - OEM */
0x00A7, 0xA1B1, 0x00AF, 0xA1C2, 0x00B0, 0xA258, 0x00B1, 0xA1D3, 0x00A7, 0xA1B1, 0x00AF, 0xA1C2, 0x00B0, 0xA258, 0x00B1, 0xA1D3,
0x00B7, 0xA150, 0x00D7, 0xA1D1, 0x00F7, 0xA1D2, 0x02C7, 0xA3BE, 0x00B7, 0xA150, 0x00D7, 0xA1D1, 0x00F7, 0xA1D2, 0x02C7, 0xA3BE,
0x02C9, 0xA3BC, 0x02CA, 0xA3BD, 0x02CB, 0xA3BF, 0x02CD, 0xA1C5, 0x02C9, 0xA3BC, 0x02CA, 0xA3BD, 0x02CB, 0xA3BF, 0x02CD, 0xA1C5,
@@ -3395,7 +3395,7 @@ const WCHAR uni2oem[] = {
static static
const WCHAR oem2uni[] = { const WCHAR oem2uni[] = {
/* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */ /* OEM - Unicode, OEM - Unicode, OEM - Unicode, OEM - Unicode */
0xA140, 0x3000, 0xA141, 0xFF0C, 0xA142, 0x3001, 0xA143, 0x3002, 0xA140, 0x3000, 0xA141, 0xFF0C, 0xA142, 0x3001, 0xA143, 0x3002,
0xA144, 0xFF0E, 0xA145, 0x2027, 0xA146, 0xFF1B, 0xA147, 0xFF1A, 0xA144, 0xFF0E, 0xA145, 0x2027, 0xA146, 0xFF1B, 0xA147, 0xFF1A,
0xA148, 0xFF1F, 0xA149, 0xFF01, 0xA14A, 0xFE30, 0xA14B, 0x2026, 0xA148, 0xFF1F, 0xA149, 0xFF01, 0xA14A, 0xFE30, 0xA14B, 0x2026,
@@ -6779,7 +6779,7 @@ const WCHAR oem2uni[] = {
WCHAR ff_convert ( /* Converted code, 0 means conversion error */ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR src, /* Character code to be converted */ WCHAR src, /* Character code to be converted */
UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */ UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
) )
{ {
const WCHAR *p; const WCHAR *p;
WCHAR c; WCHAR c;
@@ -6816,7 +6816,7 @@ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR ff_wtoupper ( /* Upper converted character */ WCHAR ff_wtoupper ( /* Upper converted character */
WCHAR chr /* Input character */ WCHAR chr /* Input character */
) )
{ {
static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 }; static const WCHAR tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 };
static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 }; static const WCHAR tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };

View File

@@ -31,7 +31,9 @@
#if _CODE_PAGE == 437 #if _CODE_PAGE == 437
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP437(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP437(0x80-0xFF) to Unicode conversion table */
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
@@ -53,7 +55,9 @@ const uint16_t Tbl[] = { /* CP437(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 720 #elif _CODE_PAGE == 720
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP720(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP720(0x80-0xFF) to Unicode conversion table */
0x0000, 0x0000, 0x00E9, 0x00E2, 0x0000, 0x00E0, 0x0000, 0x00E7, 0x0000, 0x0000, 0x00E9, 0x00E2, 0x0000, 0x00E0, 0x0000, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0000, 0x0000, 0x0000, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0000, 0x0000, 0x0000,
0x0000, 0x0651, 0x0652, 0x00F4, 0x00A4, 0x0640, 0x00FB, 0x00F9, 0x0000, 0x0651, 0x0652, 0x00F4, 0x00A4, 0x0640, 0x00FB, 0x00F9,
@@ -75,7 +79,9 @@ const uint16_t Tbl[] = { /* CP720(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 737 #elif _CODE_PAGE == 737
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP737(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP737(0x80-0xFF) to Unicode conversion table */
0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0,
0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9,
@@ -97,7 +103,9 @@ const uint16_t Tbl[] = { /* CP737(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 775 #elif _CODE_PAGE == 775
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP775(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP775(0x80-0xFF) to Unicode conversion table */
0x0106, 0x00FC, 0x00E9, 0x0101, 0x00E4, 0x0123, 0x00E5, 0x0107, 0x0106, 0x00FC, 0x00E9, 0x0101, 0x00E4, 0x0123, 0x00E5, 0x0107,
0x0142, 0x0113, 0x0156, 0x0157, 0x012B, 0x0179, 0x00C4, 0x00C5, 0x0142, 0x0113, 0x0156, 0x0157, 0x012B, 0x0179, 0x00C4, 0x00C5,
0x00C9, 0x00E6, 0x00C6, 0x014D, 0x00F6, 0x0122, 0x00A2, 0x015A, 0x00C9, 0x00E6, 0x00C6, 0x014D, 0x00F6, 0x0122, 0x00A2, 0x015A,
@@ -119,7 +127,9 @@ const uint16_t Tbl[] = { /* CP775(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 850 #elif _CODE_PAGE == 850
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP850(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP850(0x80-0xFF) to Unicode conversion table */
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
@@ -141,7 +151,9 @@ const uint16_t Tbl[] = { /* CP850(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 852 #elif _CODE_PAGE == 852
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP852(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP852(0x80-0xFF) to Unicode conversion table */
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7, 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7,
0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106, 0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106,
0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A, 0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A,
@@ -163,7 +175,9 @@ const uint16_t Tbl[] = { /* CP852(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 855 #elif _CODE_PAGE == 855
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP855(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP855(0x80-0xFF) to Unicode conversion table */
0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404,
0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408, 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408,
0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C, 0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C,
@@ -185,7 +199,9 @@ const uint16_t Tbl[] = { /* CP855(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 857 #elif _CODE_PAGE == 857
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP857(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP857(0x80-0xFF) to Unicode conversion table */
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5,
0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
@@ -207,7 +223,9 @@ const uint16_t Tbl[] = { /* CP857(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 858 #elif _CODE_PAGE == 858
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP858(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP858(0x80-0xFF) to Unicode conversion table */
0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
@@ -229,7 +247,9 @@ const uint16_t Tbl[] = { /* CP858(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 862 #elif _CODE_PAGE == 862
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP862(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP862(0x80-0xFF) to Unicode conversion table */
0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
@@ -251,7 +271,9 @@ const uint16_t Tbl[] = { /* CP862(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 866 #elif _CODE_PAGE == 866
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP866(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP866(0x80-0xFF) to Unicode conversion table */
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
@@ -273,7 +295,9 @@ const uint16_t Tbl[] = { /* CP866(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 874 #elif _CODE_PAGE == 874
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP874(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP874(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x0000, 0x0000, 0x0000, 0x2026, 0x0000, 0x0000, 0x20AC, 0x0000, 0x0000, 0x0000, 0x0000, 0x2026, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -295,7 +319,9 @@ const uint16_t Tbl[] = { /* CP874(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1250 #elif _CODE_PAGE == 1250
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1250(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1250(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, 0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -317,7 +343,9 @@ const uint16_t Tbl[] = { /* CP1250(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1251 #elif _CODE_PAGE == 1251
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1251(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1251(0x80-0xFF) to Unicode conversion table */
0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -339,7 +367,9 @@ const uint16_t Tbl[] = { /* CP1251(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1252 #elif _CODE_PAGE == 1252
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1252(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1252(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -361,7 +391,9 @@ const uint16_t Tbl[] = { /* CP1252(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1253 #elif _CODE_PAGE == 1253
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1253(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1253(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x0000, 0x2030, 0x0000, 0x2039, 0x000C, 0x0000, 0x0000, 0x0000, 0x0000, 0x2030, 0x0000, 0x2039, 0x000C, 0x0000, 0x0000, 0x0000,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -383,7 +415,9 @@ const uint16_t Tbl[] = { /* CP1253(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1254 #elif _CODE_PAGE == 1254
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1254(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1254(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x210A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x0000, 0x210A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -405,7 +439,9 @@ const uint16_t Tbl[] = { /* CP1254(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1255 #elif _CODE_PAGE == 1255
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1255(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1255(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000, 0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -427,7 +463,9 @@ const uint16_t Tbl[] = { /* CP1255(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1256 #elif _CODE_PAGE == 1256
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1256(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1256(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688, 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -449,7 +487,9 @@ const uint16_t Tbl[] = { /* CP1256(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1257 #elif _CODE_PAGE == 1257
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1257(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1257(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8, 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -471,7 +511,9 @@ const uint16_t Tbl[] = { /* CP1257(0x80-0xFF) to Unicode conversion table */
#elif _CODE_PAGE == 1258 #elif _CODE_PAGE == 1258
#define _TBLDEF 1 #define _TBLDEF 1
static static
const uint16_t Tbl[] = { /* CP1258(0x80-0xFF) to Unicode conversion table */ const uint16_t Tbl[] =
{
/* CP1258(0x80-0xFF) to Unicode conversion table */
0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0000, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000, 0x02C6, 0x2030, 0x0000, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -501,7 +543,7 @@ const uint16_t Tbl[] = { /* CP1258(0x80-0xFF) to Unicode conversion table */
uint16_t ff_convert ( /* Converted character, Returns zero on error */ uint16_t ff_convert ( /* Converted character, Returns zero on error */
uint16_t src, /* Character code to be converted */ uint16_t src, /* Character code to be converted */
uint32_t dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */ uint32_t dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
) )
{ {
uint16_t c; uint16_t c;
@@ -527,10 +569,47 @@ uint16_t ff_convert ( /* Converted character, Returns zero on error */
uint16_t ff_wtoupper ( /* Upper converted character */ uint16_t ff_wtoupper ( /* Upper converted character */
uint16_t chr /* Input character */ uint16_t chr /* Input character */
) )
{ {
static const uint16_t tbl_lower[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7, 0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, 0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58, 0xFF59, 0xFF5A, 0 }; static const uint16_t tbl_lower[] =
static const uint16_t tbl_upper[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 }; {
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
0x79, 0x7A, 0xA1, 0x00A2, 0x00A3, 0x00A5, 0x00AC, 0x00AF,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8,
0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x0FF, 0x101,
0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F,
0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D,
0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B,
0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A,
0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x148,
0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157,
0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165,
0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173,
0x175, 0x177, 0x17A, 0x17C, 0x17E, 0x192, 0x3B1,
0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7, 0x3B8,
0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE, 0x3BF,
0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6, 0x3C7,
0x3C8, 0x3C9, 0x3CA, 0x430, 0x431, 0x432, 0x433,
0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A,
0x43B, 0x43C, 0x43D, 0x43E, 0x43F, 0x440, 0x441,
0x442, 0x443, 0x444, 0x445, 0x446, 0x447, 0x448,
0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F,
0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457,
0x458, 0x459, 0x45A, 0x45B, 0x45C, 0x45E, 0x45F,
0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F,
0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, 0xFF48,
0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, 0xFF50,
0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, 0xFF58,
0xFF59, 0xFF5A, 0
};
static const uint16_t tbl_upper[] =
{
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x21, 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE2, 0xFFE3, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0x178, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x179, 0x17B, 0x17D, 0x191, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F, 0x3A0, 0x3A1, 0x3A3, 0x3A4, 0x3A5, 0x3A6, 0x3A7, 0x3A8, 0x3A9, 0x3AA, 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D, 0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409, 0x40A, 0x40B, 0x40C, 0x40E, 0x40F, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0x216C, 0x216D, 0x216E, 0x216F, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39, 0xFF3A, 0 };
int i; int i;

135
fs/ff.c
View File

@@ -142,7 +142,8 @@
#if _FS_READONLY #if _FS_READONLY
#error _FS_LOCK must be 0 on read-only cfg. #error _FS_LOCK must be 0 on read-only cfg.
#endif #endif
typedef struct { typedef struct
{
FATFS *fs; /* File ID 1, volume (NULL:blank entry) */ FATFS *fs; /* File ID 1, volume (NULL:blank entry) */
uint32_t clu; /* File ID 2, directory */ uint32_t clu; /* File ID 2, directory */
uint16_t idx; /* File ID 3, directory index */ uint16_t idx; /* File ID 3, directory index */
@@ -593,7 +594,7 @@ int chk_chr (const char* str, int chr) {
static static
int lock_fs ( int lock_fs (
FATFS *fs /* File system object */ FATFS *fs /* File system object */
) )
{ {
return ff_req_grant(fs->sobj); return ff_req_grant(fs->sobj);
} }
@@ -603,7 +604,7 @@ static
void unlock_fs ( void unlock_fs (
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
FRESULT res /* Result code to be returned */ FRESULT res /* Result code to be returned */
) )
{ {
if (fs && if (fs &&
res != FR_NOT_ENABLED && res != FR_NOT_ENABLED &&
@@ -626,7 +627,7 @@ static
FRESULT chk_lock ( /* Check if the file can be accessed */ FRESULT chk_lock ( /* Check if the file can be accessed */
DIR* dj, /* Directory object pointing the file to be checked */ DIR* dj, /* Directory object pointing the file to be checked */
int acc /* Desired access (0:Read, 1:Write, 2:Delete/Rename) */ int acc /* Desired access (0:Read, 1:Write, 2:Delete/Rename) */
) )
{ {
uint32_t i, be; uint32_t i, be;
@@ -662,7 +663,7 @@ static
uint32_t inc_lock ( /* Increment file open counter and returns its index (0:int error) */ uint32_t inc_lock ( /* Increment file open counter and returns its index (0:int error) */
DIR* dj, /* Directory object pointing the file to register or increment */ DIR* dj, /* Directory object pointing the file to register or increment */
int acc /* Desired access mode (0:Read, !0:Write) */ int acc /* Desired access mode (0:Read, !0:Write) */
) )
{ {
uint32_t i; uint32_t i;
@@ -693,7 +694,7 @@ uint32_t inc_lock ( /* Increment file open counter and returns its index (0:int
static static
FRESULT dec_lock ( /* Decrement file open counter */ FRESULT dec_lock ( /* Decrement file open counter */
uint32_t i /* Semaphore index */ uint32_t i /* Semaphore index */
) )
{ {
uint16_t n; uint16_t n;
FRESULT res; FRESULT res;
@@ -716,7 +717,7 @@ FRESULT dec_lock ( /* Decrement file open counter */
static static
void clear_lock ( /* Clear lock entries of the volume */ void clear_lock ( /* Clear lock entries of the volume */
FATFS *fs FATFS *fs
) )
{ {
uint32_t i; uint32_t i;
@@ -736,7 +737,7 @@ static
FRESULT move_window ( FRESULT move_window (
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
uint32_t sector /* Sector number to make appearance in the fs->win[] */ uint32_t sector /* Sector number to make appearance in the fs->win[] */
) /* Move to zero only writes back dirty window */ ) /* Move to zero only writes back dirty window */
{ {
uint32_t wsect; uint32_t wsect;
@@ -777,7 +778,7 @@ FRESULT move_window (
static static
FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */ FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */
FATFS *fs /* File system object */ FATFS *fs /* File system object */
) )
{ {
FRESULT res; FRESULT res;
@@ -818,7 +819,7 @@ FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */
uint32_t clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */ uint32_t clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
uint32_t clst /* Cluster# to be converted */ uint32_t clst /* Cluster# to be converted */
) )
{ {
clst -= 2; clst -= 2;
if (clst >= (fs->n_fatent - 2)) return 0; /* Invalid cluster# */ if (clst >= (fs->n_fatent - 2)) return 0; /* Invalid cluster# */
@@ -836,7 +837,7 @@ uint32_t clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
uint32_t get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, Else:Cluster status */ uint32_t get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, Else:Cluster status */
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
uint32_t clst /* Cluster# to get the link information */ uint32_t clst /* Cluster# to get the link information */
) )
{ {
uint32_t wc, bc; uint32_t wc, bc;
uint8_t *p; uint8_t *p;
@@ -880,7 +881,7 @@ FRESULT put_fat (
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
uint32_t clst, /* Cluster# to be changed in range of 2 to fs->n_fatent - 1 */ uint32_t clst, /* Cluster# to be changed in range of 2 to fs->n_fatent - 1 */
uint32_t val /* New value to mark the cluster */ uint32_t val /* New value to mark the cluster */
) )
{ {
uint32_t bc; uint32_t bc;
uint8_t *p; uint8_t *p;
@@ -943,7 +944,7 @@ static
FRESULT remove_chain ( FRESULT remove_chain (
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
uint32_t clst /* Cluster# to remove a chain from */ uint32_t clst /* Cluster# to remove a chain from */
) )
{ {
FRESULT res; FRESULT res;
uint32_t nxt; uint32_t nxt;
@@ -996,7 +997,7 @@ static
uint32_t create_chain ( /* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */ uint32_t create_chain ( /* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
uint32_t clst /* Cluster# to stretch. 0 means create a new chain. */ uint32_t clst /* Cluster# to stretch. 0 means create a new chain. */
) )
{ {
uint32_t cs, ncl, scl; uint32_t cs, ncl, scl;
FRESULT res; FRESULT res;
@@ -1056,7 +1057,7 @@ static
uint32_t clmt_clust ( /* <2:Error, >=2:Cluster number */ uint32_t clmt_clust ( /* <2:Error, >=2:Cluster number */
FIL* fp, /* Pointer to the file object */ FIL* fp, /* Pointer to the file object */
uint32_t ofs /* File offset to be converted to cluster# */ uint32_t ofs /* File offset to be converted to cluster# */
) )
{ {
uint32_t cl, ncl, *tbl; uint32_t cl, ncl, *tbl;
@@ -1083,7 +1084,7 @@ static
FRESULT dir_sdi ( FRESULT dir_sdi (
DIR *dj, /* Pointer to directory object */ DIR *dj, /* Pointer to directory object */
uint16_t idx /* Index of directory table */ uint16_t idx /* Index of directory table */
) )
{ {
uint32_t clst; uint32_t clst;
uint16_t ic; uint16_t ic;
@@ -1131,7 +1132,7 @@ static
FRESULT dir_next ( /* FR_OK:Succeeded, FR_NO_FILE:End of table, FR_DENIED:EOT and could not stretch */ FRESULT dir_next ( /* FR_OK:Succeeded, FR_NO_FILE:End of table, FR_DENIED:EOT and could not stretch */
DIR *dj, /* Pointer to directory object */ DIR *dj, /* Pointer to directory object */
int stretch /* 0: Do not stretch table, 1: Stretch table if needed */ int stretch /* 0: Do not stretch table, 1: Stretch table if needed */
) )
{ {
uint32_t clst; uint32_t clst;
uint16_t i; uint16_t i;
@@ -1199,7 +1200,7 @@ static
uint32_t ld_clust ( uint32_t ld_clust (
FATFS *fs, /* Pointer to the fs object */ FATFS *fs, /* Pointer to the fs object */
uint8_t *dir /* Pointer to the directory entry */ uint8_t *dir /* Pointer to the directory entry */
) )
{ {
uint32_t cl; uint32_t cl;
@@ -1216,7 +1217,7 @@ static
void st_clust ( void st_clust (
uint8_t *dir, /* Pointer to the directory entry */ uint8_t *dir, /* Pointer to the directory entry */
uint32_t cl /* Value to be set */ uint32_t cl /* Value to be set */
) )
{ {
ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusLO, cl);
ST_WORD(dir+DIR_FstClusHI, cl >> 16); ST_WORD(dir+DIR_FstClusHI, cl >> 16);
@@ -1237,7 +1238,7 @@ static
int cmp_lfn ( /* 1:Matched, 0:Not matched */ int cmp_lfn ( /* 1:Matched, 0:Not matched */
uint16_t *lfnbuf, /* Pointer to the LFN to be compared */ uint16_t *lfnbuf, /* Pointer to the LFN to be compared */
uint8_t *dir /* Pointer to the directory entry containing a part of LFN */ uint8_t *dir /* Pointer to the directory entry containing a part of LFN */
) )
{ {
uint32_t i, s; uint32_t i, s;
uint16_t wc, uc; uint16_t wc, uc;
@@ -1268,7 +1269,7 @@ static
int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */ int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */
uint16_t *lfnbuf, /* Pointer to the Unicode-LFN buffer */ uint16_t *lfnbuf, /* Pointer to the Unicode-LFN buffer */
uint8_t *dir /* Pointer to the directory entry */ uint8_t *dir /* Pointer to the directory entry */
) )
{ {
uint32_t i, s; uint32_t i, s;
uint16_t wc, uc; uint16_t wc, uc;
@@ -1303,7 +1304,7 @@ void fit_lfn (
uint8_t *dir, /* Pointer to the directory entry */ uint8_t *dir, /* Pointer to the directory entry */
uint8_t ord, /* LFN order (1-20) */ uint8_t ord, /* LFN order (1-20) */
uint8_t sum /* SFN sum */ uint8_t sum /* SFN sum */
) )
{ {
uint32_t i, s; uint32_t i, s;
uint16_t wc; uint16_t wc;
@@ -1339,7 +1340,7 @@ void gen_numname (
const uint8_t *src, /* Pointer to source SFN to be modified */ const uint8_t *src, /* Pointer to source SFN to be modified */
const uint16_t *lfn, /* Pointer to LFN */ const uint16_t *lfn, /* Pointer to LFN */
uint16_t seq /* Sequence number */ uint16_t seq /* Sequence number */
) )
{ {
uint8_t ns[8], c; uint8_t ns[8], c;
uint32_t i, j; uint32_t i, j;
@@ -1384,7 +1385,7 @@ void gen_numname (
static static
uint8_t sum_sfn ( uint8_t sum_sfn (
const uint8_t *dir /* Ptr to directory entry */ const uint8_t *dir /* Ptr to directory entry */
) )
{ {
uint8_t sum = 0; uint8_t sum = 0;
uint32_t n = 11; uint32_t n = 11;
@@ -1404,7 +1405,7 @@ uint8_t sum_sfn (
static static
FRESULT dir_find ( FRESULT dir_find (
DIR *dj /* Pointer to the directory object linked to the file name */ DIR *dj /* Pointer to the directory object linked to the file name */
) )
{ {
FRESULT res; FRESULT res;
uint8_t c, *dir; uint8_t c, *dir;
@@ -1465,7 +1466,7 @@ FRESULT dir_find (
static static
FRESULT dir_read ( FRESULT dir_read (
DIR *dj /* Pointer to the directory object that pointing the entry to be read */ DIR *dj /* Pointer to the directory object that pointing the entry to be read */
) )
{ {
FRESULT res; FRESULT res;
uint8_t c, *dir; uint8_t c, *dir;
@@ -1522,7 +1523,7 @@ FRESULT dir_read (
static static
FRESULT dir_register ( /* FR_OK:Successful, FR_DENIED:No free entry or too many SFN collision, FR_DISK_ERR:Disk error */ FRESULT dir_register ( /* FR_OK:Successful, FR_DENIED:No free entry or too many SFN collision, FR_DISK_ERR:Disk error */
DIR *dj /* Target directory with object name to be created */ DIR *dj /* Target directory with object name to be created */
) )
{ {
FRESULT res; FRESULT res;
uint8_t c, *dir; uint8_t c, *dir;
@@ -1629,7 +1630,7 @@ FRESULT dir_register ( /* FR_OK:Successful, FR_DENIED:No free entry or too many
static static
FRESULT dir_remove ( /* FR_OK: Successful, FR_DISK_ERR: A disk error */ FRESULT dir_remove ( /* FR_OK: Successful, FR_DISK_ERR: A disk error */
DIR *dj /* Directory object pointing the entry to be removed */ DIR *dj /* Directory object pointing the entry to be removed */
) )
{ {
FRESULT res; FRESULT res;
#if _USE_LFN /* LFN configuration */ #if _USE_LFN /* LFN configuration */
@@ -1675,7 +1676,7 @@ static
FRESULT create_name ( FRESULT create_name (
DIR *dj, /* Pointer to the directory object */ DIR *dj, /* Pointer to the directory object */
const TCHAR **path /* Pointer to pointer to the segment in the path string */ const TCHAR **path /* Pointer to pointer to the segment in the path string */
) )
{ {
#ifdef _EXCVT #ifdef _EXCVT
static const uint8_t excvt[] = _EXCVT; /* Upper conversion table for extended chars */ static const uint8_t excvt[] = _EXCVT; /* Upper conversion table for extended chars */
@@ -1889,7 +1890,7 @@ static
void get_fileinfo ( /* No return code */ void get_fileinfo ( /* No return code */
DIR *dj, /* Pointer to the directory object */ DIR *dj, /* Pointer to the directory object */
FILINFO *fno /* Pointer to the file information to be filled */ FILINFO *fno /* Pointer to the file information to be filled */
) )
{ {
uint32_t i; uint32_t i;
uint8_t nt, *dir; uint8_t nt, *dir;
@@ -1971,7 +1972,7 @@ static
FRESULT follow_path ( /* FR_OK(0): successful, !=0: error code */ FRESULT follow_path ( /* FR_OK(0): successful, !=0: error code */
DIR *dj, /* Directory object to return last directory and found object */ DIR *dj, /* Directory object to return last directory and found object */
const TCHAR *path /* Full-path string to find a file or directory */ const TCHAR *path /* Full-path string to find a file or directory */
) )
{ {
FRESULT res; FRESULT res;
uint8_t *dir, ns; uint8_t *dir, ns;
@@ -2033,7 +2034,7 @@ static
uint8_t check_fs ( /* 0:FAT-VBR, 1:Any BR but not FAT, 2:Not a BR, 3:Disk error */ uint8_t check_fs ( /* 0:FAT-VBR, 1:Any BR but not FAT, 2:Not a BR, 3:Disk error */
FATFS *fs, /* File system object */ FATFS *fs, /* File system object */
uint32_t sect /* Sector# (lba) to check if it is an FAT boot record or not */ uint32_t sect /* Sector# (lba) to check if it is an FAT boot record or not */
) )
{ {
if (disk_read(fs->drv, fs->win, sect, 1) != RES_OK) /* Load boot record */ if (disk_read(fs->drv, fs->win, sect, 1) != RES_OK) /* Load boot record */
return 3; return 3;
@@ -2060,7 +2061,7 @@ FRESULT chk_mounted ( /* FR_OK(0): successful, !=0: any error occurred */
const TCHAR **path, /* Pointer to pointer to the path name (drive number) */ const TCHAR **path, /* Pointer to pointer to the path name (drive number) */
FATFS **rfs, /* Pointer to pointer to the found file system object */ FATFS **rfs, /* Pointer to pointer to the found file system object */
uint8_t wmode /* !=0: Check write protection for write access */ uint8_t wmode /* !=0: Check write protection for write access */
) )
{ {
uint8_t fmt, b, pi, *tbl; uint8_t fmt, b, pi, *tbl;
uint32_t vol; uint32_t vol;
@@ -2225,7 +2226,7 @@ FRESULT chk_mounted ( /* FR_OK(0): successful, !=0: any error occurred */
static static
FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */ FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */
void* obj /* Pointer to the object FIL/DIR to check validity */ void* obj /* Pointer to the object FIL/DIR to check validity */
) )
{ {
FIL *fil; FIL *fil;
@@ -2260,7 +2261,7 @@ FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */
FRESULT f_mount ( FRESULT f_mount (
uint8_t vol, /* Logical drive number to be mounted/unmounted */ uint8_t vol, /* Logical drive number to be mounted/unmounted */
FATFS *fs /* Pointer to new file system object (NULL for unmount)*/ FATFS *fs /* Pointer to new file system object (NULL for unmount)*/
) )
{ {
FATFS *rfs; FATFS *rfs;
@@ -2301,7 +2302,7 @@ FRESULT f_open (
FIL *fp, /* Pointer to the blank file object */ FIL *fp, /* Pointer to the blank file object */
const TCHAR *path, /* Pointer to the file name */ const TCHAR *path, /* Pointer to the file name */
uint8_t mode /* Access mode and file open mode flags */ uint8_t mode /* Access mode and file open mode flags */
) )
{ {
FRESULT res; FRESULT res;
DIR dj; DIR dj;
@@ -2434,7 +2435,7 @@ FRESULT f_read (
void *buff, /* Pointer to data buffer */ void *buff, /* Pointer to data buffer */
uint32_t btr, /* Number of bytes to read */ uint32_t btr, /* Number of bytes to read */
uint32_t *br /* Pointer to number of bytes read */ uint32_t *br /* Pointer to number of bytes read */
) )
{ {
FRESULT res; FRESULT res;
uint32_t clst, sect, remain; uint32_t clst, sect, remain;
@@ -2535,7 +2536,7 @@ FRESULT f_write (
const void *buff, /* Pointer to the data to be written */ const void *buff, /* Pointer to the data to be written */
uint32_t btw, /* Number of bytes to write */ uint32_t btw, /* Number of bytes to write */
uint32_t *bw /* Pointer to number of bytes written */ uint32_t *bw /* Pointer to number of bytes written */
) )
{ {
FRESULT res; FRESULT res;
uint32_t clst, sect; uint32_t clst, sect;
@@ -2651,7 +2652,7 @@ FRESULT f_write (
FRESULT f_sync ( FRESULT f_sync (
FIL *fp /* Pointer to the file object */ FIL *fp /* Pointer to the file object */
) )
{ {
FRESULT res; FRESULT res;
uint32_t tim; uint32_t tim;
@@ -2699,7 +2700,7 @@ FRESULT f_sync (
FRESULT f_close ( FRESULT f_close (
FIL *fp /* Pointer to the file object to be closed */ FIL *fp /* Pointer to the file object to be closed */
) )
{ {
FRESULT res; FRESULT res;
@@ -2745,7 +2746,7 @@ FRESULT f_close (
FRESULT f_chdrive ( FRESULT f_chdrive (
uint8_t drv /* Drive number */ uint8_t drv /* Drive number */
) )
{ {
if (drv >= _VOLUMES) return FR_INVALID_DRIVE; if (drv >= _VOLUMES) return FR_INVALID_DRIVE;
@@ -2758,7 +2759,7 @@ FRESULT f_chdrive (
FRESULT f_chdir ( FRESULT f_chdir (
const TCHAR *path /* Pointer to the directory path */ const TCHAR *path /* Pointer to the directory path */
) )
{ {
FRESULT res; FRESULT res;
DIR dj; DIR dj;
@@ -2791,7 +2792,7 @@ FRESULT f_chdir (
FRESULT f_getcwd ( FRESULT f_getcwd (
TCHAR *path, /* Pointer to the directory path */ TCHAR *path, /* Pointer to the directory path */
uint32_t sz_path /* Size of path */ uint32_t sz_path /* Size of path */
) )
{ {
FRESULT res; FRESULT res;
DIR dj; DIR dj;
@@ -2869,7 +2870,7 @@ FRESULT f_getcwd (
FRESULT f_lseek ( FRESULT f_lseek (
FIL *fp, /* Pointer to the file object */ FIL *fp, /* Pointer to the file object */
uint32_t ofs /* File pointer from top of file */ uint32_t ofs /* File pointer from top of file */
) )
{ {
FRESULT res; FRESULT res;
@@ -2941,9 +2942,9 @@ FRESULT f_lseek (
uint32_t clst, bcs, nsect, ifptr; uint32_t clst, bcs, nsect, ifptr;
if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */ if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */
#if !_FS_READONLY #if !_FS_READONLY
&& !(fp->flag & FA_WRITE) && !(fp->flag & FA_WRITE)
#endif #endif
) ofs = fp->fsize; ) ofs = fp->fsize;
ifptr = fp->fptr; ifptr = fp->fptr;
@@ -3027,7 +3028,7 @@ FRESULT f_lseek (
FRESULT f_opendir ( FRESULT f_opendir (
DIR *dj, /* Pointer to directory object to create */ DIR *dj, /* Pointer to directory object to create */
const char *path /* Pointer to the directory path */ const char *path /* Pointer to the directory path */
) )
{ {
FRESULT res; FRESULT res;
FATFS *fs; FATFS *fs;
@@ -3074,7 +3075,7 @@ FRESULT f_opendir (
FRESULT f_readdir ( FRESULT f_readdir (
DIR *dj, /* Pointer to the open directory object */ DIR *dj, /* Pointer to the open directory object */
FILINFO *fno /* Pointer to file information to return */ FILINFO *fno /* Pointer to file information to return */
) )
{ {
FRESULT res; FRESULT res;
DEF_NAMEBUF; DEF_NAMEBUF;
@@ -3116,7 +3117,7 @@ FRESULT f_readdir (
FRESULT f_stat ( FRESULT f_stat (
const TCHAR *path, /* Pointer to the file path */ const TCHAR *path, /* Pointer to the file path */
FILINFO *fno /* Pointer to file information to return */ FILINFO *fno /* Pointer to file information to return */
) )
{ {
FRESULT res; FRESULT res;
DIR dj; DIR dj;
@@ -3150,7 +3151,7 @@ FRESULT f_getfree (
const TCHAR *path, /* Pointer to the logical drive number (root dir) */ const TCHAR *path, /* Pointer to the logical drive number (root dir) */
uint32_t *nclst, /* Pointer to the variable to return number of free clusters */ uint32_t *nclst, /* Pointer to the variable to return number of free clusters */
FATFS **fatfs /* Pointer to pointer to corresponding file system object to return */ FATFS **fatfs /* Pointer to pointer to corresponding file system object to return */
) )
{ {
FRESULT res; FRESULT res;
FATFS *fs; FATFS *fs;
@@ -3215,7 +3216,7 @@ FRESULT f_getfree (
FRESULT f_truncate ( FRESULT f_truncate (
FIL *fp /* Pointer to the file object */ FIL *fp /* Pointer to the file object */
) )
{ {
FRESULT res; FRESULT res;
uint32_t ncl; uint32_t ncl;
@@ -3265,7 +3266,7 @@ FRESULT f_truncate (
FRESULT f_unlink ( FRESULT f_unlink (
const TCHAR *path /* Pointer to the file or directory path */ const TCHAR *path /* Pointer to the file or directory path */
) )
{ {
FRESULT res; FRESULT res;
DIR dj, sdj; DIR dj, sdj;
@@ -3302,9 +3303,9 @@ FRESULT f_unlink (
if (res == FR_OK) { if (res == FR_OK) {
res = dir_read(&sdj); res = dir_read(&sdj);
if (res == FR_OK /* Not empty dir */ if (res == FR_OK /* Not empty dir */
#if _FS_RPATH #if _FS_RPATH
|| dclst == dj.fs->cdir /* Current dir */ || dclst == dj.fs->cdir /* Current dir */
#endif #endif
) res = FR_DENIED; ) res = FR_DENIED;
if (res == FR_NO_FILE) res = FR_OK; /* Empty */ if (res == FR_NO_FILE) res = FR_OK; /* Empty */
} }
@@ -3333,7 +3334,7 @@ FRESULT f_unlink (
FRESULT f_mkdir ( FRESULT f_mkdir (
const TCHAR *path /* Pointer to the directory path */ const TCHAR *path /* Pointer to the directory path */
) )
{ {
FRESULT res; FRESULT res;
DIR dj; DIR dj;
@@ -3408,7 +3409,7 @@ FRESULT f_chmod (
const TCHAR *path, /* Pointer to the file path */ const TCHAR *path, /* Pointer to the file path */
uint8_t value, /* Attribute bits */ uint8_t value, /* Attribute bits */
uint8_t mask /* Attribute mask to change */ uint8_t mask /* Attribute mask to change */
) )
{ {
FRESULT res; FRESULT res;
DIR dj; DIR dj;
@@ -3449,7 +3450,7 @@ FRESULT f_chmod (
FRESULT f_utime ( FRESULT f_utime (
const TCHAR *path, /* Pointer to the file/directory name */ const TCHAR *path, /* Pointer to the file/directory name */
const FILINFO *fno /* Pointer to the time stamp to be set */ const FILINFO *fno /* Pointer to the time stamp to be set */
) )
{ {
FRESULT res; FRESULT res;
DIR dj; DIR dj;
@@ -3490,7 +3491,7 @@ FRESULT f_utime (
FRESULT f_rename ( FRESULT f_rename (
const TCHAR *path_old, /* Pointer to the old name */ const TCHAR *path_old, /* Pointer to the old name */
const TCHAR *path_new /* Pointer to the new name */ const TCHAR *path_new /* Pointer to the new name */
) )
{ {
FRESULT res; FRESULT res;
DIR djo, djn; DIR djo, djn;
@@ -3518,7 +3519,7 @@ FRESULT f_rename (
res = follow_path(&djn, path_new); res = follow_path(&djn, path_new);
if (res == FR_OK) res = FR_EXIST; /* The new object name is already existing */ if (res == FR_OK) res = FR_EXIST; /* The new object name is already existing */
if (res == FR_NO_FILE) { /* Is it a valid path and no name collision? */ if (res == FR_NO_FILE) { /* Is it a valid path and no name collision? */
/* Start critical section that an interruption or error can cause cross-link */ /* Start critical section that an interruption or error can cause cross-link */
res = dir_register(&djn); /* Register the new entry */ res = dir_register(&djn); /* Register the new entry */
if (res == FR_OK) { if (res == FR_OK) {
dir = djn.dir; /* Copy object information except for name */ dir = djn.dir; /* Copy object information except for name */
@@ -3545,7 +3546,7 @@ FRESULT f_rename (
res = sync(djo.fs); res = sync(djo.fs);
} }
} }
/* End critical section */ /* End critical section */
} }
} }
} }
@@ -3571,7 +3572,7 @@ FRESULT f_forward (
uint32_t (*func)(const uint8_t*,uint32_t), /* Pointer to the streaming function */ uint32_t (*func)(const uint8_t*,uint32_t), /* Pointer to the streaming function */
uint32_t btr, /* Number of bytes to forward */ uint32_t btr, /* Number of bytes to forward */
uint32_t *bf /* Pointer to number of bytes forwarded */ uint32_t *bf /* Pointer to number of bytes forwarded */
) )
{ {
FRESULT res; FRESULT res;
uint32_t remain, clst, sect; uint32_t remain, clst, sect;
@@ -3635,7 +3636,7 @@ FRESULT f_mkfs (
uint8_t drv, /* Logical drive number */ uint8_t drv, /* Logical drive number */
uint8_t sfd, /* Partitioning rule 0:FDISK, 1:SFD */ uint8_t sfd, /* Partitioning rule 0:FDISK, 1:SFD */
uint32_t au /* Allocation unit size [bytes] */ uint32_t au /* Allocation unit size [bytes] */
) )
{ {
static const uint16_t vst[] = { 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 0}; static const uint16_t vst[] = { 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 0};
static const uint16_t cst[] = {32768, 16384, 8192, 4096, 2048, 16384, 8192, 4096, 2048, 1024, 512}; static const uint16_t cst[] = {32768, 16384, 8192, 4096, 2048, 16384, 8192, 4096, 2048, 1024, 512};
@@ -3871,7 +3872,7 @@ FRESULT f_fdisk (
uint8_t pdrv, /* Physical drive number */ uint8_t pdrv, /* Physical drive number */
const uint32_t szt[], /* Pointer to the size table for each partitions */ const uint32_t szt[], /* Pointer to the size table for each partitions */
void* work /* Pointer to the working buffer */ void* work /* Pointer to the working buffer */
) )
{ {
uint32_t i, n, sz_cyl, tot_cyl, b_cyl, e_cyl, p_cyl; uint32_t i, n, sz_cyl, tot_cyl, b_cyl, e_cyl, p_cyl;
uint8_t s_hd, e_hd, *p, *buf = (uint8_t*)work; uint8_t s_hd, e_hd, *p, *buf = (uint8_t*)work;
@@ -3943,7 +3944,7 @@ TCHAR* f_gets (
TCHAR* buff, /* Pointer to the string buffer to read */ TCHAR* buff, /* Pointer to the string buffer to read */
int len, /* Size of string buffer (characters) */ int len, /* Size of string buffer (characters) */
FIL* fil /* Pointer to the file object */ FIL* fil /* Pointer to the file object */
) )
{ {
int n = 0; int n = 0;
TCHAR c, *p = buff; TCHAR c, *p = buff;
@@ -3996,7 +3997,7 @@ TCHAR* f_gets (
int f_putc ( int f_putc (
TCHAR c, /* A character to be output */ TCHAR c, /* A character to be output */
FIL* fil /* Pointer to the file object */ FIL* fil /* Pointer to the file object */
) )
{ {
uint32_t bw, btw; uint32_t bw, btw;
uint8_t s[3]; uint8_t s[3];
@@ -4039,7 +4040,7 @@ int f_putc (
int f_puts ( int f_puts (
const TCHAR* str, /* Pointer to the string to be output */ const TCHAR* str, /* Pointer to the string to be output */
FIL* fil /* Pointer to the file object */ FIL* fil /* Pointer to the file object */
) )
{ {
int n; int n;
@@ -4060,7 +4061,7 @@ int f_printf (
FIL* fil, /* Pointer to the file object */ FIL* fil, /* Pointer to the file object */
const TCHAR* str, /* Pointer to the format string */ const TCHAR* str, /* Pointer to the format string */
... /* Optional arguments... */ ... /* Optional arguments... */
) )
{ {
va_list arp; va_list arp;
uint8_t f, r; uint8_t f, r;

View File

@@ -57,17 +57,17 @@ struct descriptor
static struct descriptor rom_descriptor = static struct descriptor rom_descriptor =
{ {
{ {
0x8, /* bDescLength */ 0x8, /* bDescLength */
0x29, /* bDescriptorType: hub descriptor */ 0x29, /* bDescriptorType: hub descriptor */
2, /* bNrPorts -- runtime modified */ 2, /* bNrPorts -- runtime modified */
0, /* wHubCharacteristics */ 0, /* wHubCharacteristics */
0xff, /* bPwrOn2PwrGood */ 0xff, /* bPwrOn2PwrGood */
0, /* bHubCntrCurrent */ 0, /* bHubCntrCurrent */
{}, /* Device removable */ {}, /* Device removable */
{} /* at most 7 ports! XXX */ {} /* at most 7 ports! XXX */
}, },
{ {
0x12, /* bLength */ 0x12, /* bLength */
1, /* bDescriptorType: UDESC_DEVICE */ 1, /* bDescriptorType: UDESC_DEVICE */
0x0002, /* bcdUSB: v2.0 */ 0x0002, /* bcdUSB: v2.0 */
@@ -82,8 +82,8 @@ static struct descriptor rom_descriptor =
2, /* iProduct */ 2, /* iProduct */
0, /* iSerialNumber */ 0, /* iSerialNumber */
1 /* bNumConfigurations: 1 */ 1 /* bNumConfigurations: 1 */
}, },
{ {
0x9, 0x9,
2, /* bDescriptorType: UDESC_CONFIG */ 2, /* bDescriptorType: UDESC_CONFIG */
(0x19 << 8), /* cpu_to_le16(0x19), */ (0x19 << 8), /* cpu_to_le16(0x19), */
@@ -92,8 +92,8 @@ static struct descriptor rom_descriptor =
0, /* iConfiguration */ 0, /* iConfiguration */
0x40, /* bmAttributes: UC_SELF_POWER */ 0x40, /* bmAttributes: UC_SELF_POWER */
0 /* bMaxPower */ 0 /* bMaxPower */
}, },
{ {
0x9, /* bLength */ 0x9, /* bLength */
4, /* bDescriptorType: UDESC_INTERFACE */ 4, /* bDescriptorType: UDESC_INTERFACE */
0, /* bInterfaceNumber */ 0, /* bInterfaceNumber */
@@ -103,20 +103,20 @@ static struct descriptor rom_descriptor =
0, /* bInterfaceSubClass: UISUBCLASS_HUB */ 0, /* bInterfaceSubClass: UISUBCLASS_HUB */
0, /* bInterfaceProtocol: UIPROTO_HSHUBSTT */ 0, /* bInterfaceProtocol: UIPROTO_HSHUBSTT */
0 /* iInterface */ 0 /* iInterface */
}, },
{ {
0x7, /* bLength */ 0x7, /* bLength */
5, /* bDescriptorType: UDESC_ENDPOINT */ 5, /* bDescriptorType: UDESC_ENDPOINT */
0x81, /* bEndpointAddress: UE_DIR_IN | EHCI_INTR_ENDPT */ 0x81, /* bEndpointAddress: UE_DIR_IN | EHCI_INTR_ENDPT */
3, /* bmAttributes: UE_INTERRUPT */ 3, /* bmAttributes: UE_INTERRUPT */
8, 0, /* wMaxPacketSize */ 8, 0, /* wMaxPacketSize */
255 /* bInterval */ 255 /* bInterval */
}, },
}; };
struct pci_device_id ehci_usb_pci_table[] = struct pci_device_id ehci_usb_pci_table[] =
{ {
{ {
PCI_VENDOR_ID_NEC, PCI_VENDOR_ID_NEC,
PCI_DEVICE_ID_NEC_USB_2, PCI_DEVICE_ID_NEC_USB_2,
PCI_ANY_ID, PCI_ANY_ID,
@@ -124,8 +124,8 @@ struct pci_device_id ehci_usb_pci_table[] =
PCI_CLASS_SERIAL_USB_EHCI, PCI_CLASS_SERIAL_USB_EHCI,
0, 0,
0 0
}, /* NEC PCI OHCI module ids */ }, /* NEC PCI OHCI module ids */
{ {
PCI_VENDOR_ID_NEC, PCI_VENDOR_ID_NEC,
PCI_DEVICE_ID_NEC_USB_3, PCI_DEVICE_ID_NEC_USB_3,
PCI_ANY_ID, PCI_ANY_ID,
@@ -133,8 +133,8 @@ struct pci_device_id ehci_usb_pci_table[] =
PCI_CLASS_SERIAL_USB_EHCI, PCI_CLASS_SERIAL_USB_EHCI,
0, 0,
0 0
}, },
{ {
PCI_VENDOR_ID_PHILIPS, PCI_VENDOR_ID_PHILIPS,
PCI_DEVICE_ID_PHILIPS_ISP1561_2, PCI_DEVICE_ID_PHILIPS_ISP1561_2,
PCI_ANY_ID, PCI_ANY_ID,
@@ -142,9 +142,9 @@ struct pci_device_id ehci_usb_pci_table[] =
PCI_CLASS_SERIAL_USB_EHCI, PCI_CLASS_SERIAL_USB_EHCI,
0, 0,
0 0
}, /* Philips 1561 PCI OHCI module ids */ }, /* Philips 1561 PCI OHCI module ids */
/* Please add supported PCI OHCI controller ids here */ /* Please add supported PCI OHCI controller ids here */
{ {
0, 0,
0, 0,
0, 0,
@@ -152,7 +152,7 @@ struct pci_device_id ehci_usb_pci_table[] =
0, 0,
0, 0,
0 0
} }
}; };
static struct ehci static struct ehci

View File

@@ -109,7 +109,7 @@ inline void writel(uint32_t value, uint32_t *address)
struct pci_device_id ohci_usb_pci_table[] = struct pci_device_id ohci_usb_pci_table[] =
{ {
{ {
PCI_VENDOR_ID_AL, PCI_VENDOR_ID_AL,
PCI_DEVICE_ID_AL_M5237, PCI_DEVICE_ID_AL_M5237,
PCI_ANY_ID, PCI_ANY_ID,
@@ -117,8 +117,8 @@ struct pci_device_id ohci_usb_pci_table[] =
PCI_CLASS_SERIAL_USB_OHCI, PCI_CLASS_SERIAL_USB_OHCI,
0, 0,
0 0
}, /* ULI1575 PCI OHCI module ids */ }, /* ULI1575 PCI OHCI module ids */
{ {
PCI_VENDOR_ID_NEC, PCI_VENDOR_ID_NEC,
PCI_DEVICE_ID_NEC_USB, PCI_DEVICE_ID_NEC_USB,
PCI_ANY_ID, PCI_ANY_ID,
@@ -126,8 +126,8 @@ struct pci_device_id ohci_usb_pci_table[] =
PCI_CLASS_SERIAL_USB_OHCI, PCI_CLASS_SERIAL_USB_OHCI,
0, 0,
0 0
}, /* NEC PCI OHCI module ids */ }, /* NEC PCI OHCI module ids */
{ {
PCI_VENDOR_ID_NEC, PCI_VENDOR_ID_NEC,
PCI_DEVICE_ID_NEC_USB_A, PCI_DEVICE_ID_NEC_USB_A,
PCI_ANY_ID, PCI_ANY_ID,
@@ -135,8 +135,8 @@ struct pci_device_id ohci_usb_pci_table[] =
PCI_CLASS_SERIAL_USB_OHCI, PCI_CLASS_SERIAL_USB_OHCI,
0, 0,
0 0
}, /* NEC PCI OHCI module ids */ }, /* NEC PCI OHCI module ids */
{ {
PCI_VENDOR_ID_PHILIPS, PCI_VENDOR_ID_PHILIPS,
PCI_DEVICE_ID_PHILIPS_ISP1561, PCI_DEVICE_ID_PHILIPS_ISP1561,
PCI_ANY_ID, PCI_ANY_ID,
@@ -144,9 +144,9 @@ struct pci_device_id ohci_usb_pci_table[] =
PCI_CLASS_SERIAL_USB_OHCI, PCI_CLASS_SERIAL_USB_OHCI,
0, 0,
0 0
}, /* Philips 1561 PCI OHCI module ids */ }, /* Philips 1561 PCI OHCI module ids */
/* Please add supported PCI OHCI controller ids here */ /* Please add supported PCI OHCI controller ids here */
{ {
0, 0,
0, 0,
0, 0,
@@ -154,7 +154,7 @@ struct pci_device_id ohci_usb_pci_table[] =
0, 0,
0, 0,
0 0
} }
}; };
/* global ohci_t */ /* global ohci_t */
@@ -395,7 +395,7 @@ static void ohci_dump_roothub(ohci_t *controller, int verbose)
temp = roothub_a(controller); temp = roothub_a(controller);
(void) temp; (void) temp;
// ndp = (temp & RH_A_NDP); // ndp = (temp & RH_A_NDP);
ndp = controller->ndp; ndp = controller->ndp;
if (verbose) if (verbose)
{ {
@@ -1344,7 +1344,7 @@ int rh_check_port_status(ohci_t *controller)
uint32_t temp, ndp, i; uint32_t temp, ndp, i;
int res = -1; int res = -1;
temp = roothub_a(controller); temp = roothub_a(controller);
// ndp = (temp & RH_A_NDP); // ndp = (temp & RH_A_NDP);
ndp = controller->ndp; ndp = controller->ndp;
for (i = 0; i < ndp; i++) for (i = 0; i < ndp; i++)
{ {
@@ -1524,7 +1524,7 @@ static int ohci_submit_rh_msg(ohci_t *ohci, struct usb_device *dev, uint32_t pip
uint32_t temp = roothub_a(ohci); uint32_t temp = roothub_a(ohci);
data_buf[0] = 9; /* min length; */ data_buf[0] = 9; /* min length; */
data_buf[1] = 0x29; data_buf[1] = 0x29;
// data_buf[2] = temp & RH_A_NDP; // data_buf[2] = temp & RH_A_NDP;
data_buf[2] = (uint8_t)ohci->ndp; data_buf[2] = (uint8_t)ohci->ndp;
data_buf[3] = 0; data_buf[3] = 0;

View File

@@ -84,7 +84,7 @@ extern void run_bios(struct radeonfb_info *rinfo);
0, \ 0, \
0, \ 0, \
(flags) | (CHIP_FAMILY_##family) \ (flags) | (CHIP_FAMILY_##family) \
} }
struct pci_device_id radeonfb_pci_table[] = struct pci_device_id radeonfb_pci_table[] =
{ {
@@ -904,7 +904,7 @@ int radeonfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
int radeonfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) int radeonfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{ {
struct radeonfb_info *rinfo = info->par; struct radeonfb_info *rinfo = info->par;
// DPRINT("radeonfb: radeonfb_pan_display\r\n"); // DPRINT("radeonfb: radeonfb_pan_display\r\n");
if ((var->xoffset + var->xres) > var->xres_virtual) if ((var->xoffset + var->xres) > var->xres_virtual)
return -1; //-EINVAL; return -1; //-EINVAL;
@@ -1373,7 +1373,7 @@ static void radeon_timer_func(void)
int w = (int)info->var.xres_virtual; int w = (int)info->var.xres_virtual;
int h = (int)info->var.yres_virtual; int h = (int)info->var.yres_virtual;
// info->fbops->SetClippingRectangle(info,0,0,w-1,h-1); // info->fbops->SetClippingRectangle(info,0,0,w-1,h-1);
src_buf = (uint8_t*)((int32_t)src_buf & ~3); src_buf = (uint8_t*)((int32_t)src_buf & ~3);
dst_x -= (int32_t)skipleft; dst_x -= (int32_t)skipleft;
w += (int32_t)skipleft; w += (int32_t)skipleft;
@@ -1386,7 +1386,7 @@ static void radeon_timer_func(void)
src_buf += (info->var.xres_virtual >> 3); src_buf += (info->var.xres_virtual >> 3);
} }
// info->fbops->DisableClipping(info); // info->fbops->DisableClipping(info);
if (info->update_mono > 0) if (info->update_mono > 0)
info->update_mono = 0; info->update_mono = 0;
} }
@@ -1535,7 +1535,7 @@ static void radeon_calc_pll_regs(struct radeonfb_info *rinfo, struct radeon_regs
{ 6, 6 }, { 6, 6 },
{ 12, 7 }, { 12, 7 },
{ 0, 0 }, { 0, 0 },
}; };
int fb_div, pll_output_freq = 0; int fb_div, pll_output_freq = 0;
int uses_dvo = 0; int uses_dvo = 0;
@@ -2174,7 +2174,7 @@ int32_t radeonfb_pci_register(int32_t handle, const struct pci_device_id *ent)
rinfo->fb_base = (void *)(pci_rsc_desc->offset + pci_rsc_desc->start); rinfo->fb_base = (void *)(pci_rsc_desc->offset + pci_rsc_desc->start);
rinfo->fb_base_phys = pci_rsc_desc->start; rinfo->fb_base_phys = pci_rsc_desc->start;
rinfo->mapped_vram = pci_rsc_desc->length; rinfo->mapped_vram = pci_rsc_desc->length;
// rinfo->dma_offset = pci_rsc_desc->dmaoffset; // rinfo->dma_offset = pci_rsc_desc->dmaoffset;
if ((pci_rsc_desc->flags & FLG_ENDMASK) == ORD_MOTOROLA) if ((pci_rsc_desc->flags & FLG_ENDMASK) == ORD_MOTOROLA)
{ {
rinfo->big_endian = 0; /* host bridge make swapping intel -> motorola */ rinfo->big_endian = 0; /* host bridge make swapping intel -> motorola */
@@ -2362,8 +2362,8 @@ int32_t radeonfb_pci_register(int32_t handle, const struct pci_device_id *ent)
memcpy(&rinfo->state, &rinfo->init_state, sizeof(struct radeon_regs)); memcpy(&rinfo->state, &rinfo->init_state, sizeof(struct radeon_regs));
/* Setup Power Management capabilities */ /* Setup Power Management capabilities */
// DPRINT("radeonfb: radeonfb_pci_register: setup power management\r\n"); // DPRINT("radeonfb: radeonfb_pci_register: setup power management\r\n");
// radeonfb_pm_init(rinfo, (int)default_dynclk); // radeonfb_pm_init(rinfo, (int)default_dynclk);
dbg("install VBL timer\r\n"); dbg("install VBL timer\r\n");
rinfo->lvds_timer = 0; rinfo->lvds_timer = 0;
@@ -2383,7 +2383,7 @@ void radeonfb_pci_unregister(void)
{ {
struct fb_info *info = info_fb; struct fb_info *info = info_fb;
struct radeonfb_info *rinfo = info->par; struct radeonfb_info *rinfo = info->par;
// radeonfb_pm_exit(rinfo); // radeonfb_pm_exit(rinfo);
uninstall_vbl_timer(radeon_timer_func); uninstall_vbl_timer(radeon_timer_func);
if (rinfo->mon1_EDID!=NULL) if (rinfo->mon1_EDID!=NULL)
driver_mem_free(rinfo->mon1_EDID); driver_mem_free(rinfo->mon1_EDID);

View File

@@ -85,8 +85,8 @@ void radeon_set_cursor_colors(struct fb_info *info, int bg, int fg)
int pixel, i; int pixel, i;
CURSOR_SWAPPING_DECL_MMIO CURSOR_SWAPPING_DECL_MMIO
CURSOR_SWAPPING_DECL CURSOR_SWAPPING_DECL
// DPRINTVALHEX("radeonfb: RADEONSetCursorColors: cursor_start ",rinfo->cursor_start); // DPRINTVALHEX("radeonfb: RADEONSetCursorColors: cursor_start ",rinfo->cursor_start);
// DPRINT("\r\n"); // DPRINT("\r\n");
fg |= 0xff000000; fg |= 0xff000000;
bg |= 0xff000000; bg |= 0xff000000;
/* Don't recolour the image if we don't have to. */ /* Don't recolour the image if we don't have to. */
@@ -123,10 +123,10 @@ void radeon_set_cursor_position(struct fb_info *info, int x, int y)
if (y < 0) if (y < 0)
yorigin = 1 - y; yorigin = 1 - y;
// DPRINTVALHEX("radeonfb: RADEONSetCursorPosition: cursor_start ",rinfo->cursor_start); // DPRINTVALHEX("radeonfb: RADEONSetCursorPosition: cursor_start ",rinfo->cursor_start);
// DPRINTVAL(" x ",x); // DPRINTVAL(" x ",x);
// DPRINTVAL(" y ",y); // DPRINTVAL(" y ",y);
// DPRINT("\r\n"); // DPRINT("\r\n");
OUTREG(CUR_HORZ_VERT_OFF, (CUR_LOCK | (xorigin << 16) | yorigin)); OUTREG(CUR_HORZ_VERT_OFF, (CUR_LOCK | (xorigin << 16) | yorigin));
OUTREG(CUR_HORZ_VERT_POSN, (CUR_LOCK | ((xorigin ? 0 : x) << 16) | (yorigin ? 0 : y))); OUTREG(CUR_HORZ_VERT_POSN, (CUR_LOCK | ((xorigin ? 0 : x) << 16) | (yorigin ? 0 : y)));
@@ -151,8 +151,8 @@ void radeon_load_cursor_image(struct fb_info *info, unsigned short *mask, unsign
unsigned long i, j, k; unsigned long i, j, k;
CURSOR_SWAPPING_DECL CURSOR_SWAPPING_DECL
// DPRINTVALHEX("radeonfb: RADEONLoadCursorImage: cursor_start ",rinfo->cursor_start); // DPRINTVALHEX("radeonfb: RADEONLoadCursorImage: cursor_start ",rinfo->cursor_start);
// DPRINT("\r\n"); // DPRINT("\r\n");
save = INREG(CRTC_GEN_CNTL) & ~(unsigned long) (3 << 20); save = INREG(CRTC_GEN_CNTL) & ~(unsigned long) (3 << 20);
save |= (unsigned long) (2 << 20); save |= (unsigned long) (2 << 20);
@@ -293,7 +293,7 @@ void radeon_hide_cursor(struct fb_info *info)
{ {
struct radeonfb_info *rinfo = info->par; struct radeonfb_info *rinfo = info->par;
// DPRINT("radeonfb: RADEONHideCursor\r\n"); // DPRINT("radeonfb: RADEONHideCursor\r\n");
OUTREGP(CRTC_GEN_CNTL, 0, ~CRTC_CUR_EN); OUTREGP(CRTC_GEN_CNTL, 0, ~CRTC_CUR_EN);
rinfo->cursor_show = 0; rinfo->cursor_show = 0;
} }
@@ -303,7 +303,7 @@ void radeon_show_cursor(struct fb_info *info)
{ {
struct radeonfb_info *rinfo = info->par; struct radeonfb_info *rinfo = info->par;
// DPRINT("radeonfb: RADEONShowCursor\r\n"); // DPRINT("radeonfb: RADEONShowCursor\r\n");
OUTREGP(CRTC_GEN_CNTL, CRTC_CUR_EN, ~CRTC_CUR_EN); OUTREGP(CRTC_GEN_CNTL, CRTC_CUR_EN, ~CRTC_CUR_EN);
rinfo->cursor_show = 1; rinfo->cursor_show = 1;
} }

View File

@@ -37,7 +37,7 @@ struct baudrate
static const int system_clock = 132000000; /* System clock in Hz */ static const int system_clock = 132000000; /* System clock in Hz */
struct baudrate baudrates[] = static struct baudrate baudrates[] =
{ {
{ 0b0000, 0b00, 4 }, { 0b0000, 0b00, 4 },
{ 0b0000, 0b01, 6 }, { 0b0000, 0b01, 6 },

View File

@@ -28,7 +28,7 @@
#define res_matches(v, x, y) \ #define res_matches(v, x, y) \
((v).xres == (x) && (v).yres == (y)) ((v).xres == (x) && (v).yres == (y))
/* /*
* Standard video mode definitions (taken from XFree86) * Standard video mode definitions (taken from XFree86)
*/ */
@@ -36,292 +36,292 @@
const struct fb_videomode modedb[] = const struct fb_videomode modedb[] =
{ {
{ {
/* 640x400 @ 70 Hz, 31.5 kHz hsync */ /* 640x400 @ 70 Hz, 31.5 kHz hsync */
70, 640, 400, 39721, 40, 24, 39, 9, 96, 2, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 640x480 @ 60 Hz, 31.5 kHz hsync */ /* 640x480 @ 60 Hz, 31.5 kHz hsync */
60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 800x600 @ 56 Hz, 35.15 kHz hsync */ /* 800x600 @ 56 Hz, 35.15 kHz hsync */
56, 800, 600, 27777, 128, 24, 22, 1, 72, 2, 56, 800, 600, 27777, 128, 24, 22, 1, 72, 2,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1024x768 @ 87 Hz interlaced, 35.5 kHz hsync */ /* 1024x768 @ 87 Hz interlaced, 35.5 kHz hsync */
87, 1024, 768, 22271, 56, 24, 33, 8, 160, 8, 87, 1024, 768, 22271, 56, 24, 33, 8, 160, 8,
0, FB_VMODE_INTERLACED 0, FB_VMODE_INTERLACED
}, },
{ {
/* 640x400 @ 85 Hz, 37.86 kHz hsync */ /* 640x400 @ 85 Hz, 37.86 kHz hsync */
85, 640, 400, 31746, 96, 32, 41, 1, 64, 3, 85, 640, 400, 31746, 96, 32, 41, 1, 64, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 640x480 @ 72 Hz, 36.5 kHz hsync */ /* 640x480 @ 72 Hz, 36.5 kHz hsync */
72, 640, 480, 31746, 144, 40, 30, 8, 40, 3, 72, 640, 480, 31746, 144, 40, 30, 8, 40, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 640x480 @ 75 Hz, 37.50 kHz hsync */ /* 640x480 @ 75 Hz, 37.50 kHz hsync */
75, 640, 480, 31746, 120, 16, 16, 1, 64, 3, 75, 640, 480, 31746, 120, 16, 16, 1, 64, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 800x600 @ 60 Hz, 37.8 kHz hsync */ /* 800x600 @ 60 Hz, 37.8 kHz hsync */
60, 800, 600, 25000, 88, 40, 23, 1, 128, 4, 60, 800, 600, 25000, 88, 40, 23, 1, 128, 4,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 640x480 @ 85 Hz, 43.27 kHz hsync */ /* 640x480 @ 85 Hz, 43.27 kHz hsync */
85, 640, 480, 27777, 80, 56, 25, 1, 56, 3, 85, 640, 480, 27777, 80, 56, 25, 1, 56, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1152x864 @ 89 Hz interlaced, 44 kHz hsync */ /* 1152x864 @ 89 Hz interlaced, 44 kHz hsync */
69, 1152, 864, 15384, 96, 16, 110, 1, 216, 10, 69, 1152, 864, 15384, 96, 16, 110, 1, 216, 10,
0, FB_VMODE_INTERLACED 0, FB_VMODE_INTERLACED
}, },
{ {
/* 800x600 @ 72 Hz, 48.0 kHz hsync */ /* 800x600 @ 72 Hz, 48.0 kHz hsync */
72, 800, 600, 20000, 64, 56, 23, 37, 120, 6, 72, 800, 600, 20000, 64, 56, 23, 37, 120, 6,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1024x768 @ 60 Hz, 48.4 kHz hsync */ /* 1024x768 @ 60 Hz, 48.4 kHz hsync */
60, 1024, 768, 15384, 168, 8, 29, 3, 144, 6, 60, 1024, 768, 15384, 168, 8, 29, 3, 144, 6,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 640x480 @ 100 Hz, 53.01 kHz hsync */ /* 640x480 @ 100 Hz, 53.01 kHz hsync */
100, 640, 480, 21834, 96, 32, 36, 8, 96, 6, 100, 640, 480, 21834, 96, 32, 36, 8, 96, 6,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1152x864 @ 60 Hz, 53.5 kHz hsync */ /* 1152x864 @ 60 Hz, 53.5 kHz hsync */
60, 1152, 864, 11123, 208, 64, 16, 4, 256, 8, 60, 1152, 864, 11123, 208, 64, 16, 4, 256, 8,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 800x600 @ 85 Hz, 55.84 kHz hsync */ /* 800x600 @ 85 Hz, 55.84 kHz hsync */
85, 800, 600, 16460, 160, 64, 36, 16, 64, 5, 85, 800, 600, 16460, 160, 64, 36, 16, 64, 5,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1024x768 @ 70 Hz, 56.5 kHz hsync */ /* 1024x768 @ 70 Hz, 56.5 kHz hsync */
70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6, 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x1024 @ 87 Hz interlaced, 51 kHz hsync */ /* 1280x1024 @ 87 Hz interlaced, 51 kHz hsync */
87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12, 87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12,
0, FB_VMODE_INTERLACED 0, FB_VMODE_INTERLACED
}, },
{ {
/* 800x600 @ 100 Hz, 64.02 kHz hsync */ /* 800x600 @ 100 Hz, 64.02 kHz hsync */
100, 800, 600, 14357, 160, 64, 30, 4, 64, 6, 100, 800, 600, 14357, 160, 64, 30, 4, 64, 6,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1024x768 @ 76 Hz, 62.5 kHz hsync */ /* 1024x768 @ 76 Hz, 62.5 kHz hsync */
76, 1024, 768, 11764, 208, 8, 36, 16, 120, 3, 76, 1024, 768, 11764, 208, 8, 36, 16, 120, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1152x864 @ 70 Hz, 62.4 kHz hsync */ /* 1152x864 @ 70 Hz, 62.4 kHz hsync */
70, 1152, 864, 10869, 106, 56, 20, 1, 160, 10, 70, 1152, 864, 10869, 106, 56, 20, 1, 160, 10,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x1024 @ 61 Hz, 64.2 kHz hsync */ /* 1280x1024 @ 61 Hz, 64.2 kHz hsync */
61, 1280, 1024, 9090, 200, 48, 26, 1, 184, 3, 61, 1280, 1024, 9090, 200, 48, 26, 1, 184, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1400x1050 @ 60Hz, 63.9 kHz hsync */ /* 1400x1050 @ 60Hz, 63.9 kHz hsync */
68, 1400, 1050, 9259, 136, 40, 13, 1, 112, 3, 68, 1400, 1050, 9259, 136, 40, 13, 1, 112, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1400x1050 @ 75,107 Hz, 82,392 kHz +hsync +vsync*/ /* 1400x1050 @ 75,107 Hz, 82,392 kHz +hsync +vsync*/
75, 1400, 1050, 9271, 120, 56, 13, 0, 112, 3, 75, 1400, 1050, 9271, 120, 56, 13, 0, 112, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1400x1050 @ 60 Hz, ? kHz +hsync +vsync*/ /* 1400x1050 @ 60 Hz, ? kHz +hsync +vsync*/
60, 1400, 1050, 9259, 128, 40, 12, 0, 112, 3, 60, 1400, 1050, 9259, 128, 40, 12, 0, 112, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1024x768 @ 85 Hz, 70.24 kHz hsync */ /* 1024x768 @ 85 Hz, 70.24 kHz hsync */
85, 1024, 768, 10111, 192, 32, 34, 14, 160, 6, 85, 1024, 768, 10111, 192, 32, 34, 14, 160, 6,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1152x864 @ 78 Hz, 70.8 kHz hsync */ /* 1152x864 @ 78 Hz, 70.8 kHz hsync */
78, 1152, 864, 9090, 228, 88, 32, 0, 84, 12, 78, 1152, 864, 9090, 228, 88, 32, 0, 84, 12,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x1024 @ 70 Hz, 74.59 kHz hsync */ /* 1280x1024 @ 70 Hz, 74.59 kHz hsync */
70, 1280, 1024, 7905, 224, 32, 28, 8, 160, 8, 70, 1280, 1024, 7905, 224, 32, 28, 8, 160, 8,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1600x1200 @ 60Hz, 75.00 kHz hsync */ /* 1600x1200 @ 60Hz, 75.00 kHz hsync */
60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3, 60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1152x864 @ 84 Hz, 76.0 kHz hsync */ /* 1152x864 @ 84 Hz, 76.0 kHz hsync */
84, 1152, 864, 7407, 184, 312, 32, 0, 128, 12, 84, 1152, 864, 7407, 184, 312, 32, 0, 128, 12,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x1024 @ 74 Hz, 78.85 kHz hsync */ /* 1280x1024 @ 74 Hz, 78.85 kHz hsync */
74, 1280, 1024, 7407, 256, 32, 34, 3, 144, 3, 74, 1280, 1024, 7407, 256, 32, 34, 3, 144, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1024x768 @ 100Hz, 80.21 kHz hsync */ /* 1024x768 @ 100Hz, 80.21 kHz hsync */
100, 1024, 768, 8658, 192, 32, 21, 3, 192, 10, 100, 1024, 768, 8658, 192, 32, 21, 3, 192, 10,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x1024 @ 76 Hz, 81.13 kHz hsync */ /* 1280x1024 @ 76 Hz, 81.13 kHz hsync */
76, 1280, 1024, 7407, 248, 32, 34, 3, 104, 3, 76, 1280, 1024, 7407, 248, 32, 34, 3, 104, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1600x1200 @ 70 Hz, 87.50 kHz hsync */ /* 1600x1200 @ 70 Hz, 87.50 kHz hsync */
70, 1600, 1200, 5291, 304, 64, 46, 1, 192, 3, 70, 1600, 1200, 5291, 304, 64, 46, 1, 192, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1152x864 @ 100 Hz, 89.62 kHz hsync */ /* 1152x864 @ 100 Hz, 89.62 kHz hsync */
100, 1152, 864, 7264, 224, 32, 17, 2, 128, 19, 100, 1152, 864, 7264, 224, 32, 17, 2, 128, 19,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x1024 @ 85 Hz, 91.15 kHz hsync */ /* 1280x1024 @ 85 Hz, 91.15 kHz hsync */
85, 1280, 1024, 6349, 224, 64, 44, 1, 160, 3, 85, 1280, 1024, 6349, 224, 64, 44, 1, 160, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1600x1200 @ 75 Hz, 93.75 kHz hsync */ /* 1600x1200 @ 75 Hz, 93.75 kHz hsync */
75, 1600, 1200, 4938, 304, 64, 46, 1, 192, 3, 75, 1600, 1200, 4938, 304, 64, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1600x1200 @ 85 Hz, 105.77 kHz hsync */ /* 1600x1200 @ 85 Hz, 105.77 kHz hsync */
85, 1600, 1200, 4545, 272, 16, 37, 4, 192, 3, 85, 1600, 1200, 4545, 272, 16, 37, 4, 192, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x1024 @ 100 Hz, 107.16 kHz hsync */ /* 1280x1024 @ 100 Hz, 107.16 kHz hsync */
100, 1280, 1024, 5502, 256, 32, 26, 7, 128, 15, 100, 1280, 1024, 5502, 256, 32, 26, 7, 128, 15,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1800x1440 @ 64Hz, 96.15 kHz hsync */ /* 1800x1440 @ 64Hz, 96.15 kHz hsync */
64, 1800, 1440, 4347, 304, 96, 46, 1, 192, 3, 64, 1800, 1440, 4347, 304, 96, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1800x1440 @ 70Hz, 104.52 kHz hsync */ /* 1800x1440 @ 70Hz, 104.52 kHz hsync */
70, 1800, 1440, 4000, 304, 96, 46, 1, 192, 3, 70, 1800, 1440, 4000, 304, 96, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 512x384 @ 78 Hz, 31.50 kHz hsync */ /* 512x384 @ 78 Hz, 31.50 kHz hsync */
78, 512, 384, 49603, 48, 16, 16, 1, 64, 3, 78, 512, 384, 49603, 48, 16, 16, 1, 64, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 512x384 @ 85 Hz, 34.38 kHz hsync */ /* 512x384 @ 85 Hz, 34.38 kHz hsync */
85, 512, 384, 45454, 48, 16, 16, 1, 64, 3, 85, 512, 384, 45454, 48, 16, 16, 1, 64, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio */ /* 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio */
70, 320, 200, 79440, 16, 16, 20, 4, 48, 1, 70, 320, 200, 79440, 16, 16, 20, 4, 48, 1,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio */ /* 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio */
60, 320, 240, 79440, 16, 16, 16, 5, 48, 1, 60, 320, 240, 79440, 16, 16, 16, 5, 48, 1,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 320x240 @ 72 Hz, 36.5 kHz hsync */ /* 320x240 @ 72 Hz, 36.5 kHz hsync */
72, 320, 240, 63492, 16, 16, 16, 4, 48, 2, 72, 320, 240, 63492, 16, 16, 16, 4, 48, 2,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio */ /* 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio */
56, 400, 300, 55555, 64, 16, 10, 1, 32, 1, 56, 400, 300, 55555, 64, 16, 10, 1, 32, 1,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 400x300 @ 60 Hz, 37.8 kHz hsync */ /* 400x300 @ 60 Hz, 37.8 kHz hsync */
60, 400, 300, 50000, 48, 16, 11, 1, 64, 2, 60, 400, 300, 50000, 48, 16, 11, 1, 64, 2,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 400x300 @ 72 Hz, 48.0 kHz hsync */ /* 400x300 @ 72 Hz, 48.0 kHz hsync */
72, 400, 300, 40000, 32, 24, 11, 19, 64, 3, 72, 400, 300, 40000, 32, 24, 11, 19, 64, 3,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 480x300 @ 56 Hz, 35.2 kHz hsync, 8:5 aspect ratio */ /* 480x300 @ 56 Hz, 35.2 kHz hsync, 8:5 aspect ratio */
56, 480, 300, 46176, 80, 16, 10, 1, 40, 1, 56, 480, 300, 46176, 80, 16, 10, 1, 40, 1,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 480x300 @ 60 Hz, 37.8 kHz hsync */ /* 480x300 @ 60 Hz, 37.8 kHz hsync */
60, 480, 300, 41858, 56, 16, 11, 1, 80, 2, 60, 480, 300, 41858, 56, 16, 11, 1, 80, 2,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 480x300 @ 63 Hz, 39.6 kHz hsync */ /* 480x300 @ 63 Hz, 39.6 kHz hsync */
63, 480, 300, 40000, 56, 16, 11, 1, 80, 2, 63, 480, 300, 40000, 56, 16, 11, 1, 80, 2,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 480x300 @ 72 Hz, 48.0 kHz hsync */ /* 480x300 @ 72 Hz, 48.0 kHz hsync */
72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3,
0, FB_VMODE_DOUBLE 0, FB_VMODE_DOUBLE
}, },
{ {
/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */ /* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED FB_VMODE_NONINTERLACED
}, },
{ {
/* 1152x768, 60 Hz, PowerBook G4 Titanium I and II */ /* 1152x768, 60 Hz, PowerBook G4 Titanium I and II */
60, 1152, 768, 14047, 158, 26, 29, 3, 136, 6, 60, 1152, 768, 14047, 158, 26, 29, 3, 136, 6,
FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1920x1080, 60 Hz, 1080pf */ /* 1920x1080, 60 Hz, 1080pf */
60, 1920, 1080, 6741, 148, 44, 36, 4, 88, 5, 60, 1920, 1080, 6741, 148, 44, 36, 4, 88, 5,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1366x768, 60 Hz, 47.403 kHz hsync, WXGA 16:9 aspect ratio */ /* 1366x768, 60 Hz, 47.403 kHz hsync, WXGA 16:9 aspect ratio */
60, 1366, 768, 13806, 120, 10, 14, 3, 32, 5, 60, 1366, 768, 13806, 120, 10, 14, 3, 32, 5,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
{ {
/* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */ /* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */
60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3,
0, FB_VMODE_NONINTERLACED 0, FB_VMODE_NONINTERLACED
}, },
}; };
long total_modedb = sizeof(modedb) / sizeof(*modedb); long total_modedb = sizeof(modedb) / sizeof(*modedb);
@@ -329,73 +329,73 @@ long total_modedb = sizeof(modedb) / sizeof(*modedb);
const struct fb_videomode vesa_modes[] = const struct fb_videomode vesa_modes[] =
{ {
/* 0 640x350-85 VESA */ /* 0 640x350-85 VESA */
{ 85, 640, 350, 31746, 96, 32, 60, 32, 64, 3, FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA}, { 85, 640, 350, 31746, 96, 32, 60, 32, 64, 3, FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA},
/* 1 640x400-85 VESA */ /* 1 640x400-85 VESA */
{ 85, 640, 400, 31746, 96, 32, 41, 01, 64, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 640, 400, 31746, 96, 32, 41, 01, 64, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 2 720x400-85 VESA */ /* 2 720x400-85 VESA */
{ 85, 721, 400, 28169, 108, 36, 42, 01, 72, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 721, 400, 28169, 108, 36, 42, 01, 72, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 3 640x480-60 VESA */ /* 3 640x480-60 VESA */
{ 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 4 640x480-72 VESA */ /* 4 640x480-72 VESA */
{ 72, 640, 480, 31746, 128, 24, 29, 9, 40, 2, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 72, 640, 480, 31746, 128, 24, 29, 9, 40, 2, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 5 640x480-75 VESA */ /* 5 640x480-75 VESA */
{ 75, 640, 480, 31746, 120, 16, 16, 01, 64, 3, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 640, 480, 31746, 120, 16, 16, 01, 64, 3, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 6 640x480-85 VESA */ /* 6 640x480-85 VESA */
{ 85, 640, 480, 27777, 80, 56, 25, 01, 56, 3, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 640, 480, 27777, 80, 56, 25, 01, 56, 3, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 7 800x600-56 VESA */ /* 7 800x600-56 VESA */
{ 56, 800, 600, 27777, 128, 24, 22, 01, 72, 2, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 56, 800, 600, 27777, 128, 24, 22, 01, 72, 2, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 8 800x600-60 VESA */ /* 8 800x600-60 VESA */
{ 60, 800, 600, 25000, 88, 40, 23, 01, 128, 4, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 800, 600, 25000, 88, 40, 23, 01, 128, 4, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 9 800x600-72 VESA */ /* 9 800x600-72 VESA */
{ 72, 800, 600, 20000, 64, 56, 23, 37, 120, 6, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 72, 800, 600, 20000, 64, 56, 23, 37, 120, 6, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 10 800x600-75 VESA */ /* 10 800x600-75 VESA */
{ 75, 800, 600, 20202, 160, 16, 21, 01, 80, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 800, 600, 20202, 160, 16, 21, 01, 80, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 11 800x600-85 VESA */ /* 11 800x600-85 VESA */
{ 85, 800, 600, 17761, 152, 32, 27, 01, 64, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 800, 600, 17761, 152, 32, 27, 01, 64, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 12 1024x768i-43 VESA */ /* 12 1024x768i-43 VESA */
{ 53, 1024, 768, 22271, 56, 8, 41, 0, 176, 8, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, FB_MODE_IS_VESA }, { 53, 1024, 768, 22271, 56, 8, 41, 0, 176, 8, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, FB_MODE_IS_VESA },
/* 13 1024x768-60 VESA */ /* 13 1024x768-60 VESA */
{ 60, 1024, 768, 15384, 160, 24, 29, 3, 136, 6, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1024, 768, 15384, 160, 24, 29, 3, 136, 6, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 14 1024x768-70 VESA */ /* 14 1024x768-70 VESA */
{ 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 15 1024x768-75 VESA */ /* 15 1024x768-75 VESA */
{ 75, 1024, 768, 12690, 176, 16, 28, 1, 96, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 1024, 768, 12690, 176, 16, 28, 1, 96, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 16 1024x768-85 VESA */ /* 16 1024x768-85 VESA */
{ 85, 1024, 768, 10582, 208, 48, 36, 1, 96, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 1024, 768, 10582, 208, 48, 36, 1, 96, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 17 1152x864-75 VESA */ /* 17 1152x864-75 VESA */
{ 75, 1153, 864, 9259, 256, 64, 32, 1, 128, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 1153, 864, 9259, 256, 64, 32, 1, 128, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 18 1280x960-60 VESA */ /* 18 1280x960-60 VESA */
{ 60, 1280, 960, 9259, 312, 96, 36, 1, 112, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1280, 960, 9259, 312, 96, 36, 1, 112, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 19 1280x960-85 VESA */ /* 19 1280x960-85 VESA */
{ 85, 1280, 960, 6734, 224, 64, 47, 1, 160, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 1280, 960, 6734, 224, 64, 47, 1, 160, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 20 1280x1024-60 VESA */ /* 20 1280x1024-60 VESA */
{ 60, 1280, 1024, 9259, 248, 48, 38, 1, 112, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1280, 1024, 9259, 248, 48, 38, 1, 112, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 21 1280x1024-75 VESA */ /* 21 1280x1024-75 VESA */
{ 75, 1280, 1024, 7407, 248, 16, 38, 1, 144, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 1280, 1024, 7407, 248, 16, 38, 1, 144, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 22 1280x1024-85 VESA */ /* 22 1280x1024-85 VESA */
{ 85, 1280, 1024, 6349, 224, 64, 44, 1, 160, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 1280, 1024, 6349, 224, 64, 44, 1, 160, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 23 1600x1200-60 VESA */ /* 23 1600x1200-60 VESA */
{ 60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 24 1600x1200-65 VESA */ /* 24 1600x1200-65 VESA */
{ 65, 1600, 1200, 5698, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 65, 1600, 1200, 5698, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 25 1600x1200-70 VESA */ /* 25 1600x1200-70 VESA */
{ 70, 1600, 1200, 5291, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 70, 1600, 1200, 5291, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 26 1600x1200-75 VESA */ /* 26 1600x1200-75 VESA */
{ 75, 1600, 1200, 4938, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 1600, 1200, 4938, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 27 1600x1200-85 VESA */ /* 27 1600x1200-85 VESA */
{ 85, 1600, 1200, 4357, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 85, 1600, 1200, 4357, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 28 1792x1344-60 VESA */ /* 28 1792x1344-60 VESA */
{ 60, 1792, 1344, 4882, 328, 128, 46, 1, 200, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1792, 1344, 4882, 328, 128, 46, 1, 200, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 29 1792x1344-75 VESA */ /* 29 1792x1344-75 VESA */
{ 75, 1792, 1344, 3831, 352, 96, 69, 1, 216, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 1792, 1344, 3831, 352, 96, 69, 1, 216, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 30 1856x1392-60 VESA */ /* 30 1856x1392-60 VESA */
{ 60, 1856, 1392, 4580, 352, 96, 43, 1, 224, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1856, 1392, 4580, 352, 96, 43, 1, 224, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 31 1856x1392-75 VESA */ /* 31 1856x1392-75 VESA */
{ 75, 1856, 1392, 3472, 352, 128, 104, 1, 224, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 75, 1856, 1392, 3472, 352, 128, 104, 1, 224, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 32 1920x1440-60 VESA */ /* 32 1920x1440-60 VESA */
{ 60, 1920, 1440, 4273, 344, 128, 56, 1, 200, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1920, 1440, 4273, 344, 128, 56, 1, 200, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 33 1920x1440-75 VESA */ /* 33 1920x1440-75 VESA */
{ 60, 1920, 1440, 3367, 352, 144, 56, 1, 224, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, { 60, 1920, 1440, 3367, 352, 144, 56, 1, 224, 3, FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
}; };
/** /**

View File

@@ -47,22 +47,22 @@ struct broken_edid {
static struct broken_edid brokendb[] = { static struct broken_edid brokendb[] = {
/* DEC FR-PCXAV-YZ */ /* DEC FR-PCXAV-YZ */
{ {
.manufacturer = "DEC", .manufacturer = "DEC",
.model = 0x073a, .model = 0x073a,
.fix = FBMON_FIX_HEADER, .fix = FBMON_FIX_HEADER,
}, },
/* ViewSonic PF775a */ /* ViewSonic PF775a */
{ {
.manufacturer = "VSC", .manufacturer = "VSC",
.model = 0x5a44, .model = 0x5a44,
.fix = FBMON_FIX_INPUT, .fix = FBMON_FIX_INPUT,
}, },
}; };
static const unsigned char edid_v1_header[] = { 0x00, 0xff, 0xff, 0xff, static const unsigned char edid_v1_header[] = { 0x00, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x00 0xff, 0xff, 0xff, 0x00
}; };
static void copy_string(unsigned char *c, unsigned char *s) static void copy_string(unsigned char *c, unsigned char *s)
{ {
@@ -535,7 +535,7 @@ static void free_db(struct fb_videomode *db)
*/ */
void fb_destroy_modedb(struct fb_videomode *modedb) void fb_destroy_modedb(struct fb_videomode *modedb)
{ {
// Funcs_free(modedb); // Funcs_free(modedb);
free_db(modedb); free_db(modedb);
} }
@@ -555,7 +555,7 @@ static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize)
struct fb_videomode *mode, *m; struct fb_videomode *mode, *m;
unsigned char *block; unsigned char *block;
int num = 0, i; int num = 0, i;
// mode = Funcs_malloc(50 * sizeof(struct fb_videomode), 3); // mode = Funcs_malloc(50 * sizeof(struct fb_videomode), 3);
mode = alloc_db(50); mode = alloc_db(50);
if(mode == NULL) if(mode == NULL)
return NULL; return NULL;
@@ -601,7 +601,7 @@ static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize)
return NULL; return NULL;
} }
*dbsize = num; *dbsize = num;
// m = Funcs_malloc(num * sizeof(struct fb_videomode), 3); // m = Funcs_malloc(num * sizeof(struct fb_videomode), 3);
m = alloc_db(num); m = alloc_db(num);
if(!m) if(!m)
return mode; return mode;

View File

@@ -375,7 +375,7 @@ void run_bios(struct radeonfb_info *rinfo)
outb(0x00, 0x40); outb(0x00, 0x40);
outb(0x00, 0x40); outb(0x00, 0x40);
} }
// setup_int_vect(); // setup_int_vect();
/* cpu setup */ /* cpu setup */
emu.x86.R_AX = devfn ? devfn : 0xff; emu.x86.R_AX = devfn ? devfn : 0xff;
@@ -396,10 +396,10 @@ void run_bios(struct radeonfb_info *rinfo)
*/ */
pushw(&emu, 0xf4f4); /* hlt; hlt */ pushw(&emu, 0xf4f4); /* hlt; hlt */
// pushw(0x10cd); /* int #0x10 */ // pushw(0x10cd); /* int #0x10 */
// pushw(0x0013); /* 320 x 200 x 256 colors */ // pushw(0x0013); /* 320 x 200 x 256 colors */
// // pushw(0x000F); /* 640 x 350 x mono */ // // pushw(0x000F); /* 640 x 350 x mono */
// pushw(0xb890); /* nop, mov ax,#0x13 */ // pushw(0xb890); /* nop, mov ax,#0x13 */
pushw(&emu, emu.x86.R_SS); pushw(&emu, emu.x86.R_SS);
pushw(&emu, emu.x86.R_SP + 2); pushw(&emu, emu.x86.R_SP + 2);
#ifdef DBG_X86EMU #ifdef DBG_X86EMU
@@ -412,6 +412,6 @@ void run_bios(struct radeonfb_info *rinfo)
X86EMU_exec(&emu); X86EMU_exec(&emu);
//*vblsem = 1; //*vblsem = 1;
dbg("%s: X86EMU halted\r\n", __FUNCTION__); dbg("%s: X86EMU halted\r\n", __FUNCTION__);
// biosfn_set_video_mode(0x13); /* 320 x 200 x 256 colors */ // biosfn_set_video_mode(0x13); /* 320 x 200 x 256 colors */
memset((char *) biosmem, 0, SIZE_EMU); memset((char *) biosmem, 0, SIZE_EMU);
} }

View File

@@ -1707,7 +1707,7 @@ uint8_t(*const opc80_byte_operation[]) (struct X86EMU *, uint8_t d, uint8_t s) =
sub_byte, /* 05 */ sub_byte, /* 05 */
xor_byte, /* 06 */ xor_byte, /* 06 */
cmp_byte, /* 07 */ cmp_byte, /* 07 */
}; };
/**************************************************************************** /****************************************************************************
REMARKS: REMARKS:
Handles opcode 0x80 Handles opcode 0x80
@@ -1741,7 +1741,7 @@ uint16_t(* const opc81_word_operation[]) (struct X86EMU *, uint16_t d, uint16_t
sub_word, /* 05 */ sub_word, /* 05 */
xor_word, /* 06 */ xor_word, /* 06 */
cmp_word, /* 07 */ cmp_word, /* 07 */
}; };
static static
uint32_t(* const opc81_long_operation[]) (struct X86EMU *, uint32_t d, uint32_t s) = uint32_t(* const opc81_long_operation[]) (struct X86EMU *, uint32_t d, uint32_t s) =
@@ -1754,7 +1754,7 @@ uint32_t(* const opc81_long_operation[]) (struct X86EMU *, uint32_t d, uint32_t
sub_long, /* 05 */ sub_long, /* 05 */
xor_long, /* 06 */ xor_long, /* 06 */
cmp_long, /* 07 */ cmp_long, /* 07 */
}; };
/**************************************************************************** /****************************************************************************
REMARKS: REMARKS:
Handles opcode 0x81 Handles opcode 0x81
@@ -1815,7 +1815,7 @@ uint8_t(* const opc82_byte_operation[]) (struct X86EMU *, uint8_t s, uint8_t d)
sub_byte, /* 05 */ sub_byte, /* 05 */
xor_byte, /* 06 *//* YYY UNUSED ???? */ xor_byte, /* 06 *//* YYY UNUSED ???? */
cmp_byte, /* 07 */ cmp_byte, /* 07 */
}; };
/**************************************************************************** /****************************************************************************
REMARKS: REMARKS:
Handles opcode 0x82 Handles opcode 0x82
@@ -1850,7 +1850,7 @@ uint16_t(* const opc83_word_operation[]) (struct X86EMU *, uint16_t s, uint16_t
sub_word, /* 05 */ sub_word, /* 05 */
xor_word, /* 06 *//* YYY UNUSED ???? */ xor_word, /* 06 *//* YYY UNUSED ???? */
cmp_word, /* 07 */ cmp_word, /* 07 */
}; };
static static
uint32_t(* const opc83_long_operation[]) (struct X86EMU *, uint32_t s, uint32_t d) = uint32_t(* const opc83_long_operation[]) (struct X86EMU *, uint32_t s, uint32_t d) =
@@ -1863,7 +1863,7 @@ uint32_t(* const opc83_long_operation[]) (struct X86EMU *, uint32_t s, uint32_t
sub_long, /* 05 */ sub_long, /* 05 */
xor_long, /* 06 *//* YYY UNUSED ???? */ xor_long, /* 06 *//* YYY UNUSED ???? */
cmp_long, /* 07 */ cmp_long, /* 07 */
}; };
/**************************************************************************** /****************************************************************************
REMARKS: REMARKS:
Handles opcode 0x83 Handles opcode 0x83
@@ -3023,7 +3023,7 @@ uint8_t(* const opcD0_byte_operation[]) (struct X86EMU *, uint8_t d, uint8_t s)
shr_byte, shr_byte,
shl_byte, /* sal_byte === shl_byte by definition */ shl_byte, /* sal_byte === shl_byte by definition */
sar_byte, sar_byte,
}; };
/**************************************************************************** /****************************************************************************
REMARKS: REMARKS:
Handles opcode 0xc0 Handles opcode 0xc0
@@ -3056,7 +3056,7 @@ uint16_t(* const opcD1_word_operation[]) (struct X86EMU *, uint16_t s, uint8_t d
shr_word, shr_word,
shl_word, /* sal_byte === shl_byte by definition */ shl_word, /* sal_byte === shl_byte by definition */
sar_word, sar_word,
}; };
/* used by opcodes c1, d1, and d3. */ /* used by opcodes c1, d1, and d3. */
static static
uint32_t(* const opcD1_long_operation[]) (struct X86EMU *, uint32_t s, uint8_t d) = uint32_t(* const opcD1_long_operation[]) (struct X86EMU *, uint32_t s, uint8_t d) =
@@ -3069,7 +3069,7 @@ uint32_t(* const opcD1_long_operation[]) (struct X86EMU *, uint32_t s, uint8_t d
shr_long, shr_long,
shl_long, /* sal_byte === shl_byte by definition */ shl_long, /* sal_byte === shl_byte by definition */
sar_long, sar_long,
}; };
/**************************************************************************** /****************************************************************************
REMARKS: REMARKS:
Handles opcode 0xc1 Handles opcode 0xc1