Index: src/OFMutableString.m ================================================================== --- src/OFMutableString.m +++ src/OFMutableString.m @@ -89,11 +89,11 @@ { return (id)[[OFMutableString_UTF8 alloc] initWithUnicodeString: string]; } - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFMutableString_UTF8 alloc] initWithUnicodeString: string byteOrder: byteOrder]; } @@ -104,11 +104,11 @@ return (id)[[OFMutableString_UTF8 alloc] initWithUnicodeString: string length: length]; } - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { return (id)[[OFMutableString_UTF8 alloc] initWithUnicodeString: string byteOrder: byteOrder @@ -119,11 +119,11 @@ { return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string]; } - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string byteOrder: byteOrder]; } @@ -134,11 +134,11 @@ return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string length: length]; } - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string byteOrder: byteOrder Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -115,14 +115,14 @@ } of_comparison_result_t; /** * \brief An enum for storing endianess. */ -typedef enum of_endianess_t { - OF_ENDIANESS_BIG_ENDIAN, - OF_ENDIANESS_LITTLE_ENDIAN -} of_endianess_t; +typedef enum of_byte_order_t { + OF_BYTE_ORDER_BIG_ENDIAN, + OF_BYTE_ORDER_LITTLE_ENDIAN +} of_byte_order_t; /** * \brief A range. */ typedef struct of_range_t { Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -155,11 +155,11 @@ * \param string The unicode string * \param byteOrder The byte order to assume if there is no BOM * \return A new autoreleased OFString */ + (instancetype)stringWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder; + byteOrder: (of_byte_order_t)byteOrder; /** * \brief Creates a new OFString from a unicode string with the specified * length. * @@ -178,11 +178,11 @@ * \param byteOrder The byte order to assume if there is no BOM * \param length The length of the unicode string * \return A new autoreleased OFString */ + (instancetype)stringWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length; /** * \brief Creates a new OFString from a UTF-16 encoded string. * @@ -198,11 +198,11 @@ * \param string The UTF-16 string * \param byteOrder The byte order to assume if there is no BOM * \return A new autoreleased OFString */ + (instancetype)stringWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder; + byteOrder: (of_byte_order_t)byteOrder; /** * \brief Creates a new OFString from a UTF-16 encoded string with the specified * length. * @@ -222,11 +222,11 @@ * \param byteOrder The byte order to assume if there is no BOM * \param length The length of the unicode string * \return A new autoreleased OFString */ + (instancetype)stringWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length; /** * \brief Creates a new OFString from a format string. * @@ -372,11 +372,11 @@ * \param string The unicode string * \param byteOrder The byte order to assume if there is no BOM * \return An initialized OFString */ - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder; + byteOrder: (of_byte_order_t)byteOrder; /** * \brief Initializes an already allocated OFString with a unicode string with * the specified length. * @@ -396,11 +396,11 @@ * \param byteOrder The byte order to assume if there is no BOM * \param length The length of the unicode string * \return An initialized OFString */ - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length; /** * \brief Initializes an already allocated OFString with a UTF-16 string. * @@ -416,11 +416,11 @@ * \param string The UTF-16 string * \param byteOrder The byte order to assume if there is no BOM * \return An initialized OFString */ - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder; + byteOrder: (of_byte_order_t)byteOrder; /** * \brief Initializes an already allocated OFString with a UTF-16 string with * the specified length. * @@ -440,11 +440,11 @@ * \param byteOrder The byte order to assume if there is no BOM * \param length The length of the UTF-16 string * \return An initialized OFString */ - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length; /** * \brief Initializes an already allocated OFString with a format string. * Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -356,11 +356,11 @@ { return (id)[[OFString_UTF8 alloc] initWithUnicodeString: string]; } - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFString_UTF8 alloc] initWithUnicodeString: string byteOrder: byteOrder]; } @@ -370,11 +370,11 @@ return (id)[[OFString_UTF8 alloc] initWithUnicodeString: string length: length]; } - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { return (id)[[OFString_UTF8 alloc] initWithUnicodeString: string byteOrder: byteOrder length: length]; @@ -384,11 +384,11 @@ { return (id)[[OFString_UTF8 alloc] initWithUTF16String: string]; } - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFString_UTF8 alloc] initWithUTF16String: string byteOrder: byteOrder]; } @@ -398,11 +398,11 @@ return (id)[[OFString_UTF8 alloc] initWithUTF16String: string length: length]; } - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { return (id)[[OFString_UTF8 alloc] initWithUTF16String: string byteOrder: byteOrder length: length]; @@ -557,11 +557,11 @@ { return [[[self alloc] initWithUnicodeString: string] autorelease]; } + (instancetype)stringWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return [[[self alloc] initWithUnicodeString: string byteOrder: byteOrder] autorelease]; } @@ -571,11 +571,11 @@ return [[[self alloc] initWithUnicodeString: string length: length] autorelease]; } + (instancetype)stringWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { return [[[self alloc] initWithUnicodeString: string byteOrder: byteOrder length: length] autorelease]; @@ -585,11 +585,11 @@ { return [[[self alloc] initWithUTF16String: string] autorelease]; } + (instancetype)stringWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return [[[self alloc] initWithUTF16String: string byteOrder: byteOrder] autorelease]; } @@ -599,11 +599,11 @@ return [[[self alloc] initWithUTF16String: string length: length] autorelease]; } + (instancetype)stringWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { return [[[self alloc] initWithUTF16String: string byteOrder: byteOrder length: length] autorelease]; @@ -719,16 +719,16 @@ } - initWithUnicodeString: (const of_unichar_t*)string { return [self initWithUnicodeString: string - byteOrder: OF_ENDIANESS_NATIVE + byteOrder: OF_BYTE_ORDER_NATIVE length: of_unicode_string_length(string)]; } - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return [self initWithUnicodeString: string byteOrder: byteOrder length: of_unicode_string_length(string)]; } @@ -735,16 +735,16 @@ - initWithUnicodeString: (const of_unichar_t*)string length: (size_t)length { return [self initWithUnicodeString: string - byteOrder: OF_ENDIANESS_NATIVE + byteOrder: OF_BYTE_ORDER_NATIVE length: length]; } - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c @@ -752,16 +752,16 @@ } - initWithUTF16String: (const uint16_t*)string { return [self initWithUTF16String: string - byteOrder: OF_ENDIANESS_BIG_ENDIAN + byteOrder: OF_BYTE_ORDER_BIG_ENDIAN length: of_utf16_string_length(string)]; } - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder { return [self initWithUTF16String: string byteOrder: byteOrder length: of_utf16_string_length(string)]; } @@ -768,16 +768,16 @@ - initWithUTF16String: (const uint16_t*)string length: (size_t)length { return [self initWithUTF16String: string - byteOrder: OF_ENDIANESS_BIG_ENDIAN + byteOrder: OF_BYTE_ORDER_BIG_ENDIAN length: length]; } - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c Index: src/OFString_UTF8.m ================================================================== --- src/OFString_UTF8.m +++ src/OFString_UTF8.m @@ -310,11 +310,11 @@ return self; } - initWithUnicodeString: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { self = [super init]; @try { @@ -326,11 +326,11 @@ length--; } else if (length > 0 && *string == 0xFFFE0000) { swap = YES; string++; length--; - } else if (byteOrder != OF_ENDIANESS_NATIVE) + } else if (byteOrder != OF_BYTE_ORDER_NATIVE) swap = YES; s = &s_store; s->cStringLength = length; @@ -392,11 +392,11 @@ return self; } - initWithUTF16String: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder + byteOrder: (of_byte_order_t)byteOrder length: (size_t)length { self = [super init]; @try { @@ -408,11 +408,11 @@ length--; } else if (length > 0 && *string == 0xFFFE) { swap = YES; string++; length--; - } else if (byteOrder != OF_ENDIANESS_NATIVE) + } else if (byteOrder != OF_BYTE_ORDER_NATIVE) swap = YES; s = &s_store; s->cStringLength = length; Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -51,13 +51,13 @@ # define OF_BIG_ENDIAN # endif #endif #ifdef OF_BIG_ENDIAN -# define OF_ENDIANESS_NATIVE OF_ENDIANESS_BIG_ENDIAN +# define OF_BYTE_ORDER_NATIVE OF_BYTE_ORDER_BIG_ENDIAN #else -# define OF_ENDIANESS_NATIVE OF_ENDIANESS_LITTLE_ENDIAN +# define OF_BYTE_ORDER_NATIVE OF_BYTE_ORDER_LITTLE_ENDIAN #endif /* Hopefully no arch needs more than 16 bytes padding */ #ifndef __BIGGEST_ALIGNMENT__ # define __BIGGEST_ALIGNMENT__ 16