@@ -173,23 +173,22 @@ - (void)writeTablesToFile: (OFString*)path { void *pool = objc_autoreleasePoolPush(); OFFile *file = [OFFile fileWithPath: path mode: @"wb"]; - of_unichar_t i, j; [file writeString: COPYRIGHT @"#include \"config.h\"\n" @"\n" @"#import \"OFString.h\"\n\n" @"static const of_unichar_t emptyPage[0x100] = { 0 };\n\n"]; /* Write uppercasePage%u */ - for (i = 0; i < 0x110000; i += 0x100) { + for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (j = i; j < i + 0x100; j++) { + for (of_unichar_t j = i; j < i + 0x100; j++) { if (_uppercaseTable[j] != 0) { isEmpty = false; _uppercaseTableSize = i >> 8; _uppercaseTableUsed[_uppercaseTableSize] = 1; break; @@ -201,11 +200,11 @@ [file writeString: [OFString stringWithFormat: @"static const of_unichar_t " @"uppercasePage%u[0x100] = {\n", i >> 8]]; - for (j = i; j < i + 0x100; j += 8) + for (of_unichar_t j = i; j < i + 0x100; j += 8) [file writeString: [OFString stringWithFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _uppercaseTable[j], _uppercaseTable[j + 1], _uppercaseTable[j + 2], @@ -220,14 +219,14 @@ objc_autoreleasePoolPop(pool2); } } /* Write lowercasePage%u */ - for (i = 0; i < 0x110000; i += 0x100) { + for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (j = i; j < i + 0x100; j++) { + for (of_unichar_t j = i; j < i + 0x100; j++) { if (_lowercaseTable[j] != 0) { isEmpty = false; _lowercaseTableSize = i >> 8; _lowercaseTableUsed[_lowercaseTableSize] = 1; break; @@ -239,11 +238,11 @@ [file writeString: [OFString stringWithFormat: @"static const of_unichar_t " @"lowercasePage%u[0x100] = {\n", i >> 8]]; - for (j = i; j < i + 0x100; j += 8) + for (of_unichar_t j = i; j < i + 0x100; j += 8) [file writeString: [OFString stringWithFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _lowercaseTable[j], _lowercaseTable[j + 1], _lowercaseTable[j + 2], @@ -258,14 +257,14 @@ objc_autoreleasePoolPop(pool2); } } /* Write titlecasePage%u if it does NOT match uppercasePage%u */ - for (i = 0; i < 0x110000; i += 0x100) { + for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (j = i; j < i + 0x100; j++) { + for (of_unichar_t j = i; j < i + 0x100; j++) { if (_titlecaseTable[j] != 0) { isEmpty = !memcmp(_uppercaseTable + i, _titlecaseTable + i, 256 * sizeof(of_unichar_t)); _titlecaseTableSize = i >> 8; @@ -280,11 +279,11 @@ [file writeString: [OFString stringWithFormat: @"static const of_unichar_t " @"titlecasePage%u[0x100] = {\n", i >> 8]]; - for (j = i; j < i + 0x100; j += 8) + for (of_unichar_t j = i; j < i + 0x100; j += 8) [file writeString: [OFString stringWithFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _titlecaseTable[j], _titlecaseTable[j + 1], _titlecaseTable[j + 2], @@ -299,14 +298,14 @@ objc_autoreleasePoolPop(pool2); } } /* Write casefoldingPage%u if it does NOT match lowercasePage%u */ - for (i = 0; i < 0x110000; i += 0x100) { + for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (j = i; j < i + 0x100; j++) { + for (of_unichar_t j = i; j < i + 0x100; j++) { if (_casefoldingTable[j] != 0) { isEmpty = !memcmp(_lowercaseTable + i, _casefoldingTable + i, 256 * sizeof(of_unichar_t)); _casefoldingTableSize = i >> 8; @@ -321,11 +320,11 @@ [file writeString: [OFString stringWithFormat: @"static const of_unichar_t " @"casefoldingPage%u[0x100] = {\n", i >> 8]]; - for (j = i; j < i + 0x100; j += 8) + for (of_unichar_t j = i; j < i + 0x100; j += 8) [file writeString: [OFString stringWithFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _casefoldingTable[j], _casefoldingTable[j + 1], _casefoldingTable[j + 2], @@ -353,11 +352,11 @@ /* Write of_unicode_uppercase_table */ [file writeString: [OFString stringWithFormat: @"const of_unichar_t* const of_unicode_uppercase_table[0x%X] = " @"{\n\t", _uppercaseTableSize]]; - for (i = 0; i < _uppercaseTableSize; i++) { + for (of_unichar_t i = 0; i < _uppercaseTableSize; i++) { if (_uppercaseTableUsed[i]) { [file writeString: [OFString stringWithFormat: @"uppercasePage%u", i]]; } else [file writeString: @"emptyPage"]; @@ -375,11 +374,11 @@ /* Write of_unicode_lowercase_table */ [file writeString: [OFString stringWithFormat: @"const of_unichar_t* const of_unicode_lowercase_table[0x%X] = " @"{\n\t", _lowercaseTableSize]]; - for (i = 0; i < _lowercaseTableSize; i++) { + for (of_unichar_t i = 0; i < _lowercaseTableSize; i++) { if (_lowercaseTableUsed[i]) { [file writeString: [OFString stringWithFormat: @"lowercasePage%u", i]]; } else [file writeString: @"emptyPage"]; @@ -397,11 +396,11 @@ /* Write of_unicode_titlecase_table */ [file writeString: [OFString stringWithFormat: @"const of_unichar_t* const of_unicode_titlecase_table[0x%X] = {" @"\n\t", _titlecaseTableSize]]; - for (i = 0; i < _titlecaseTableSize; i++) { + for (of_unichar_t i = 0; i < _titlecaseTableSize; i++) { if (_titlecaseTableUsed[i] == 1) { [file writeString: [OFString stringWithFormat: @"titlecasePage%u", i]]; } else if (_titlecaseTableUsed[i] == 2) { [file writeString: [OFString stringWithFormat: @@ -422,11 +421,11 @@ /* Write of_unicode_casefolding_table */ [file writeString: [OFString stringWithFormat: @"const of_unichar_t* const of_unicode_casefolding_table[0x%X] = " @"{\n\t", _casefoldingTableSize]]; - for (i = 0; i < _casefoldingTableSize; i++) { + for (of_unichar_t i = 0; i < _casefoldingTableSize; i++) { if (_casefoldingTableUsed[i] == 1) { [file writeString: [OFString stringWithFormat: @"casefoldingPage%u", i]]; } else if (_casefoldingTableUsed[i] == 2) { [file writeString: [OFString stringWithFormat: