Index: generators/unicode/TableGenerator.h ================================================================== --- generators/unicode/TableGenerator.h +++ generators/unicode/TableGenerator.h @@ -20,14 +20,14 @@ @interface TableGenerator: OFObject { OFHTTPClient *_HTTPClient; - of_unichar_t _uppercaseTable[0x110000]; - of_unichar_t _lowercaseTable[0x110000]; - of_unichar_t _titlecaseTable[0x110000]; - of_unichar_t _casefoldingTable[0x110000]; + OFUnichar _uppercaseTable[0x110000]; + OFUnichar _lowercaseTable[0x110000]; + OFUnichar _titlecaseTable[0x110000]; + OFUnichar _casefoldingTable[0x110000]; OFString *_decompositionTable[0x110000]; OFString *_decompositionCompatTable[0x110000]; char _uppercaseTableUsed[0x1100]; char _lowercaseTableUsed[0x1100]; char _titlecaseTableUsed[0x1100]; Index: generators/unicode/TableGenerator.m ================================================================== --- generators/unicode/TableGenerator.m +++ generators/unicode/TableGenerator.m @@ -101,11 +101,11 @@ [of_stdout writeString: @"Parsing UnicodeData.txt…"]; while ((line = [response readLine]) != nil) { void *pool2; OFArray OF_GENERIC(OFString *) *components; - of_unichar_t codePoint; + OFUnichar codePoint; if (line.length == 0) continue; pool2 = objc_autoreleasePoolPush(); @@ -114,21 +114,21 @@ if (components.count != 15) { of_log(@"Invalid line: %@\n", line); [OFApplication terminateWithStatus: 1]; } - codePoint = (of_unichar_t)[[components objectAtIndex: 0] + codePoint = (OFUnichar)[[components objectAtIndex: 0] unsignedLongLongValueWithBase: 16]; if (codePoint > 0x10FFFF) @throw [OFOutOfRangeException exception]; - _uppercaseTable[codePoint] = (of_unichar_t)[[components + _uppercaseTable[codePoint] = (OFUnichar)[[components objectAtIndex: 12] unsignedLongLongValueWithBase: 16]; - _lowercaseTable[codePoint] = (of_unichar_t)[[components + _lowercaseTable[codePoint] = (OFUnichar)[[components objectAtIndex: 13] unsignedLongLongValueWithBase: 16]; - _titlecaseTable[codePoint] = (of_unichar_t)[[components + _titlecaseTable[codePoint] = (OFUnichar)[[components objectAtIndex: 14] unsignedLongLongValueWithBase: 16]; if ([[components objectAtIndex: 5] length] > 0) { OFArray *decomposed = [[components objectAtIndex: 5] componentsSeparatedByString: @" "]; @@ -142,11 +142,11 @@ } string = [OFMutableString string]; for (OFString *character in decomposed) { - of_unichar_t unichar = (of_unichar_t)[character + OFUnichar unichar = (OFUnichar)[character unsignedLongLongValueWithBase: 16]; [string appendCharacters: &unichar length: 1]; } @@ -180,11 +180,11 @@ [of_stdout writeString: @"Parsing CaseFolding.txt…"]; while ((line = [response readLine]) != nil) { void *pool2; OFArray OF_GENERIC(OFString *) *components; - of_unichar_t codePoint; + OFUnichar codePoint; if (line.length == 0 || [line hasPrefix: @"#"]) continue; pool2 = objc_autoreleasePoolPush(); @@ -197,17 +197,17 @@ if (![[components objectAtIndex: 1] isEqual: @"S"] && ![[components objectAtIndex: 1] isEqual: @"C"]) continue; - codePoint = (of_unichar_t)[[components objectAtIndex: 0] + codePoint = (OFUnichar)[[components objectAtIndex: 0] unsignedLongLongValueWithBase: 16]; if (codePoint > 0x10FFFF) @throw [OFOutOfRangeException exception]; - _casefoldingTable[codePoint] = (of_unichar_t)[[components + _casefoldingTable[codePoint] = (OFUnichar)[[components objectAtIndex: 2] unsignedLongLongValueWithBase: 16]; objc_autoreleasePoolPop(pool2); } @@ -221,13 +221,13 @@ bool done; do { done = true; - for (of_unichar_t i = 0; i < 0x110000; i++) { + for (OFUnichar i = 0; i < 0x110000; i++) { void *pool; - const of_unichar_t *characters; + const OFUnichar *characters; size_t length; OFMutableString *replacement; bool changed = false; if (table[i] == nil) @@ -293,19 +293,19 @@ [file writeString: COPYRIGHT @"#include \"config.h\"\n" @"\n" @"#import \"OFString.h\"\n\n" - @"static const of_unichar_t emptyPage[0x100] = { 0 };\n" + @"static const OFUnichar emptyPage[0x100] = { 0 };\n" @"static const char *emptyDecompositionPage[0x100] = { NULL };\n" @"\n"]; /* Write uppercasePage%u */ - for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { + for (OFUnichar i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if (_uppercaseTable[j] != 0) { isEmpty = false; _uppercaseTableSize = i >> 8; _uppercaseTableUsed[_uppercaseTableSize] = 1; break; @@ -313,15 +313,15 @@ } if (!isEmpty) { void *pool2 = objc_autoreleasePoolPush(); - [file writeFormat: @"static const of_unichar_t " + [file writeFormat: @"static const OFUnichar " @"uppercasePage%u[0x100] = {\n", i >> 8]; - for (of_unichar_t j = i; j < i + 0x100; j += 8) + for (OFUnichar j = i; j < i + 0x100; j += 8) [file writeFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _uppercaseTable[j], _uppercaseTable[j + 1], _uppercaseTable[j + 2], @@ -336,14 +336,14 @@ objc_autoreleasePoolPop(pool2); } } /* Write lowercasePage%u */ - for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { + for (OFUnichar i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if (_lowercaseTable[j] != 0) { isEmpty = false; _lowercaseTableSize = i >> 8; _lowercaseTableUsed[_lowercaseTableSize] = 1; break; @@ -351,15 +351,15 @@ } if (!isEmpty) { void *pool2 = objc_autoreleasePoolPush(); - [file writeFormat: @"static const of_unichar_t " + [file writeFormat: @"static const OFUnichar " @"lowercasePage%u[0x100] = {\n", i >> 8]; - for (of_unichar_t j = i; j < i + 0x100; j += 8) + for (OFUnichar j = i; j < i + 0x100; j += 8) [file writeFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _lowercaseTable[j], _lowercaseTable[j + 1], _lowercaseTable[j + 2], @@ -374,18 +374,18 @@ objc_autoreleasePoolPop(pool2); } } /* Write titlecasePage%u if it does NOT match uppercasePage%u */ - for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { + for (OFUnichar i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if (_titlecaseTable[j] != 0) { isEmpty = !memcmp(_uppercaseTable + i, _titlecaseTable + i, - 256 * sizeof(of_unichar_t)); + 256 * sizeof(OFUnichar)); _titlecaseTableSize = i >> 8; _titlecaseTableUsed[_titlecaseTableSize] = (isEmpty ? 2 : 1); break; } @@ -392,15 +392,15 @@ } if (!isEmpty) { void *pool2 = objc_autoreleasePoolPush(); - [file writeFormat: @"static const of_unichar_t " + [file writeFormat: @"static const OFUnichar " @"titlecasePage%u[0x100] = {\n", i >> 8]; - for (of_unichar_t j = i; j < i + 0x100; j += 8) + for (OFUnichar j = i; j < i + 0x100; j += 8) [file writeFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _titlecaseTable[j], _titlecaseTable[j + 1], _titlecaseTable[j + 2], @@ -415,18 +415,18 @@ objc_autoreleasePoolPop(pool2); } } /* Write casefoldingPage%u if it does NOT match lowercasePage%u */ - for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { + for (OFUnichar i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if (_casefoldingTable[j] != 0) { isEmpty = !memcmp(_lowercaseTable + i, _casefoldingTable + i, - 256 * sizeof(of_unichar_t)); + 256 * sizeof(OFUnichar)); _casefoldingTableSize = i >> 8; _casefoldingTableUsed[_casefoldingTableSize] = (isEmpty ? 2 : 1); break; } @@ -433,15 +433,15 @@ } if (!isEmpty) { void *pool2 = objc_autoreleasePoolPush(); - [file writeFormat: @"static const of_unichar_t " + [file writeFormat: @"static const OFUnichar " @"casefoldingPage%u[0x100] = {\n", i >> 8]; - for (of_unichar_t j = i; j < i + 0x100; j += 8) + for (OFUnichar j = i; j < i + 0x100; j += 8) [file writeFormat: @"\t%u, %u, %u, %u, %u, %u, %u, %u,\n", _casefoldingTable[j], _casefoldingTable[j + 1], _casefoldingTable[j + 2], @@ -456,14 +456,14 @@ objc_autoreleasePoolPop(pool2); } } /* Write decompositionPage%u */ - for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { + for (OFUnichar i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if (_decompositionTable[j] != nil) { isEmpty = false; _decompositionTableSize = i >> 8; _decompositionTableUsed[ _decompositionTableSize] = 1; @@ -476,11 +476,11 @@ [file writeFormat: @"static const char *const " @"decompositionPage%u[0x100] = {\n", i >> 8]; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if ((j - i) % 2 == 0) [file writeString: @"\t"]; else [file writeString: @" "]; @@ -510,14 +510,14 @@ objc_autoreleasePoolPop(pool2); } } /* Write decompCompatPage%u if it does NOT match decompositionPage%u */ - for (of_unichar_t i = 0; i < 0x110000; i += 0x100) { + for (OFUnichar i = 0; i < 0x110000; i += 0x100) { bool isEmpty = true; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if (_decompositionCompatTable[j] != 0) { /* * We bulk-compare pointers via memcmp here. * This is safe, as we always set the same * pointer in both tables if both are the same. @@ -539,11 +539,11 @@ [file writeFormat: @"static const char *const " @"decompCompatPage%u[0x100] = {\n", i >> 8]; - for (of_unichar_t j = i; j < i + 0x100; j++) { + for (OFUnichar j = i; j < i + 0x100; j++) { if ((j - i) % 2 == 0) [file writeString: @"\t"]; else [file writeString: @" "]; @@ -586,15 +586,15 @@ _casefoldingTableSize++; _decompositionTableSize++; _decompositionCompatTableSize++; /* Write of_unicode_uppercase_table */ - [file writeFormat: @"const of_unichar_t *const " + [file writeFormat: @"const OFUnichar *const " @"of_unicode_uppercase_table[0x%X] = {\n\t", _uppercaseTableSize]; - for (of_unichar_t i = 0; i < _uppercaseTableSize; i++) { + for (OFUnichar i = 0; i < _uppercaseTableSize; i++) { if (_uppercaseTableUsed[i]) [file writeFormat: @"uppercasePage%u", i]; else [file writeString: @"emptyPage"]; @@ -607,15 +607,15 @@ } [file writeString: @"\n};\n\n"]; /* Write of_unicode_lowercase_table */ - [file writeFormat: @"const of_unichar_t *const " + [file writeFormat: @"const OFUnichar *const " @"of_unicode_lowercase_table[0x%X] = {\n\t", _lowercaseTableSize]; - for (of_unichar_t i = 0; i < _lowercaseTableSize; i++) { + for (OFUnichar i = 0; i < _lowercaseTableSize; i++) { if (_lowercaseTableUsed[i]) [file writeFormat: @"lowercasePage%u", i]; else [file writeString: @"emptyPage"]; @@ -628,15 +628,15 @@ } [file writeString: @"\n};\n\n"]; /* Write of_unicode_titlecase_table */ - [file writeFormat: @"const of_unichar_t *const " + [file writeFormat: @"const OFUnichar *const " @"of_unicode_titlecase_table[0x%X] = {\n\t", _titlecaseTableSize]; - for (of_unichar_t i = 0; i < _titlecaseTableSize; i++) { + for (OFUnichar i = 0; i < _titlecaseTableSize; i++) { if (_titlecaseTableUsed[i] == 1) [file writeFormat: @"titlecasePage%u", i]; else if (_titlecaseTableUsed[i] == 2) [file writeFormat: @"uppercasePage%u", i]; else @@ -651,15 +651,15 @@ } [file writeString: @"\n};\n\n"]; /* Write of_unicode_casefolding_table */ - [file writeFormat: @"const of_unichar_t *const " + [file writeFormat: @"const OFUnichar *const " @"of_unicode_casefolding_table[0x%X] = {\n\t", _casefoldingTableSize]; - for (of_unichar_t i = 0; i < _casefoldingTableSize; i++) { + for (OFUnichar i = 0; i < _casefoldingTableSize; i++) { if (_casefoldingTableUsed[i] == 1) [file writeFormat: @"casefoldingPage%u", i]; else if (_casefoldingTableUsed[i] == 2) [file writeFormat: @"lowercasePage%u", i]; else @@ -678,11 +678,11 @@ /* Write of_unicode_decomposition_table */ [file writeFormat: @"const char *const " @"*of_unicode_decomposition_table[0x%X] = {\n\t", _decompositionTableSize]; - for (of_unichar_t i = 0; i < _decompositionTableSize; i++) { + for (OFUnichar i = 0; i < _decompositionTableSize; i++) { if (_decompositionTableUsed[i]) [file writeFormat: @"decompositionPage%u", i]; else [file writeString: @"emptyDecompositionPage"]; @@ -700,11 +700,11 @@ [file writeFormat: @"const char *const " @"*of_unicode_decomposition_compat_table[0x%X] = {" @"\n\t", _decompositionCompatTableSize]; - for (of_unichar_t i = 0; i < _decompositionCompatTableSize; i++) { + for (OFUnichar i = 0; i < _decompositionCompatTableSize; i++) { if (_decompositionCompatTableUsed[i] == 1) [file writeFormat: @"decompCompatPage%u", i]; else if (_decompositionCompatTableUsed[i] == 2) [file writeFormat: @"decompositionPage%u", i]; else @@ -745,20 +745,20 @@ [file writeString: @"#ifdef __cplusplus\n" @"extern \"C\" {\n" @"#endif\n" - @"extern const of_unichar_t *const _Nonnull\n" + @"extern const OFUnichar *const _Nonnull\n" @" of_unicode_uppercase_table[" @"OF_UNICODE_UPPERCASE_TABLE_SIZE];\n" - @"extern const of_unichar_t *const _Nonnull\n" + @"extern const OFUnichar *const _Nonnull\n" @" of_unicode_lowercase_table[" @"OF_UNICODE_LOWERCASE_TABLE_SIZE];\n" - @"extern const of_unichar_t *const _Nonnull\n" + @"extern const OFUnichar *const _Nonnull\n" @" of_unicode_titlecase_table[" @"OF_UNICODE_TITLECASE_TABLE_SIZE];\n" - @"extern const of_unichar_t *const _Nonnull\n" + @"extern const OFUnichar *const _Nonnull\n" @" of_unicode_casefolding_table[" @"OF_UNICODE_CASEFOLDING_TABLE_SIZE];\n" @"extern const char *const _Nullable *const _Nonnull\n" @" of_unicode_decomposition_table[" @"OF_UNICODE_DECOMPOSITION_TABLE_SIZE];\n" Index: src/OFBitSetCharacterSet.m ================================================================== --- src/OFBitSetCharacterSet.m +++ src/OFBitSetCharacterSet.m @@ -30,15 +30,15 @@ { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = string.characters; + const OFUnichar *characters = string.characters; size_t length = string.length; for (size_t i = 0; i < length; i++) { - of_unichar_t c = characters[i]; + OFUnichar c = characters[i]; if (c / CHAR_BIT >= _size) { size_t newSize; if (UINT32_MAX - c < 1) @@ -71,13 +71,13 @@ free(_bitset); [super dealloc]; } -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { if (character / CHAR_BIT >= _size) return false; return of_bitset_isset(_bitset, character); } @end Index: src/OFCharacterSet.h ================================================================== --- src/OFCharacterSet.h +++ src/OFCharacterSet.h @@ -88,9 +88,9 @@ * * @param character The character that is checked for being a member of the * character set * @return Whether the specified character is a member of the character set. */ -- (bool)characterIsMember: (of_unichar_t)character; +- (bool)characterIsMember: (OFUnichar)character; @end OF_ASSUME_NONNULL_END Index: src/OFCharacterSet.m ================================================================== --- src/OFCharacterSet.m +++ src/OFCharacterSet.m @@ -137,11 +137,11 @@ - (instancetype)initWithRange: (OFRange)range { OF_INVALID_INIT_METHOD } -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { OF_UNRECOGNIZED_SELECTOR } - (OFCharacterSet *)invertedSet @@ -169,11 +169,11 @@ - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { switch (character) { case 0x0009: case 0x0020: case 0x00A0: Index: src/OFConstantString.m ================================================================== --- src/OFConstantString.m +++ src/OFConstantString.m @@ -249,17 +249,17 @@ { [self finishInitialization]; return [self caseInsensitiveCompare: string]; } -- (of_unichar_t)characterAtIndex: (size_t)idx +- (OFUnichar)characterAtIndex: (size_t)idx { [self finishInitialization]; return [self characterAtIndex: idx]; } -- (void)getCharacters: (of_unichar_t *)buffer inRange: (OFRange)range +- (void)getCharacters: (OFUnichar *)buffer inRange: (OFRange)range { [self finishInitialization]; [self getCharacters: buffer inRange: range]; } @@ -504,11 +504,11 @@ { [self finishInitialization]; return self.doubleValue; } -- (const of_unichar_t *)characters +- (const OFUnichar *)characters { [self finishInitialization]; return self.characters; } Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -172,11 +172,11 @@ - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && of_ascii_isalnum(character)) return true; switch (character) { Index: src/OFHTTPCookie.m ================================================================== --- src/OFHTTPCookie.m +++ src/OFHTTPCookie.m @@ -66,11 +66,11 @@ { OFMutableArray OF_GENERIC(OFHTTPCookie *) *ret = [OFMutableArray array]; void *pool = objc_autoreleasePoolPush(); OFString *string = [headerFields objectForKey: @"Set-Cookie"]; OFString *domain = URL.host; - const of_unichar_t *characters = string.characters; + const OFUnichar *characters = string.characters; size_t length = string.length, last = 0; enum { STATE_PRE_NAME, STATE_NAME, STATE_EXPECT_VALUE, Index: src/OFHTTPServer.m ================================================================== --- src/OFHTTPServer.m +++ src/OFHTTPServer.m @@ -353,11 +353,11 @@ size_t pos; @try { OFString *version = [line substringWithRange: OFMakeRange(line.length - 9, 9)]; - of_unichar_t tmp; + OFUnichar tmp; if (![version hasPrefix: @" HTTP/1."]) return [self sendErrorAndClose: 505]; tmp = [version characterAtIndex: 8]; Index: src/OFInvertedCharacterSet.h ================================================================== --- src/OFInvertedCharacterSet.h +++ src/OFInvertedCharacterSet.h @@ -18,12 +18,12 @@ OF_ASSUME_NONNULL_BEGIN @interface OFInvertedCharacterSet: OFCharacterSet { OFCharacterSet *_characterSet; - bool (*_characterIsMember)(id, SEL, of_unichar_t); + bool (*_characterIsMember)(id, SEL, OFUnichar); } - (instancetype)initWithCharacterSet: (OFCharacterSet *)characterSet; @end OF_ASSUME_NONNULL_END Index: src/OFInvertedCharacterSet.m ================================================================== --- src/OFInvertedCharacterSet.m +++ src/OFInvertedCharacterSet.m @@ -30,11 +30,11 @@ { self = [super init]; @try { _characterSet = [characterSet retain]; - _characterIsMember = (bool (*)(id, SEL, of_unichar_t)) + _characterIsMember = (bool (*)(id, SEL, OFUnichar)) [_characterSet methodForSelector: @selector(characterIsMember:)]; } @catch (id e) { [self release]; @throw e; @@ -48,11 +48,11 @@ [_characterSet release]; [super dealloc]; } -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { return !_characterIsMember(_characterSet, @selector(characterIsMember:), character); } Index: src/OFLocale.m ================================================================== --- src/OFLocale.m +++ src/OFLocale.m @@ -108,11 +108,11 @@ operators = [OFMutableArray array]; for (OFString *token in [condition componentsSeparatedByString: @" " options: OF_STRING_SKIP_EMPTY]) { unsigned precedence; - of_unichar_t c; + OFUnichar c; if ([token isEqual: @"("]) { [operators addObject: @"("]; continue; } Index: src/OFMutableString.h ================================================================== --- src/OFMutableString.h +++ src/OFMutableString.h @@ -31,11 +31,11 @@ * @brief Sets the character at the specified index. * * @param character The character to set * @param index The index where to set the character */ -- (void)setCharacter: (of_unichar_t)character atIndex: (size_t)index; +- (void)setCharacter: (OFUnichar)character atIndex: (size_t)index; /** * @brief Appends another OFString to the OFMutableString. * * @param string An OFString to append @@ -46,12 +46,11 @@ * @brief Appends the specified characters to the OFMutableString. * * @param characters An array of characters to append * @param length The length of the array of characters */ -- (void)appendCharacters: (const of_unichar_t *)characters - length: (size_t)length; +- (void)appendCharacters: (const OFUnichar *)characters length: (size_t)length; /** * @brief Appends a UTF-8 encoded C string to the OFMutableString. * * @param UTF8String A UTF-8 encoded C string to append @@ -91,23 +90,23 @@ /** * @brief Appends a formatted string to the OFMutableString. * * See `printf` for the format syntax. As an addition, `%@` is available as - * format specifier for objects, `%C` for `of_unichar_t` and `%S` for - * `const of_unichar_t *`. + * format specifier for objects, `%C` for `OFUnichar` and `%S` for + * `const OFUnichar *`. * * @param format A format string which generates the string to append */ - (void)appendFormat: (OFConstantString *)format, ...; /** * @brief Appends a formatted string to the OFMutableString. * * See printf for the format syntax. As an addition, `%@` is available as - * format specifier for objects, `%C` for `of_unichar_t` and `%S` for - * `const of_unichar_t *`. + * format specifier for objects, `%C` for `OFUnichar` and `%S` for + * `const OFUnichar *`. * * @param format A format string which generates the string to append * @param arguments The arguments used in the format string */ - (void)appendFormat: (OFConstantString *)format arguments: (va_list)arguments; Index: src/OFMutableString.m ================================================================== --- src/OFMutableString.m +++ src/OFMutableString.m @@ -74,11 +74,11 @@ - (instancetype)initWithString: (OFString *)string { return (id)[[OFMutableUTF8String alloc] initWithString: string]; } -- (instancetype)initWithCharacters: (const of_unichar_t *)characters +- (instancetype)initWithCharacters: (const OFUnichar *)characters length: (size_t)length { return (id)[[OFMutableUTF8String alloc] initWithCharacters: characters length: length]; } @@ -226,24 +226,24 @@ return [super alloc]; } #ifdef OF_HAVE_UNICODE_TABLES -- (void)of_convertWithWordStartTable: (const of_unichar_t *const [])startTable - wordMiddleTable: (const of_unichar_t *const [])middleTable +- (void)of_convertWithWordStartTable: (const OFUnichar *const [])startTable + wordMiddleTable: (const OFUnichar *const [])middleTable wordStartTableSize: (size_t)startTableSize wordMiddleTableSize: (size_t)middleTableSize { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length = self.length; bool isStart = true; for (size_t i = 0; i < length; i++) { - const of_unichar_t *const *table; + const OFUnichar *const *table; size_t tableSize; - of_unichar_t c = characters[i]; + OFUnichar c = characters[i]; if (isStart) { table = startTable; tableSize = middleTableSize; } else { @@ -263,18 +263,18 @@ static void convert(OFMutableString *self, char (*startFunction)(char), char (*middleFunction)(char)) { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length = self.length; bool isStart = true; for (size_t i = 0; i < length; i++) { char (*function)(char) = (isStart ? startFunction : middleFunction); - of_unichar_t c = characters[i]; + OFUnichar c = characters[i]; if (c <= 0x7F) [self setCharacter: (int)function(c) atIndex: i]; isStart = of_ascii_isspace(c); @@ -282,11 +282,11 @@ objc_autoreleasePoolPop(pool); } #endif -- (void)setCharacter: (of_unichar_t)character atIndex: (size_t)idx +- (void)setCharacter: (OFUnichar)character atIndex: (size_t)idx { void *pool = objc_autoreleasePoolPush(); OFString *string = [OFString stringWithCharacters: &character length: 1]; [self replaceCharactersInRange: OFMakeRange(idx, 1) withString: string]; @@ -296,11 +296,11 @@ - (void)appendString: (OFString *)string { [self insertString: string atIndex: self.length]; } -- (void)appendCharacters: (const of_unichar_t *)characters +- (void)appendCharacters: (const OFUnichar *)characters length: (size_t)length { void *pool = objc_autoreleasePoolPush(); [self appendString: [OFString stringWithCharacters: characters length: length]]; @@ -380,11 +380,11 @@ - (void)reverse { size_t i, j, length = self.length; for (i = 0, j = length - 1; i < length / 2; i++, j--) { - of_unichar_t tmp = [self characterAtIndex: j]; + OFUnichar tmp = [self characterAtIndex: j]; [self setCharacter: [self characterAtIndex: i] atIndex: j]; [self setCharacter: tmp atIndex: i]; } } @@ -458,12 +458,12 @@ withString: (OFString *)replacement options: (int)options range: (OFRange)range { void *pool = objc_autoreleasePoolPush(), *pool2; - const of_unichar_t *characters; - const of_unichar_t *searchCharacters = string.characters; + const OFUnichar *characters; + const OFUnichar *searchCharacters = string.characters; size_t searchLength = string.length; size_t replacementLength = replacement.length; if (string == nil || replacement == nil) @throw [OFInvalidArgumentException exception]; @@ -480,11 +480,11 @@ pool2 = objc_autoreleasePoolPush(); characters = self.characters; for (size_t i = range.location; i <= range.length - searchLength; i++) { if (memcmp(characters + i, searchCharacters, - searchLength * sizeof(of_unichar_t)) != 0) + searchLength * sizeof(OFUnichar)) != 0) continue; [self replaceCharactersInRange: OFMakeRange(i, searchLength) withString: replacement]; @@ -503,15 +503,15 @@ } - (void)deleteLeadingWhitespaces { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t i, length = self.length; for (i = 0; i < length; i++) { - of_unichar_t c = characters[i]; + OFUnichar c = characters[i]; if (!of_ascii_isspace(c)) break; } @@ -521,11 +521,11 @@ } - (void)deleteTrailingWhitespaces { void *pool; - const of_unichar_t *characters, *p; + const OFUnichar *characters, *p; size_t length, d; length = self.length; if (length == 0) Index: src/OFMutableUTF8String.m ================================================================== --- src/OFMutableUTF8String.m +++ src/OFMutableUTF8String.m @@ -62,24 +62,24 @@ return self; } #ifdef OF_HAVE_UNICODE_TABLES -- (void)of_convertWithWordStartTable: (const of_unichar_t *const [])startTable - wordMiddleTable: (const of_unichar_t *const [])middleTable +- (void)of_convertWithWordStartTable: (const OFUnichar *const [])startTable + wordMiddleTable: (const OFUnichar *const [])middleTable wordStartTableSize: (size_t)startTableSize wordMiddleTableSize: (size_t)middleTableSize { - of_unichar_t *unicodeString; + OFUnichar *unicodeString; size_t unicodeLen, newCStringLength; size_t i, j; char *newCString; bool isStart = true; if (!_s->isUTF8) { uint8_t t; - const of_unichar_t *const *table; + const OFUnichar *const *table; assert(startTableSize >= 1 && middleTableSize >= 1); _s->hashed = false; @@ -97,19 +97,19 @@ return; } unicodeLen = self.length; - unicodeString = of_alloc(unicodeLen, sizeof(of_unichar_t)); + unicodeString = of_alloc(unicodeLen, sizeof(OFUnichar)); i = j = 0; newCStringLength = 0; while (i < _s->cStringLength) { - const of_unichar_t *const *table; + const OFUnichar *const *table; size_t tableSize; - of_unichar_t c; + OFUnichar c; ssize_t cLen; if (isStart) { table = startTable; tableSize = middleTableSize; @@ -127,11 +127,11 @@ } isStart = of_ascii_isspace(c); if (c >> 8 < tableSize) { - of_unichar_t tc = table[c >> 8][c & 0xFF]; + OFUnichar tc = table[c >> 8][c & 0xFF]; if (tc) c = tc; } unicodeString[j++] = c; @@ -187,14 +187,14 @@ * need to change it. */ } #endif -- (void)setCharacter: (of_unichar_t)character atIndex: (size_t)idx +- (void)setCharacter: (OFUnichar)character atIndex: (size_t)idx { char buffer[4]; - of_unichar_t c; + OFUnichar c; size_t lenNew; ssize_t lenOld; if (_s->isUTF8) idx = of_string_utf8_get_position(_s->cString, idx, @@ -367,11 +367,11 @@ _s->isUTF8 = true; } else _s->isUTF8 = true; } -- (void)appendCharacters: (const of_unichar_t *)characters +- (void)appendCharacters: (const OFUnichar *)characters length: (size_t)length { char *tmp = of_alloc((length * 4) + 1, 1); @try { Index: src/OFOptionsParser.h ================================================================== --- src/OFOptionsParser.h +++ src/OFOptionsParser.h @@ -25,11 +25,11 @@ * * @brief An option which can be parsed by an @ref OFOptionsParser. */ struct of_options_parser_option_t { /** The short version (e.g. `-v`) of the option or `\0` for none. */ - of_unichar_t shortOption; + OFUnichar shortOption; /** * The long version (e.g. `--verbose`) of the option or `nil` for none. */ OFString *__unsafe_unretained _Nullable longOption; @@ -70,11 +70,11 @@ { of_options_parser_option_t *_options; OFMapTable *_longOptions; OFArray OF_GENERIC(OFString *) *_arguments; size_t _index, _subIndex; - of_unichar_t _lastOption; + OFUnichar _lastOption; OFString *_Nullable _lastLongOption, *_Nullable _argument; bool _done; } /** @@ -83,11 +83,11 @@ * If @ref nextOption returned `?` or `:`, this returns the option which was * unknown or for which the argument was missing.@n * If this returns `-`, the last option is only available as a long option (see * lastLongOption). */ -@property (readonly, nonatomic) of_unichar_t lastOption; +@property (readonly, nonatomic) OFUnichar lastOption; /** * @brief The long option for the last parsed option, or `nil` if the last * parsed option was not passed as a long option by the user. * @@ -158,9 +158,9 @@ * make sure all options have been parsed, even if you only rely on the * optional pointers specified and don't do any parsing yourself. * * @return The next option */ -- (of_unichar_t)nextOption; +- (OFUnichar)nextOption; @end OF_ASSUME_NONNULL_END Index: src/OFOptionsParser.m ================================================================== --- src/OFOptionsParser.m +++ src/OFOptionsParser.m @@ -153,11 +153,11 @@ [_argument release]; [super dealloc]; } -- (of_unichar_t)nextOption +- (OFUnichar)nextOption { of_options_parser_option_t *iter; OFString *argument; if (_done || _index >= _arguments.count) Index: src/OFRangeCharacterSet.m ================================================================== --- src/OFRangeCharacterSet.m +++ src/OFRangeCharacterSet.m @@ -41,11 +41,11 @@ } return self; } -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { return (character >= _range.location && character < _range.location + _range.length); } @end Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -1367,12 +1367,12 @@ /** * @brief Writes a formatted string into the stream. * * See printf for the format syntax. As an addition, `%@` is available as - * format specifier for objects, `%C` for `of_unichar_t` and `%S` for - * `const of_unichar_t *`. + * format specifier for objects, `%C` for `OFUnichar` and `%S` for + * `const OFUnichar *`. * * @param format A string used as format * @return The number of bytes written */ - (size_t)writeFormat: (OFConstantString *)format, ...; @@ -1379,12 +1379,12 @@ /** * @brief Writes a formatted string into the stream. * * See printf for the format syntax. As an addition, `%@` is available as - * format specifier for objects, `%C` for `of_unichar_t` and `%S` for - * `const of_unichar_t *`. + * format specifier for objects, `%C` for `OFUnichar` and `%S` for + * `const OFUnichar *`. * * @param format A string used as format * @param arguments The arguments used in the format string * @return The number of bytes written */ Index: src/OFString+JSONParsing.m ================================================================== --- src/OFString+JSONParsing.m +++ src/OFString+JSONParsing.m @@ -188,11 +188,11 @@ (*pointer)++; break; /* Parse Unicode escape sequence */ case 'u':; of_char16_t c1, c2; - of_unichar_t c; + OFUnichar c; size_t l; c1 = parseUnicodeEscape(*pointer - 1, stop); if (c1 == 0xFFFF) { free(buffer); @@ -306,11 +306,11 @@ (**pointer & 0x80)) { buffer[i++] = **pointer; (*pointer)++; } else if (**pointer == '\\') { of_char16_t c1, c2; - of_unichar_t c; + OFUnichar c; size_t l; if (++(*pointer) >= stop || **pointer != 'u') { free(buffer); return nil; Index: src/OFString+URLEncoding.m ================================================================== --- src/OFString+URLEncoding.m +++ src/OFString+URLEncoding.m @@ -32,18 +32,18 @@ - (OFString *)stringByURLEncodingWithAllowedCharacters: (OFCharacterSet *)allowedCharacters { OFMutableString *ret = [OFMutableString string]; void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length = self.length; - bool (*characterIsMember)(id, SEL, of_unichar_t) = - (bool (*)(id, SEL, of_unichar_t))[allowedCharacters + bool (*characterIsMember)(id, SEL, OFUnichar) = + (bool (*)(id, SEL, OFUnichar))[allowedCharacters methodForSelector: @selector(characterIsMember:)]; for (size_t i = 0; i < length; i++) { - of_unichar_t c = characters[i]; + OFUnichar c = characters[i]; if (characterIsMember(allowedCharacters, @selector(characterIsMember:), c)) [ret appendCharacters: &c length: 1]; else { Index: src/OFString+XMLUnescaping.m ================================================================== --- src/OFString+XMLUnescaping.m +++ src/OFString+XMLUnescaping.m @@ -25,11 +25,11 @@ int _OFString_XMLUnescaping_reference; static OF_INLINE OFString * parseNumericEntity(const char *entity, size_t length) { - of_unichar_t c; + OFUnichar c; size_t i; char buffer[5]; if (length == 1 || *entity != '#') return nil; Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -58,11 +58,11 @@ typedef char32_t of_char32_t; #else typedef uint_least16_t of_char16_t; typedef uint_least32_t of_char32_t; #endif -typedef of_char32_t of_unichar_t; +typedef of_char32_t OFUnichar; /** * @brief The encoding of a string. */ typedef enum of_string_encoding_t { @@ -215,11 +215,11 @@ * * The result is valid until the autorelease pool is released. If you want to * use the result outside the scope of the current autorelease pool, you have to * copy it. */ -@property (readonly, nonatomic) const of_unichar_t *characters +@property (readonly, nonatomic) const OFUnichar *characters OF_RETURNS_INNER_POINTER; /** * @brief The string in UTF-16 encoding with native byte order. * @@ -390,11 +390,11 @@ * * @param characters An array of Unicode characters * @param length The length of the Unicode character array * @return A new autoreleased OFString */ -+ (instancetype)stringWithCharacters: (const of_unichar_t *)characters ++ (instancetype)stringWithCharacters: (const OFUnichar *)characters length: (size_t)length; /** * @brief Creates a new OFString from a UTF-16 encoded string. * @@ -485,12 +485,12 @@ /** * @brief Creates a new OFString from a format string. * * See printf for the format syntax. As an addition, `%@` is available as - * format specifier for objects, `%C` for `of_unichar_t` and `%S` for - * `const of_unichar_t *`. + * format specifier for objects, `%C` for `OFUnichar` and `%S` for + * `const OFUnichar *`. * * @param format A string used as format to initialize the OFString * @return A new autoreleased OFString */ + (instancetype)stringWithFormat: (OFConstantString *)format, ...; @@ -648,11 +648,11 @@ * * @param characters An array of Unicode characters * @param length The length of the Unicode character array * @return An initialized OFString */ -- (instancetype)initWithCharacters: (const of_unichar_t *)characters +- (instancetype)initWithCharacters: (const OFUnichar *)characters length: (size_t)length; /** * @brief Initializes an already allocated OFString with a UTF-16 string. * @@ -743,12 +743,12 @@ /** * @brief Initializes an already allocated OFString with a format string. * * See printf for the format syntax. As an addition, `%@` is available as - * format specifier for objects, `%C` for `of_unichar_t` and `%S` for - * `const of_unichar_t *`. + * format specifier for objects, `%C` for `OFUnichar` and `%S` for + * `const OFUnichar *`. * * @param format A string used as format to initialize the OFString * @return An initialized OFString */ - (instancetype)initWithFormat: (OFConstantString *)format, ...; @@ -755,12 +755,12 @@ /** * @brief Initializes an already allocated OFString with a format string. * * See printf for the format syntax. As an addition, `%@` is available as - * format specifier for objects, `%C` for `of_unichar_t` and `%S` for - * `const of_unichar_t *`. + * format specifier for objects, `%C` for `OFUnichar` and `%S` for + * `const OFUnichar *`. * * @param format A string used as format to initialize the OFString * @param arguments The arguments used in the format string * @return An initialized OFString */ @@ -903,20 +903,20 @@ * @brief Returns the Unicode character at the specified index. * * @param index The index of the Unicode character to return * @return The Unicode character at the specified index */ -- (of_unichar_t)characterAtIndex: (size_t)index; +- (OFUnichar)characterAtIndex: (size_t)index; /** * @brief Copies the Unicode characters in the specified range to the specified * buffer. * * @param buffer The buffer to store the Unicode characters * @param range The range of the Unicode characters to copy */ -- (void)getCharacters: (of_unichar_t *)buffer inRange: (OFRange)range; +- (void)getCharacters: (OFUnichar *)buffer inRange: (OFRange)range; /** * @brief Returns the range of the first occurrence of the string. * * @param string The string to search @@ -1279,12 +1279,12 @@ #ifdef __cplusplus extern "C" { #endif extern of_string_encoding_t of_string_parse_encoding(OFString *); extern OFString *_Nullable of_string_name_of_encoding(of_string_encoding_t); -extern size_t of_string_utf8_encode(of_unichar_t, char *); -extern ssize_t of_string_utf8_decode(const char *, size_t, of_unichar_t *); +extern size_t of_string_utf8_encode(OFUnichar, char *); +extern ssize_t of_string_utf8_decode(const char *, size_t, OFUnichar *); extern size_t of_string_utf16_length(const of_char16_t *); extern size_t of_string_utf32_length(const of_char32_t *); #ifdef __cplusplus } #endif Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -98,31 +98,31 @@ @end @interface OFStringPlaceholder: OFString @end -extern bool of_unicode_to_iso_8859_2(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_iso_8859_3(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_iso_8859_15(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_windows_1251(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_windows_1252(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_codepage_437(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_codepage_850(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_codepage_858(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_mac_roman(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_koi8_r(const of_unichar_t *, unsigned char *, - size_t, bool); -extern bool of_unicode_to_koi8_u(const of_unichar_t *, unsigned char *, +extern bool of_unicode_to_iso_8859_2(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_iso_8859_3(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_iso_8859_15(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_windows_1251(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_windows_1252(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_codepage_437(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_codepage_850(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_codepage_858(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_mac_roman(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_koi8_r(const OFUnichar *, unsigned char *, + size_t, bool); +extern bool of_unicode_to_koi8_u(const OFUnichar *, unsigned char *, size_t, bool); /* References for static linking */ void _references_to_categories_of_OFString(void) @@ -238,11 +238,11 @@ return nil; } size_t -of_string_utf8_encode(of_unichar_t character, char *buffer) +of_string_utf8_encode(OFUnichar character, char *buffer) { if (character < 0x80) { buffer[0] = character; return 1; } else if (character < 0x800) { @@ -264,11 +264,11 @@ return 0; } ssize_t -of_string_utf8_decode(const char *buffer_, size_t length, of_unichar_t *ret) +of_string_utf8_decode(const char *buffer_, size_t length, OFUnichar *ret) { const unsigned char *buffer = (const unsigned char *)buffer_; if (!(*buffer & 0x80)) { *ret = buffer[0]; @@ -341,15 +341,15 @@ static OFString * decomposedString(OFString *self, const char *const *const *table, size_t size) { OFMutableString *ret = [OFMutableString string]; void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length = self.length; for (size_t i = 0; i < length; i++) { - of_unichar_t c = characters[i]; + OFUnichar c = characters[i]; const char *const *page; if (c >= size) { [ret appendCharacters: &c length: 1]; continue; @@ -472,11 +472,11 @@ - (instancetype)initWithString: (OFString *)string { return (id)[[OFUTF8String alloc] initWithString: string]; } -- (instancetype)initWithCharacters: (const of_unichar_t *)string +- (instancetype)initWithCharacters: (const OFUnichar *)string length: (size_t)length { return (id)[[OFUTF8String alloc] initWithCharacters: string length: length]; } @@ -693,11 +693,11 @@ + (instancetype)stringWithString: (OFString *)string { return [[[self alloc] initWithString: string] autorelease]; } -+ (instancetype)stringWithCharacters: (const of_unichar_t *)string ++ (instancetype)stringWithCharacters: (const OFUnichar *)string length: (size_t)length { return [[[self alloc] initWithCharacters: string length: length] autorelease]; } @@ -887,11 +887,11 @@ - (instancetype)initWithString: (OFString *)string { OF_INVALID_INIT_METHOD } -- (instancetype)initWithCharacters: (const of_unichar_t *)string +- (instancetype)initWithCharacters: (const OFUnichar *)string length: (size_t)length { OF_INVALID_INIT_METHOD } @@ -1116,11 +1116,11 @@ - (size_t)of_getCString: (char *)cString maxLength: (size_t)maxLength encoding: (of_string_encoding_t)encoding lossy: (bool)lossy { - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t i, length = self.length; switch (encoding) { case OF_STRING_ENCODING_UTF_8:; size_t j = 0; @@ -1455,11 +1455,11 @@ - (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding { switch (encoding) { case OF_STRING_ENCODING_UTF_8:; - const of_unichar_t *characters; + const OFUnichar *characters; size_t length, UTF8StringLength = 0; characters = self.characters; length = self.length; @@ -1497,16 +1497,16 @@ - (size_t)UTF8StringLength { return [self cStringLengthWithEncoding: OF_STRING_ENCODING_UTF_8]; } -- (of_unichar_t)characterAtIndex: (size_t)idx +- (OFUnichar)characterAtIndex: (size_t)idx { OF_UNRECOGNIZED_SELECTOR } -- (void)getCharacters: (of_unichar_t *)buffer +- (void)getCharacters: (OFUnichar *)buffer inRange: (OFRange)range { for (size_t i = 0; i < range.length; i++) buffer[i] = [self characterAtIndex: range.location + i]; } @@ -1513,11 +1513,11 @@ - (bool)isEqual: (id)object { void *pool; OFString *string; - const of_unichar_t *characters, *otherCharacters; + const OFUnichar *characters, *otherCharacters; size_t length; if (object == self) return true; @@ -1534,11 +1534,11 @@ characters = self.characters; otherCharacters = string.characters; if (memcmp(characters, otherCharacters, - length * sizeof(of_unichar_t)) != 0) { + length * sizeof(OFUnichar)) != 0) { objc_autoreleasePoolPop(pool); return false; } objc_autoreleasePoolPop(pool); @@ -1557,11 +1557,11 @@ } - (OFComparisonResult)compare: (OFString *)string { void *pool; - const of_unichar_t *characters, *otherCharacters; + const OFUnichar *characters, *otherCharacters; size_t minimumLength; if (string == self) return OFOrderedSame; @@ -1599,11 +1599,11 @@ } - (OFComparisonResult)caseInsensitiveCompare: (OFString *)string { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters, *otherCharacters; + const OFUnichar *characters, *otherCharacters; size_t length, otherLength, minimumLength; if (string == self) return OFOrderedSame; @@ -1613,23 +1613,23 @@ otherLength = string.length; minimumLength = (length > otherLength ? otherLength : length); for (size_t i = 0; i < minimumLength; i++) { - of_unichar_t c = characters[i]; - of_unichar_t oc = otherCharacters[i]; + OFUnichar c = characters[i]; + OFUnichar oc = otherCharacters[i]; #ifdef OF_HAVE_UNICODE_TABLES if (c >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) { - of_unichar_t tc = + OFUnichar tc = of_unicode_casefolding_table[c >> 8][c & 0xFF]; if (tc) c = tc; } if (oc >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) { - of_unichar_t tc = + OFUnichar tc = of_unicode_casefolding_table[oc >> 8][oc & 0xFF]; if (tc) oc = tc; } @@ -1658,18 +1658,18 @@ return OFOrderedSame; } - (unsigned long)hash { - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length = self.length; uint32_t hash; OF_HASH_INIT(hash); for (size_t i = 0; i < length; i++) { - const of_unichar_t c = characters[i]; + const OFUnichar c = characters[i]; OF_HASH_ADD(hash, (c & 0xFF0000) >> 16); OF_HASH_ADD(hash, (c & 0x00FF00) >> 8); OF_HASH_ADD(hash, c & 0x0000FF); } @@ -1815,35 +1815,35 @@ - (OFRange)rangeOfString: (OFString *)string options: (int)options range: (OFRange)range { void *pool; - const of_unichar_t *searchCharacters; - of_unichar_t *characters; + const OFUnichar *searchCharacters; + OFUnichar *characters; size_t searchLength; if ((searchLength = string.length) == 0) return OFMakeRange(0, 0); if (searchLength > range.length) return OFMakeRange(OFNotFound, 0); - if (range.length > SIZE_MAX / sizeof(of_unichar_t)) + if (range.length > SIZE_MAX / sizeof(OFUnichar)) @throw [OFOutOfRangeException exception]; pool = objc_autoreleasePoolPush(); searchCharacters = string.characters; - characters = of_alloc(range.length, sizeof(of_unichar_t)); + characters = of_alloc(range.length, sizeof(OFUnichar)); @try { [self getCharacters: characters inRange: range]; if (options & OF_STRING_SEARCH_BACKWARDS) { for (size_t i = range.length - searchLength;; i--) { if (memcmp(characters + i, searchCharacters, - searchLength * sizeof(of_unichar_t)) == 0) { + searchLength * sizeof(OFUnichar)) == 0) { objc_autoreleasePoolPop(pool); return OFMakeRange(range.location + i, searchLength); } @@ -1853,11 +1853,11 @@ } } else { for (size_t i = 0; i <= range.length - searchLength; i++) { if (memcmp(characters + i, searchCharacters, - searchLength * sizeof(of_unichar_t)) == 0) { + searchLength * sizeof(OFUnichar)) == 0) { objc_autoreleasePoolPop(pool); return OFMakeRange(range.location + i, searchLength); } } @@ -1888,22 +1888,22 @@ - (size_t)indexOfCharacterFromSet: (OFCharacterSet *)characterSet options: (int)options range: (OFRange)range { - bool (*characterIsMember)(id, SEL, of_unichar_t) = - (bool (*)(id, SEL, of_unichar_t))[characterSet + bool (*characterIsMember)(id, SEL, OFUnichar) = + (bool (*)(id, SEL, OFUnichar))[characterSet methodForSelector: @selector(characterIsMember:)]; - of_unichar_t *characters; + OFUnichar *characters; if (range.length == 0) return OFNotFound; - if (range.length > SIZE_MAX / sizeof(of_unichar_t)) + if (range.length > SIZE_MAX / sizeof(OFUnichar)) @throw [OFOutOfRangeException exception]; - characters = of_alloc(range.length, sizeof(of_unichar_t)); + characters = of_alloc(range.length, sizeof(OFUnichar)); @try { [self getCharacters: characters inRange: range]; if (options & OF_STRING_SEARCH_BACKWARDS) { for (size_t i = range.length - 1;; i--) { @@ -1931,11 +1931,11 @@ } - (bool)containsString: (OFString *)string { void *pool; - const of_unichar_t *characters, *searchCharacters; + const OFUnichar *characters, *searchCharacters; size_t length, searchLength; if ((searchLength = string.length) == 0) return true; @@ -1947,11 +1947,11 @@ characters = self.characters; searchCharacters = string.characters; for (size_t i = 0; i <= length - searchLength; i++) { if (memcmp(characters + i, searchCharacters, - searchLength * sizeof(of_unichar_t)) == 0) { + searchLength * sizeof(OFUnichar)) == 0) { objc_autoreleasePoolPop(pool); return true; } } @@ -2100,25 +2100,25 @@ return new; } - (bool)hasPrefix: (OFString *)prefix { - of_unichar_t *tmp; + OFUnichar *tmp; size_t prefixLength; bool hasPrefix; if ((prefixLength = prefix.length) > self.length) return false; - tmp = of_alloc(prefixLength, sizeof(of_unichar_t)); + tmp = of_alloc(prefixLength, sizeof(OFUnichar)); @try { void *pool = objc_autoreleasePoolPush(); [self getCharacters: tmp inRange: OFMakeRange(0, prefixLength)]; hasPrefix = (memcmp(tmp, prefix.characters, - prefixLength * sizeof(of_unichar_t)) == 0); + prefixLength * sizeof(OFUnichar)) == 0); objc_autoreleasePoolPop(pool); } @finally { free(tmp); } @@ -2126,31 +2126,31 @@ return hasPrefix; } - (bool)hasSuffix: (OFString *)suffix { - of_unichar_t *tmp; - const of_unichar_t *suffixCharacters; + OFUnichar *tmp; + const OFUnichar *suffixCharacters; size_t length, suffixLength; bool hasSuffix; if ((suffixLength = suffix.length) > self.length) return false; length = self.length; - tmp = of_alloc(suffixLength, sizeof(of_unichar_t)); + tmp = of_alloc(suffixLength, sizeof(OFUnichar)); @try { void *pool = objc_autoreleasePoolPush(); [self getCharacters: tmp inRange: OFMakeRange(length - suffixLength, suffixLength)]; suffixCharacters = suffix.characters; hasSuffix = (memcmp(tmp, suffixCharacters, - suffixLength * sizeof(of_unichar_t)) == 0); + suffixLength * sizeof(OFUnichar)) == 0); objc_autoreleasePoolPop(pool); } @finally { free(tmp); } @@ -2166,11 +2166,11 @@ - (OFArray *)componentsSeparatedByString: (OFString *)delimiter options: (int)options { void *pool; OFMutableArray *array; - const of_unichar_t *characters, *delimiterCharacters; + const OFUnichar *characters, *delimiterCharacters; bool skipEmpty = (options & OF_STRING_SKIP_EMPTY); size_t length = self.length; size_t delimiterLength = delimiter.length; size_t last; OFString *component; @@ -2197,11 +2197,11 @@ } last = 0; for (size_t i = 0; i <= length - delimiterLength; i++) { if (memcmp(characters + i, delimiterCharacters, - delimiterLength * sizeof(of_unichar_t)) != 0) + delimiterLength * sizeof(OFUnichar)) != 0) continue; component = [self substringWithRange: OFMakeRange(last, i - last)]; if (!skipEmpty || component.length > 0) @@ -2233,14 +2233,14 @@ options: (int)options { OFMutableArray *array = [OFMutableArray array]; void *pool = objc_autoreleasePoolPush(); bool skipEmpty = (options & OF_STRING_SKIP_EMPTY); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length = self.length; - bool (*characterIsMember)(id, SEL, of_unichar_t) = - (bool (*)(id, SEL, of_unichar_t))[characterSet + bool (*characterIsMember)(id, SEL, OFUnichar) = + (bool (*)(id, SEL, OFUnichar))[characterSet methodForSelector: @selector(characterIsMember:)]; size_t last; last = 0; for (size_t i = 0; i < length; i++) { @@ -2521,22 +2521,22 @@ objc_autoreleasePoolPop(pool); return value; } -- (const of_unichar_t *)characters +- (const OFUnichar *)characters { size_t length = self.length; - of_unichar_t *buffer; + OFUnichar *buffer; - buffer = of_alloc(length, sizeof(of_unichar_t)); + buffer = of_alloc(length, sizeof(OFUnichar)); @try { [self getCharacters: buffer inRange: OFMakeRange(0, length)]; return [[OFData dataWithItemsNoCopy: buffer count: length - itemSize: sizeof(of_unichar_t) + itemSize: sizeof(OFUnichar) freeWhenDone: true] items]; } @catch (id e) { free(buffer); @throw e; } @@ -2548,11 +2548,11 @@ } - (const of_char16_t *)UTF16StringWithByteOrder: (OFByteOrder)byteOrder { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length = self.length; of_char16_t *buffer; size_t j; bool swap = (byteOrder != OFByteOrderNative); @@ -2559,11 +2559,11 @@ /* Allocate memory for the worst case */ buffer = of_alloc((length + 1) * 2, sizeof(of_char16_t)); j = 0; for (size_t i = 0; i < length; i++) { - of_unichar_t c = characters[i]; + OFUnichar c = characters[i]; if (c > 0x10FFFF) { free(buffer); @throw [OFInvalidEncodingException exception]; } @@ -2605,11 +2605,11 @@ } } - (size_t)UTF16StringLength { - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t length, UTF16StringLength; length = UTF16StringLength = self.length; for (size_t i = 0; i < length; i++) @@ -2743,11 +2743,11 @@ #ifdef OF_HAVE_BLOCKS - (void)enumerateLinesUsingBlock: (of_string_line_enumeration_block_t)block { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; size_t i, last = 0, length = self.length; bool stop = false, lastCarriageReturn = false; for (i = 0; i < length && !stop; i++) { if (lastCarriageReturn && characters[i] == '\n') { Index: src/OFURL.m ================================================================== --- src/OFURL.m +++ src/OFURL.m @@ -99,11 +99,11 @@ OF_DIRECT_MEMBERS @interface OFInvertedCharacterSetWithoutPercent: OFCharacterSet { OFCharacterSet *_characterSet; - bool (*_characterIsMember)(id, SEL, of_unichar_t); + bool (*_characterIsMember)(id, SEL, OFUnichar); } - (instancetype)initWithCharacterSet: (OFCharacterSet *)characterSet; @end @@ -148,11 +148,11 @@ return OF_RETAIN_COUNT_MAX; } @end @implementation OFURLAllowedCharacterSet -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && of_ascii_isalnum(character)) return true; switch (character) { @@ -177,11 +177,11 @@ } } @end @implementation OFURLSchemeAllowedCharacterSet -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && of_ascii_isalnum(character)) return true; switch (character) { @@ -194,11 +194,11 @@ } } @end @implementation OFURLPathAllowedCharacterSet -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && of_ascii_isalnum(character)) return true; switch (character) { @@ -226,11 +226,11 @@ } } @end @implementation OFURLQueryOrFragmentAllowedCharacterSet -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && of_ascii_isalnum(character)) return true; switch (character) { @@ -259,11 +259,11 @@ } } @end @implementation OFURLQueryKeyValueAllowedCharacterSet -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && of_ascii_isalnum(character)) return true; switch (character) { @@ -296,11 +296,11 @@ { self = [super init]; @try { _characterSet = [characterSet retain]; - _characterIsMember = (bool (*)(id, SEL, of_unichar_t)) + _characterIsMember = (bool (*)(id, SEL, OFUnichar)) [_characterSet methodForSelector: @selector(characterIsMember:)]; } @catch (id e) { [self release]; @throw e; @@ -314,11 +314,11 @@ [_characterSet release]; [super dealloc]; } -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { return (character != '%' && !_characterIsMember(_characterSet, @selector(characterIsMember:), character)); } @end Index: src/OFUTF8String.m ================================================================== --- src/OFUTF8String.m +++ src/OFUTF8String.m @@ -350,11 +350,11 @@ } j = 0; for (size_t i = 0; i < cStringLength; i++) { unsigned char character = (unsigned char)cString[i]; - of_unichar_t unichar; + OFUnichar unichar; char buffer[4]; size_t byteLength; if (character < tableOffset) { _s->cString[j++] = cString[i]; @@ -459,11 +459,11 @@ } return self; } -- (instancetype)initWithCharacters: (const of_unichar_t *)characters +- (instancetype)initWithCharacters: (const OFUnichar *)characters length: (size_t)length { self = [super init]; @try { @@ -531,11 +531,11 @@ _s->length = length; _s->freeWhenDone = true; j = 0; for (size_t i = 0; i < length; i++) { - of_unichar_t character = + OFUnichar character = (swap ? OF_BSWAP16(string[i]) : string[i]); size_t len; /* Missing high surrogate */ if ((character & 0xFC00) == 0xDC00) @@ -867,11 +867,11 @@ } i = j = 0; while (i < _s->cStringLength && j < otherCStringLength) { - of_unichar_t c1, c2; + OFUnichar c1, c2; ssize_t l1, l2; l1 = of_string_utf8_decode(_s->cString + i, _s->cStringLength - i, &c1); l2 = of_string_utf8_decode(otherCString + j, @@ -879,19 +879,19 @@ if (l1 <= 0 || l2 <= 0 || c1 > 0x10FFFF || c2 > 0x10FFFF) @throw [OFInvalidEncodingException exception]; if (c1 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) { - of_unichar_t tc = + OFUnichar tc = of_unicode_casefolding_table[c1 >> 8][c1 & 0xFF]; if (tc) c1 = tc; } if (c2 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) { - of_unichar_t tc = + OFUnichar tc = of_unicode_casefolding_table[c2 >> 8][c2 & 0xFF]; if (tc) c2 = tc; } @@ -922,11 +922,11 @@ return _s->hash; OF_HASH_INIT(hash); for (size_t i = 0; i < _s->cStringLength; i++) { - of_unichar_t c; + OFUnichar c; ssize_t length; if ((length = of_string_utf8_decode(_s->cString + i, _s->cStringLength - i, &c)) <= 0) @throw [OFInvalidEncodingException exception]; @@ -944,13 +944,13 @@ _s->hashed = true; return hash; } -- (of_unichar_t)characterAtIndex: (size_t)idx +- (OFUnichar)characterAtIndex: (size_t)idx { - of_unichar_t character; + OFUnichar character; if (idx >= _s->length) @throw [OFOutOfRangeException exception]; if (!_s->isUTF8) @@ -963,22 +963,22 @@ @throw [OFInvalidEncodingException exception]; return character; } -- (void)getCharacters: (of_unichar_t *)buffer inRange: (OFRange)range +- (void)getCharacters: (OFUnichar *)buffer inRange: (OFRange)range { /* TODO: Could be slightly optimized */ void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = self.characters; + const OFUnichar *characters = self.characters; if (range.length > SIZE_MAX - range.location || range.location + range.length > _s->length) @throw [OFOutOfRangeException exception]; memcpy(buffer, characters + range.location, - range.length * sizeof(of_unichar_t)); + range.length * sizeof(OFUnichar)); objc_autoreleasePoolPop(pool); } - (OFRange)rangeOfString: (OFString *)string @@ -1150,17 +1150,17 @@ objc_autoreleasePoolPop(pool); return array; } -- (const of_unichar_t *)characters +- (const OFUnichar *)characters { - of_unichar_t *buffer = of_alloc(_s->length, sizeof(of_unichar_t)); + OFUnichar *buffer = of_alloc(_s->length, sizeof(OFUnichar)); size_t i = 0, j = 0; while (i < _s->cStringLength) { - of_unichar_t c; + OFUnichar c; ssize_t cLen; cLen = of_string_utf8_decode(_s->cString + i, _s->cStringLength - i, &c); @@ -1173,11 +1173,11 @@ i += cLen; } return [[OFData dataWithItemsNoCopy: buffer count: _s->length - itemSize: sizeof(of_unichar_t) + itemSize: sizeof(OFUnichar) freeWhenDone: true] items]; } - (const of_char32_t *)UTF32StringWithByteOrder: (OFByteOrder)byteOrder { Index: src/OFWin32ConsoleStdIOStream.m ================================================================== --- src/OFWin32ConsoleStdIOStream.m +++ src/OFWin32ConsoleStdIOStream.m @@ -171,11 +171,11 @@ UTF16Len = (DWORD)stringLen; memcpy(UTF16, string.UTF16String, stringLen); } if (UTF16Len > 0 && _incompleteUTF16Surrogate != 0) { - of_unichar_t c = + OFUnichar c = (((_incompleteUTF16Surrogate & 0x3FF) << 10) | (UTF16[0] & 0x3FF)) + 0x10000; char UTF8[4]; size_t UTF8Len; @@ -195,11 +195,11 @@ _incompleteUTF16Surrogate = 0; i++; } for (; i < UTF16Len; i++) { - of_unichar_t c = UTF16[i]; + OFUnichar c = UTF16[i]; char UTF8[4]; size_t UTF8Len; /* Missing high surrogate */ if ((c & 0xFC00) == 0xDC00) @@ -269,11 +269,11 @@ if (length > SIZE_MAX / 2) @throw [OFOutOfRangeException exception]; if (_incompleteUTF8SurrogateLen > 0) { - of_unichar_t c; + OFUnichar c; of_char16_t UTF16[2]; ssize_t UTF8Len; size_t toCopy; DWORD UTF16Len, bytesWritten; @@ -360,11 +360,11 @@ tmp = of_alloc(length * 2, sizeof(of_char16_t)); @try { DWORD bytesWritten; while (i < length) { - of_unichar_t c; + OFUnichar c; ssize_t UTF8Len; UTF8Len = of_string_utf8_decode(buffer + i, length - i, &c); Index: src/encodings/codepage-437.m ================================================================== --- src/encodings/codepage-437.m +++ src/encodings/codepage-437.m @@ -127,15 +127,15 @@ 0xFE }; static const uint8_t page25Start = 0x00; bool -of_unicode_to_codepage_437(const of_unichar_t *input, unsigned char *output, +of_unicode_to_codepage_437(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/codepage-850.m ================================================================== --- src/encodings/codepage-850.m +++ src/encodings/codepage-850.m @@ -103,15 +103,15 @@ 0xFE }; static const uint8_t page25Start = 0x00; bool -of_unicode_to_codepage_850(const of_unichar_t *input, unsigned char *output, +of_unicode_to_codepage_850(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/codepage-858.m ================================================================== --- src/encodings/codepage-858.m +++ src/encodings/codepage-858.m @@ -109,15 +109,15 @@ 0xFE }; static const uint8_t page25Start = 0x00; bool -of_unicode_to_codepage_858(const of_unichar_t *input, unsigned char *output, +of_unicode_to_codepage_858(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/iso-8859-15.m ================================================================== --- src/encodings/iso-8859-15.m +++ src/encodings/iso-8859-15.m @@ -58,15 +58,15 @@ 0xA4 }; static const uint8_t page20Start = 0xAC; bool -of_unicode_to_iso_8859_15(const of_unichar_t *input, unsigned char *output, +of_unicode_to_iso_8859_15(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/iso-8859-2.m ================================================================== --- src/encodings/iso-8859-2.m +++ src/encodings/iso-8859-2.m @@ -78,15 +78,15 @@ 0x00, 0xA2, 0xFF, 0x00, 0xB2, 0x00, 0xBD }; static const uint8_t page2Start = 0xC7; bool -of_unicode_to_iso_8859_2(const of_unichar_t *input, unsigned char *output, +of_unicode_to_iso_8859_2(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/iso-8859-3.m ================================================================== --- src/encodings/iso-8859-3.m +++ src/encodings/iso-8859-3.m @@ -75,15 +75,15 @@ 0xA2, 0xFF }; static const uint8_t page2Start = 0xD8; bool -of_unicode_to_iso_8859_3(const of_unichar_t *input, unsigned char *output, +of_unicode_to_iso_8859_3(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/koi8-r.m ================================================================== --- src/encodings/koi8-r.m +++ src/encodings/koi8-r.m @@ -113,15 +113,15 @@ 0x94 }; static const uint8_t page25Start = 0x00; bool -of_unicode_to_koi8_r(const of_unichar_t *input, unsigned char *output, +of_unicode_to_koi8_r(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/koi8-u.m ================================================================== --- src/encodings/koi8-u.m +++ src/encodings/koi8-u.m @@ -121,15 +121,15 @@ 0x94 }; static const uint8_t page25Start = 0x00; bool -of_unicode_to_koi8_u(const of_unichar_t *input, unsigned char *output, +of_unicode_to_koi8_u(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/mac-roman.m ================================================================== --- src/encodings/mac-roman.m +++ src/encodings/mac-roman.m @@ -147,15 +147,15 @@ 0xDE, 0xDF }; static const uint8_t pageFBStart = 0x01; bool -of_unicode_to_mac_roman(const of_unichar_t *input, unsigned char *output, +of_unicode_to_mac_roman(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/windows-1251.m ================================================================== --- src/encodings/windows-1251.m +++ src/encodings/windows-1251.m @@ -100,15 +100,15 @@ 0x00, 0x00, 0x00, 0x00, 0x99 }; static const uint8_t page21Start = 0x16; bool -of_unicode_to_windows_1251(const of_unichar_t *input, unsigned char *output, +of_unicode_to_windows_1251(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/encodings/windows-1252.m ================================================================== --- src/encodings/windows-1252.m +++ src/encodings/windows-1252.m @@ -96,15 +96,15 @@ 0x99 }; static const uint8_t page21Start = 0x22; bool -of_unicode_to_windows_1252(const of_unichar_t *input, unsigned char *output, +of_unicode_to_windows_1252(const OFUnichar *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { - of_unichar_t c = input[i]; + OFUnichar c = input[i]; if OF_UNLIKELY (c > 0x7F) { uint8_t idx; if OF_UNLIKELY (c > 0xFFFF) { Index: src/of_asprintf.m ================================================================== --- src/of_asprintf.m +++ src/of_asprintf.m @@ -417,11 +417,11 @@ ctx->subformat[ctx->subformatLen - 1] = 's'; { char buffer[5]; size_t len = of_string_utf8_encode( - va_arg(ctx->arguments, of_unichar_t), buffer); + va_arg(ctx->arguments, OFUnichar), buffer); if (len == 0) return false; buffer[len] = 0; @@ -434,12 +434,12 @@ return false; ctx->subformat[ctx->subformatLen - 1] = 's'; { - const of_unichar_t *arg = - va_arg(ctx->arguments, const of_unichar_t *); + const OFUnichar *arg = + va_arg(ctx->arguments, const OFUnichar *); size_t j, len = of_string_utf32_length(arg); char *buffer; if (SIZE_MAX / 4 < len || (SIZE_MAX / 4) - len < 1) return false; Index: src/unicode.h ================================================================== --- src/unicode.h +++ src/unicode.h @@ -23,20 +23,20 @@ #define OF_UNICODE_DECOMPOSITION_COMPAT_TABLE_SIZE 0x2FB #ifdef __cplusplus extern "C" { #endif -extern const of_unichar_t *const _Nonnull +extern const OFUnichar *const _Nonnull of_unicode_uppercase_table[OF_UNICODE_UPPERCASE_TABLE_SIZE]; -extern const of_unichar_t *const _Nonnull +extern const OFUnichar *const _Nonnull of_unicode_lowercase_table[OF_UNICODE_LOWERCASE_TABLE_SIZE]; -extern const of_unichar_t *const _Nonnull +extern const OFUnichar *const _Nonnull of_unicode_titlecase_table[OF_UNICODE_TITLECASE_TABLE_SIZE]; -extern const of_unichar_t *const _Nonnull +extern const OFUnichar *const _Nonnull of_unicode_casefolding_table[OF_UNICODE_CASEFOLDING_TABLE_SIZE]; extern const char *const _Nullable *const _Nonnull of_unicode_decomposition_table[OF_UNICODE_DECOMPOSITION_TABLE_SIZE]; extern const char *const _Nullable *const _Nonnull of_unicode_decomposition_compat_table[OF_UNICODE_DECOMPOSITION_COMPAT_TABLE_SIZE]; #ifdef __cplusplus } #endif Index: src/unicode.m ================================================================== --- src/unicode.m +++ src/unicode.m @@ -15,14 +15,14 @@ #include "config.h" #import "OFString.h" -static const of_unichar_t emptyPage[0x100] = { 0 }; +static const OFUnichar emptyPage[0x100] = { 0 }; static const char *emptyDecompositionPage[0x100] = { NULL }; -static const of_unichar_t uppercasePage0[0x100] = { +static const OFUnichar uppercasePage0[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -53,11 +53,11 @@ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 0, 216, 217, 218, 219, 220, 221, 222, 376, }; -static const of_unichar_t uppercasePage1[0x100] = { +static const OFUnichar uppercasePage1[0x100] = { 0, 256, 0, 258, 0, 260, 0, 262, 0, 264, 0, 266, 0, 268, 0, 270, 0, 272, 0, 274, 0, 276, 0, 278, 0, 280, 0, 282, 0, 284, 0, 286, 0, 288, 0, 290, 0, 292, 0, 294, @@ -88,11 +88,11 @@ 0, 488, 0, 490, 0, 492, 0, 494, 0, 0, 497, 497, 0, 500, 0, 0, 0, 504, 0, 506, 0, 508, 0, 510, }; -static const of_unichar_t uppercasePage2[0x100] = { +static const OFUnichar uppercasePage2[0x100] = { 0, 512, 0, 514, 0, 516, 0, 518, 0, 520, 0, 522, 0, 524, 0, 526, 0, 528, 0, 530, 0, 532, 0, 534, 0, 536, 0, 538, 0, 540, 0, 542, 0, 0, 0, 546, 0, 548, 0, 550, @@ -123,11 +123,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage3[0x100] = { +static const OFUnichar uppercasePage3[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -158,11 +158,11 @@ 0, 1000, 0, 1002, 0, 1004, 0, 1006, 922, 929, 1017, 895, 0, 917, 0, 0, 1015, 0, 0, 1018, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage4[0x100] = { +static const OFUnichar uppercasePage4[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -193,11 +193,11 @@ 0, 1256, 0, 1258, 0, 1260, 0, 1262, 0, 1264, 0, 1266, 0, 1268, 0, 1270, 0, 1272, 0, 1274, 0, 1276, 0, 1278, }; -static const of_unichar_t uppercasePage5[0x100] = { +static const OFUnichar uppercasePage5[0x100] = { 0, 1280, 0, 1282, 0, 1284, 0, 1286, 0, 1288, 0, 1290, 0, 1292, 0, 1294, 0, 1296, 0, 1298, 0, 1300, 0, 1302, 0, 1304, 0, 1306, 0, 1308, 0, 1310, 0, 1312, 0, 1314, 0, 1316, 0, 1318, @@ -228,11 +228,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage16[0x100] = { +static const OFUnichar uppercasePage16[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -263,11 +263,11 @@ 7336, 7337, 7338, 7339, 7340, 7341, 7342, 7343, 7344, 7345, 7346, 7347, 7348, 7349, 7350, 7351, 7352, 7353, 7354, 0, 0, 7357, 7358, 7359, }; -static const of_unichar_t uppercasePage19[0x100] = { +static const OFUnichar uppercasePage19[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -298,11 +298,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5104, 5105, 5106, 5107, 5108, 5109, 0, 0, }; -static const of_unichar_t uppercasePage28[0x100] = { +static const OFUnichar uppercasePage28[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -333,11 +333,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage29[0x100] = { +static const OFUnichar uppercasePage29[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -368,11 +368,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage30[0x100] = { +static const OFUnichar uppercasePage30[0x100] = { 0, 7680, 0, 7682, 0, 7684, 0, 7686, 0, 7688, 0, 7690, 0, 7692, 0, 7694, 0, 7696, 0, 7698, 0, 7700, 0, 7702, 0, 7704, 0, 7706, 0, 7708, 0, 7710, 0, 7712, 0, 7714, 0, 7716, 0, 7718, @@ -403,11 +403,11 @@ 0, 7912, 0, 7914, 0, 7916, 0, 7918, 0, 7920, 0, 7922, 0, 7924, 0, 7926, 0, 7928, 0, 7930, 0, 7932, 0, 7934, }; -static const of_unichar_t uppercasePage31[0x100] = { +static const OFUnichar uppercasePage31[0x100] = { 7944, 7945, 7946, 7947, 7948, 7949, 7950, 7951, 0, 0, 0, 0, 0, 0, 0, 0, 7960, 7961, 7962, 7963, 7964, 7965, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7976, 7977, 7978, 7979, 7980, 7981, 7982, 7983, @@ -438,11 +438,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage33[0x100] = { +static const OFUnichar uppercasePage33[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -473,11 +473,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage36[0x100] = { +static const OFUnichar uppercasePage36[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -508,11 +508,11 @@ 9422, 9423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage44[0x100] = { +static const OFUnichar uppercasePage44[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -543,11 +543,11 @@ 0, 0, 0, 0, 11499, 0, 11501, 0, 0, 0, 0, 11506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage45[0x100] = { +static const OFUnichar uppercasePage45[0x100] = { 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 0, 4295, @@ -578,11 +578,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage166[0x100] = { +static const OFUnichar uppercasePage166[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -613,11 +613,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage167[0x100] = { +static const OFUnichar uppercasePage167[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42786, 0, 42788, 0, 42790, @@ -648,11 +648,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42997, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage171[0x100] = { +static const OFUnichar uppercasePage171[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -683,11 +683,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage255[0x100] = { +static const OFUnichar uppercasePage255[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -718,11 +718,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage260[0x100] = { +static const OFUnichar uppercasePage260[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -753,11 +753,11 @@ 66752, 66753, 66754, 66755, 66756, 66757, 66758, 66759, 66760, 66761, 66762, 66763, 66764, 66765, 66766, 66767, 66768, 66769, 66770, 66771, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage268[0x100] = { +static const OFUnichar uppercasePage268[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -788,11 +788,11 @@ 68776, 68777, 68778, 68779, 68780, 68781, 68782, 68783, 68784, 68785, 68786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage280[0x100] = { +static const OFUnichar uppercasePage280[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -823,11 +823,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage366[0x100] = { +static const OFUnichar uppercasePage366[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -858,11 +858,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t uppercasePage489[0x100] = { +static const OFUnichar uppercasePage489[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125184, 125185, 125186, 125187, 125188, 125189, @@ -893,11 +893,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage0[0x100] = { +static const OFUnichar lowercasePage0[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -928,11 +928,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage1[0x100] = { +static const OFUnichar lowercasePage1[0x100] = { 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, 0, 269, 0, 271, 0, 273, 0, 275, 0, 277, 0, 279, 0, 281, 0, 283, 0, 285, 0, 287, 0, 289, 0, 291, 0, 293, 0, 295, 0, @@ -963,11 +963,11 @@ 489, 0, 491, 0, 493, 0, 495, 0, 0, 499, 499, 0, 501, 0, 405, 447, 505, 0, 507, 0, 509, 0, 511, 0, }; -static const of_unichar_t lowercasePage2[0x100] = { +static const OFUnichar lowercasePage2[0x100] = { 513, 0, 515, 0, 517, 0, 519, 0, 521, 0, 523, 0, 525, 0, 527, 0, 529, 0, 531, 0, 533, 0, 535, 0, 537, 0, 539, 0, 541, 0, 543, 0, 414, 0, 547, 0, 549, 0, 551, 0, @@ -998,11 +998,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage3[0x100] = { +static const OFUnichar lowercasePage3[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1033,11 +1033,11 @@ 1001, 0, 1003, 0, 1005, 0, 1007, 0, 0, 0, 0, 0, 952, 0, 0, 1016, 0, 1010, 1019, 0, 0, 891, 892, 893, }; -static const of_unichar_t lowercasePage4[0x100] = { +static const OFUnichar lowercasePage4[0x100] = { 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, @@ -1068,11 +1068,11 @@ 1257, 0, 1259, 0, 1261, 0, 1263, 0, 1265, 0, 1267, 0, 1269, 0, 1271, 0, 1273, 0, 1275, 0, 1277, 0, 1279, 0, }; -static const of_unichar_t lowercasePage5[0x100] = { +static const OFUnichar lowercasePage5[0x100] = { 1281, 0, 1283, 0, 1285, 0, 1287, 0, 1289, 0, 1291, 0, 1293, 0, 1295, 0, 1297, 0, 1299, 0, 1301, 0, 1303, 0, 1305, 0, 1307, 0, 1309, 0, 1311, 0, 1313, 0, 1315, 0, 1317, 0, 1319, 0, @@ -1103,11 +1103,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage16[0x100] = { +static const OFUnichar lowercasePage16[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1138,11 +1138,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage19[0x100] = { +static const OFUnichar lowercasePage19[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1173,11 +1173,11 @@ 43960, 43961, 43962, 43963, 43964, 43965, 43966, 43967, 5112, 5113, 5114, 5115, 5116, 5117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage28[0x100] = { +static const OFUnichar lowercasePage28[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1208,11 +1208,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage30[0x100] = { +static const OFUnichar lowercasePage30[0x100] = { 7681, 0, 7683, 0, 7685, 0, 7687, 0, 7689, 0, 7691, 0, 7693, 0, 7695, 0, 7697, 0, 7699, 0, 7701, 0, 7703, 0, 7705, 0, 7707, 0, 7709, 0, 7711, 0, 7713, 0, 7715, 0, 7717, 0, 7719, 0, @@ -1243,11 +1243,11 @@ 7913, 0, 7915, 0, 7917, 0, 7919, 0, 7921, 0, 7923, 0, 7925, 0, 7927, 0, 7929, 0, 7931, 0, 7933, 0, 7935, 0, }; -static const of_unichar_t lowercasePage31[0x100] = { +static const OFUnichar lowercasePage31[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 7936, 7937, 7938, 7939, 7940, 7941, 7942, 7943, 0, 0, 0, 0, 0, 0, 0, 0, 7952, 7953, 7954, 7955, 7956, 7957, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1278,11 +1278,11 @@ 8160, 8161, 8058, 8059, 8165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8056, 8057, 8060, 8061, 8179, 0, 0, 0, }; -static const of_unichar_t lowercasePage33[0x100] = { +static const OFUnichar lowercasePage33[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 969, 0, @@ -1313,11 +1313,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage36[0x100] = { +static const OFUnichar lowercasePage36[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1348,11 +1348,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage44[0x100] = { +static const OFUnichar lowercasePage44[0x100] = { 11312, 11313, 11314, 11315, 11316, 11317, 11318, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11337, 11338, 11339, 11340, 11341, 11342, 11343, 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, @@ -1383,11 +1383,11 @@ 0, 0, 0, 11500, 0, 11502, 0, 0, 0, 0, 11507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage166[0x100] = { +static const OFUnichar lowercasePage166[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1418,11 +1418,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage167[0x100] = { +static const OFUnichar lowercasePage167[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42787, 0, 42789, 0, 42791, 0, @@ -1453,11 +1453,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42998, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage255[0x100] = { +static const OFUnichar lowercasePage255[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65345, 65346, 65347, 65348, 65349, 65350, 65351, @@ -1488,11 +1488,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage260[0x100] = { +static const OFUnichar lowercasePage260[0x100] = { 66600, 66601, 66602, 66603, 66604, 66605, 66606, 66607, 66608, 66609, 66610, 66611, 66612, 66613, 66614, 66615, 66616, 66617, 66618, 66619, 66620, 66621, 66622, 66623, 66624, 66625, 66626, 66627, 66628, 66629, 66630, 66631, 66632, 66633, 66634, 66635, 66636, 66637, 66638, 66639, @@ -1523,11 +1523,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage268[0x100] = { +static const OFUnichar lowercasePage268[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1558,11 +1558,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage280[0x100] = { +static const OFUnichar lowercasePage280[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1593,11 +1593,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage366[0x100] = { +static const OFUnichar lowercasePage366[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1628,11 +1628,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t lowercasePage489[0x100] = { +static const OFUnichar lowercasePage489[0x100] = { 125218, 125219, 125220, 125221, 125222, 125223, 125224, 125225, 125226, 125227, 125228, 125229, 125230, 125231, 125232, 125233, 125234, 125235, 125236, 125237, 125238, 125239, 125240, 125241, 125242, 125243, 125244, 125245, 125246, 125247, 125248, 125249, 125250, 125251, 0, 0, 0, 0, 0, 0, @@ -1663,11 +1663,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t titlecasePage1[0x100] = { +static const OFUnichar titlecasePage1[0x100] = { 0, 256, 0, 258, 0, 260, 0, 262, 0, 264, 0, 266, 0, 268, 0, 270, 0, 272, 0, 274, 0, 276, 0, 278, 0, 280, 0, 282, 0, 284, 0, 286, 0, 288, 0, 290, 0, 292, 0, 294, @@ -1698,11 +1698,11 @@ 0, 488, 0, 490, 0, 492, 0, 494, 0, 498, 498, 498, 0, 500, 0, 0, 0, 504, 0, 506, 0, 508, 0, 510, }; -static const of_unichar_t titlecasePage16[0x100] = { +static const OFUnichar titlecasePage16[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1733,11 +1733,11 @@ 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 0, 0, 4349, 4350, 4351, }; -static const of_unichar_t casefoldingPage0[0x100] = { +static const OFUnichar casefoldingPage0[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1768,11 +1768,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t casefoldingPage1[0x100] = { +static const OFUnichar casefoldingPage1[0x100] = { 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, 0, 269, 0, 271, 0, 273, 0, 275, 0, 277, 0, 279, 0, 281, 0, 283, 0, 285, 0, 287, 0, 289, 0, 291, 0, 293, 0, 295, 0, @@ -1803,11 +1803,11 @@ 489, 0, 491, 0, 493, 0, 495, 0, 0, 499, 499, 0, 501, 0, 405, 447, 505, 0, 507, 0, 509, 0, 511, 0, }; -static const of_unichar_t casefoldingPage3[0x100] = { +static const OFUnichar casefoldingPage3[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1838,11 +1838,11 @@ 1001, 0, 1003, 0, 1005, 0, 1007, 0, 954, 961, 0, 0, 952, 949, 0, 1016, 0, 1010, 1019, 0, 0, 891, 892, 893, }; -static const of_unichar_t casefoldingPage19[0x100] = { +static const OFUnichar casefoldingPage19[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1873,11 +1873,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5104, 5105, 5106, 5107, 5108, 5109, 0, 0, }; -static const of_unichar_t casefoldingPage28[0x100] = { +static const OFUnichar casefoldingPage28[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1908,11 +1908,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const of_unichar_t casefoldingPage30[0x100] = { +static const OFUnichar casefoldingPage30[0x100] = { 7681, 0, 7683, 0, 7685, 0, 7687, 0, 7689, 0, 7691, 0, 7693, 0, 7695, 0, 7697, 0, 7699, 0, 7701, 0, 7703, 0, 7705, 0, 7707, 0, 7709, 0, 7711, 0, 7713, 0, 7715, 0, 7717, 0, 7719, 0, @@ -1943,11 +1943,11 @@ 7913, 0, 7915, 0, 7917, 0, 7919, 0, 7921, 0, 7923, 0, 7925, 0, 7927, 0, 7929, 0, 7931, 0, 7933, 0, 7935, 0, }; -static const of_unichar_t casefoldingPage31[0x100] = { +static const OFUnichar casefoldingPage31[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 7936, 7937, 7938, 7939, 7940, 7941, 7942, 7943, 0, 0, 0, 0, 0, 0, 0, 0, 7952, 7953, 7954, 7955, 7956, 7957, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1978,11 +1978,11 @@ 8160, 8161, 8058, 8059, 8165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8056, 8057, 8060, 8061, 8179, 0, 0, 0, }; -static const of_unichar_t casefoldingPage171[0x100] = { +static const OFUnichar casefoldingPage171[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -12362,11 +12362,11 @@ NULL, NULL, NULL, NULL, NULL, NULL, }; -const of_unichar_t *const of_unicode_uppercase_table[0x1EA] = { +const OFUnichar *const of_unicode_uppercase_table[0x1EA] = { uppercasePage0, uppercasePage1, uppercasePage2, uppercasePage3, uppercasePage4, uppercasePage5, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, uppercasePage16, emptyPage, emptyPage, uppercasePage19, @@ -12488,11 +12488,11 @@ emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, uppercasePage489 }; -const of_unichar_t *const of_unicode_lowercase_table[0x1EA] = { +const OFUnichar *const of_unicode_lowercase_table[0x1EA] = { lowercasePage0, lowercasePage1, lowercasePage2, lowercasePage3, lowercasePage4, lowercasePage5, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, lowercasePage16, emptyPage, emptyPage, lowercasePage19, @@ -12614,11 +12614,11 @@ emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, lowercasePage489 }; -const of_unichar_t *const of_unicode_titlecase_table[0x1EA] = { +const OFUnichar *const of_unicode_titlecase_table[0x1EA] = { uppercasePage0, titlecasePage1, uppercasePage2, uppercasePage3, uppercasePage4, uppercasePage5, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, titlecasePage16, emptyPage, emptyPage, uppercasePage19, @@ -12740,11 +12740,11 @@ emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, uppercasePage489 }; -const of_unichar_t *const of_unicode_casefolding_table[0x1EA] = { +const OFUnichar *const of_unicode_casefolding_table[0x1EA] = { casefoldingPage0, casefoldingPage1, lowercasePage2, casefoldingPage3, lowercasePage4, lowercasePage5, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, Index: tests/OFCharacterSetTests.m ================================================================== --- tests/OFCharacterSetTests.m +++ tests/OFCharacterSetTests.m @@ -25,11 +25,11 @@ @interface SimpleCharacterSet: OFCharacterSet @end @implementation SimpleCharacterSet -- (bool)characterIsMember: (of_unichar_t)character +- (bool)characterIsMember: (OFUnichar)character { return (character % 2 == 0); } @end @@ -43,11 +43,11 @@ module = @"OFCharacterSet"; cs = [[[SimpleCharacterSet alloc] init] autorelease]; ok = true; - for (of_unichar_t c = 0; c < 65536; c++) { + for (OFUnichar c = 0; c < 65536; c++) { if (c % 2 == 0) { if (![cs characterIsMember: c]) ok = false; } else if ([cs characterIsMember: c]) ok = false; @@ -60,11 +60,11 @@ (cs = [OFCharacterSet characterSetWithCharactersInString: @"0123456789"]) && [cs isKindOfClass: [OFBitSetCharacterSet class]]) ok = true; - for (of_unichar_t c = 0; c < 65536; c++) { + for (OFUnichar c = 0; c < 65536; c++) { if (c >= '0' && c <= '9') { if (![cs characterIsMember: c]) ok = false; } else if ([cs characterIsMember: c]) ok = false; @@ -77,11 +77,11 @@ (cs = [OFCharacterSet characterSetWithRange: OFMakeRange('0', 10)]) && [cs isKindOfClass: [OFRangeCharacterSet class]]) ok = true; - for (of_unichar_t c = 0; c < 65536; c++) { + for (OFUnichar c = 0; c < 65536; c++) { if (c >= '0' && c <= '9') { if (![cs characterIsMember: c]) ok = false; } else if ([cs characterIsMember: c]) ok = false; @@ -88,11 +88,11 @@ } TEST(@"-[characterIsMember:]", ok); ok = true; ics = cs.invertedSet; - for (of_unichar_t c = 0; c < 65536; c++) { + for (OFUnichar c = 0; c < 65536; c++) { if (c >= '0' && c <= '9') { if ([ics characterIsMember: c]) ok = false; } else if (![ics characterIsMember: c]) ok = false; Index: tests/OFStringTests.m ================================================================== --- tests/OFStringTests.m +++ tests/OFStringTests.m @@ -32,14 +32,14 @@ static OFString *module = nil; static OFString *whitespace[] = { @" \r \t\n\t \tasd \t \t\t\r\n", @" \t\t \t\t \t \t" }; -static of_unichar_t ucstr[] = { +static OFUnichar ucstr[] = { 0xFEFF, 'f', 0xF6, 0xF6, 'b', 0xE4, 'r', 0x1F03A, 0 }; -static of_unichar_t sucstr[] = { +static OFUnichar sucstr[] = { 0xFFFE0000, 0x66000000, 0xF6000000, 0xF6000000, 0x62000000, 0xE4000000, 0x72000000, 0x3AF00100, 0 }; static uint16_t utf16str[] = { 0xFEFF, 'f', 0xF6, 0xF6, 'b', 0xE4, 'r', 0xD83C, 0xDC3A, 0 @@ -167,11 +167,11 @@ [_string release]; [super dealloc]; } -- (of_unichar_t)characterAtIndex: (size_t)idx +- (OFUnichar)characterAtIndex: (size_t)idx { return [_string characterAtIndex: idx]; } - (size_t)length @@ -215,11 +215,11 @@ void *pool = objc_autoreleasePoolPush(); OFMutableString *s[3]; OFString *is; OFArray *a; size_t i; - const of_unichar_t *ua; + const OFUnichar *ua; const uint16_t *u16a; OFCharacterSet *cs; EntityHandler *h; #ifdef OF_HAVE_BLOCKS __block int j; Index: utils/ofarc/OFArc.m ================================================================== --- utils/ofarc/OFArc.m +++ utils/ofarc/OFArc.m @@ -79,12 +79,12 @@ [OFApplication terminateWithStatus: status]; } static void -mutuallyExclusiveError(of_unichar_t shortOption1, OFString *longOption1, - of_unichar_t shortOption2, OFString *longOption2) +mutuallyExclusiveError(OFUnichar shortOption1, OFString *longOption1, + OFUnichar shortOption2, OFString *longOption2) { OFString *shortOption1Str = [OFString stringWithFormat: @"%C", shortOption1]; OFString *shortOption2Str = [OFString stringWithFormat: @"%C", shortOption2]; @@ -99,15 +99,15 @@ @"longopt2", longOption2)]; [OFApplication terminateWithStatus: 1]; } static void -mutuallyExclusiveError5(of_unichar_t shortOption1, OFString *longOption1, - of_unichar_t shortOption2, OFString *longOption2, - of_unichar_t shortOption3, OFString *longOption3, - of_unichar_t shortOption4, OFString *longOption4, - of_unichar_t shortOption5, OFString *longOption5) +mutuallyExclusiveError5(OFUnichar shortOption1, OFString *longOption1, + OFUnichar shortOption2, OFString *longOption2, + OFUnichar shortOption3, OFString *longOption3, + OFUnichar shortOption4, OFString *longOption4, + OFUnichar shortOption5, OFString *longOption5) { OFString *shortOption1Str = [OFString stringWithFormat: @"%C", shortOption1]; OFString *shortOption2Str = [OFString stringWithFormat: @"%C", shortOption2]; @@ -163,11 +163,11 @@ { 't', @"type", 1, NULL, &type }, { 'v', @"verbose", 0, NULL, NULL }, { 'x', @"extract", 0, NULL, NULL }, { '\0', nil, 0, NULL, NULL } }; - of_unichar_t option, mode = '\0'; + OFUnichar option, mode = '\0'; of_string_encoding_t encoding = OF_STRING_ENCODING_AUTODETECT; OFOptionsParser *optionsParser; OFArray OF_GENERIC(OFString *) *remainingArguments, *files; id archive; Index: utils/ofdns/OFDNS.m ================================================================== --- utils/ofdns/OFDNS.m +++ utils/ofdns/OFDNS.m @@ -90,11 +90,11 @@ { 't', @"type", 1, NULL, NULL }, { '\0', nil, 0, NULL, NULL } }; OFMutableArray OF_GENERIC(OFString *) *recordTypes; OFOptionsParser *optionsParser; - of_unichar_t option; + OFUnichar option; OFArray OF_GENERIC(OFString *) *remainingArguments; OFDNSResolver *resolver; of_dns_class_t DNSClass; #ifdef OF_HAVE_FILES Index: utils/ofhash/OFHash.m ================================================================== --- utils/ofhash/OFHash.m +++ utils/ofhash/OFHash.m @@ -80,11 +80,11 @@ { '\0', @"sha512", 0, &calculateSHA512, NULL }, { '\0', nil, 0, NULL, NULL } }; OFOptionsParser *optionsParser = [OFOptionsParser parserWithOptions: options]; - of_unichar_t option; + OFUnichar option; OFMD5Hash *MD5Hash = nil; OFRIPEMD160Hash *RIPEMD160Hash = nil; OFSHA1Hash *SHA1Hash = nil; OFSHA224Hash *SHA224Hash = nil; OFSHA256Hash *SHA256Hash = nil; Index: utils/ofhttp/OFHTTP.m ================================================================== --- utils/ofhttp/OFHTTP.m +++ utils/ofhttp/OFHTTP.m @@ -429,11 +429,11 @@ { '\0', @"insecure", 0, &_insecure, NULL }, { '\0', @"ignore-status", 0, &_ignoreStatus, NULL }, { '\0', nil, 0, NULL, NULL } }; OFOptionsParser *optionsParser; - of_unichar_t option; + OFUnichar option; #ifdef OF_HAVE_SANDBOX OFSandbox *sandbox = [OFSandbox sandbox]; sandbox.allowsStdIO = true; sandbox.allowsReadingFiles = true;