@@ -33,11 +33,11 @@ #import "OFWriteFailedException.h" #include @interface OFSubprocess () -- (of_char16_t *)of_wideEnvironmentForDictionary: (OFDictionary *)dictionary; +- (OFChar16 *)of_wideEnvironmentForDictionary: (OFDictionary *)dictionary; - (char *)of_environmentForDictionary: (OFDictionary *)environment; @end @implementation OFSubprocess + (instancetype)subprocessWithProgram: (OFString *)program @@ -180,11 +180,11 @@ [argumentsString appendString: @"\""]; } if ([OFSystemInfo isWindowsNT]) { size_t length; - of_char16_t *argumentsCopy; + OFChar16 *argumentsCopy; STARTUPINFOW si; memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.hStdInput = _writePipe[0]; @@ -192,11 +192,11 @@ si.hStdError = GetStdHandle(STD_ERROR_HANDLE); si.dwFlags |= STARTF_USESTDHANDLES; length = argumentsString.UTF16StringLength; argumentsCopy = of_alloc(length + 1, - sizeof(of_char16_t)); + sizeof(OFChar16)); memcpy(argumentsCopy, argumentsString.UTF16String, (length + 1) * 2); @try { if (!CreateProcessW(program.UTF16String, argumentsCopy, NULL, NULL, TRUE, @@ -249,22 +249,22 @@ [self close]; [super dealloc]; } -- (of_char16_t *)of_wideEnvironmentForDictionary: (OFDictionary *)environment +- (OFChar16 *)of_wideEnvironmentForDictionary: (OFDictionary *)environment { OFMutableData *env; OFEnumerator *keyEnumerator, *objectEnumerator; OFString *key, *object; - const of_char16_t equal = '='; - const of_char16_t zero[2] = { 0, 0 }; + const OFChar16 equal = '='; + const OFChar16 zero[2] = { 0, 0 }; if (environment == nil) return NULL; - env = [OFMutableData dataWithItemSize: sizeof(of_char16_t)]; + env = [OFMutableData dataWithItemSize: sizeof(OFChar16)]; keyEnumerator = [environment keyEnumerator]; objectEnumerator = [environment objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) {