@@ -53,23 +53,23 @@ - (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String length: (size_t)UTF8StringLength freeWhenDone: (bool)freeWhenDone { - self = [self initWithUTF8String: UTF8String - length: UTF8StringLength]; + self = [self initWithUTF8String: UTF8String length: UTF8StringLength]; if (freeWhenDone) free(UTF8String); return self; } -- (void)of_convertWithWordStartTable: (const of_unichar_t *const[])startTable - wordMiddleTable: (const of_unichar_t *const[])middleTable +#ifdef OF_HAVE_UNICODE_TABLES +- (void)of_convertWithWordStartTable: (const of_unichar_t *const [])startTable + wordMiddleTable: (const of_unichar_t *const [])middleTable wordStartTableSize: (size_t)startTableSize - wordMiddleTableSize: (size_t)middleTableSize OF_DIRECT + wordMiddleTableSize: (size_t)middleTableSize { of_unichar_t *unicodeString; size_t unicodeLen, newCStringLength; size_t i, j; char *newCString; @@ -185,13 +185,13 @@ /* * Even though cStringLength can change, length cannot, therefore no * need to change it. */ } +#endif -- (void)setCharacter: (of_unichar_t)character - atIndex: (size_t)idx +- (void)setCharacter: (of_unichar_t)character atIndex: (size_t)idx { char buffer[4]; of_unichar_t c; size_t lenNew; ssize_t lenOld; @@ -326,12 +326,11 @@ - (void)appendCString: (const char *)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength { if (encoding == OF_STRING_ENCODING_UTF_8) - [self appendUTF8String: cString - length: cStringLength]; + [self appendUTF8String: cString length: cStringLength]; else { void *pool = objc_autoreleasePoolPush(); [self appendString: [OFString stringWithCString: cString @@ -407,12 +406,11 @@ } @finally { free(tmp); } } -- (void)appendFormat: (OFConstantString *)format - arguments: (va_list)arguments +- (void)appendFormat: (OFConstantString *)format arguments: (va_list)arguments { char *UTF8String; int UTF8StringLength; if (format == nil) @@ -421,12 +419,11 @@ if ((UTF8StringLength = of_vasprintf(&UTF8String, format.UTF8String, arguments)) == -1) @throw [OFInvalidFormatException exception]; @try { - [self appendUTF8String: UTF8String - length: UTF8StringLength]; + [self appendUTF8String: UTF8String length: UTF8StringLength]; } @finally { free(UTF8String); } } @@ -508,12 +505,11 @@ /* UTF-8 does not allow more than 4 bytes per character */ @throw [OFInvalidEncodingException exception]; } } -- (void)insertString: (OFString *)string - atIndex: (size_t)idx +- (void)insertString: (OFString *)string atIndex: (size_t)idx { size_t newCStringLength; if (idx > _s->length) @throw [OFOutOfRangeException exception];