Index: src/OFApplication.m ================================================================== --- src/OFApplication.m +++ src/OFApplication.m @@ -150,11 +150,11 @@ void *pool; OFMutableDictionary *environment; #if defined(__MACH__) && !defined(OF_IOS) char **env = *_NSGetEnviron(); #elif defined(__WIN32) - uint16_t *env; + of_char16_t *env; #elif !defined(OF_IOS) char **env = environ; #else char *env; #endif Index: src/OFProcess.h ================================================================== --- src/OFProcess.h +++ src/OFProcess.h @@ -22,16 +22,16 @@ #endif #include #import "OFStream.h" +#import "OFString.h" #ifdef _WIN32 # include #endif -@class OFString; @class OFArray; @class OFDictionary; /*! * @brief A class for stream-like communication with a newly created process. @@ -165,11 +165,11 @@ environment: (OFDictionary*)environment; #ifndef _WIN32 - (char**)OF_environmentForDictionary: (OFDictionary*)dictionary; #else -- (uint16_t*)OF_environmentForDictionary: (OFDictionary*)dictionary; +- (of_char16_t*)OF_environmentForDictionary: (OFDictionary*)dictionary; #endif /*! * @brief Closes the write direction of the process. * Index: src/OFProcess.m ================================================================== --- src/OFProcess.m +++ src/OFProcess.m @@ -174,11 +174,11 @@ STARTUPINFOW si; void *pool; OFMutableString *argumentsString; OFEnumerator *enumerator; OFString *argument; - uint16_t *argumentsCopy; + of_char16_t *argumentsCopy; size_t length; sa.nLength = sizeof(sa); sa.bInheritHandle = TRUE; sa.lpSecurityDescriptor = NULL; @@ -244,11 +244,11 @@ if (containsSpaces) [argumentsString appendString: @"\""]; } length = [argumentsString UTF16StringLength]; - argumentsCopy = [self allocMemoryWithSize: sizeof(uint16_t) + argumentsCopy = [self allocMemoryWithSize: sizeof(of_char16_t) count: length + 1]; memcpy(argumentsCopy, [argumentsString UTF16String], ([argumentsString UTF16StringLength] + 1) * 2); @try { if (!CreateProcessW([program UTF16String], @@ -328,17 +328,17 @@ envp[i] = NULL; return envp; } #else -- (uint16_t*)OF_environmentForDictionary: (OFDictionary*)environment +- (of_char16_t*)OF_environmentForDictionary: (OFDictionary*)environment { OFDataArray *env = [OFDataArray dataArrayWithItemSize: 2]; OFEnumerator *keyEnumerator, *objectEnumerator; OFString *key, *object; - const uint16_t equal = '='; - const uint16_t zero = 0; + const of_char16_t equal = '='; + const of_char16_t zero = 0; keyEnumerator = [environment keyEnumerator]; objectEnumerator = [environment objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && Index: src/OFString+JSONValue.m ================================================================== --- src/OFString+JSONValue.m +++ src/OFString+JSONValue.m @@ -109,14 +109,14 @@ skipWhitespaces(pointer, stop, line); skipComment(pointer, stop, line); } } -static inline uint16_t +static inline of_char16_t parseUnicodeEscape(const char *pointer, const char *stop) { - uint16_t ret = 0; + of_char16_t ret = 0; char i; if (pointer + 5 >= stop) return 0xFFFF; @@ -192,11 +192,11 @@ buffer[i++] = '\t'; (*pointer)++; break; /* Parse unicode escape sequence */ case 'u':; - uint16_t c1, c2; + of_char16_t c1, c2; of_unichar_t c; size_t l; c1 = parseUnicodeEscape(*pointer - 1, stop); if (c1 == 0xFFFF) { @@ -311,11 +311,11 @@ **pointer == '_' || **pointer == '$' || (**pointer & 0x80)) { buffer[i++] = **pointer; (*pointer)++; } else if (**pointer == '\\') { - uint16_t c1, c2; + of_char16_t c1, c2; of_unichar_t c; size_t l; if (++(*pointer) >= stop || **pointer != 'u') { free(buffer);