Differences From Artifact [7dd85d6178]:
- File
src/OFWin32ConsoleStdIOStream.m
— part of check-in
[0ddaac3f5b]
at
2020-11-05 00:24:29
on branch trunk
— Avoid -[allocMemoryWithSize:] for temporary memory
-[allocMemoryWithSize:] has book keeping overhead that is unnecessary
for temporary memory. (user: js, size: 14922) [annotate] [blame] [check-ins using] [more...]
To Artifact [01349f1730]:
- File
src/OFWin32ConsoleStdIOStream.m
— part of check-in
[627511b032]
at
2020-11-14 12:23:55
on branch trunk
— Rename of_malloc and of_calloc
The new names should be more accurate. (user: js, size: 14920) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
133 134 135 136 137 138 139 | char *buffer = buffer_; of_char16_t *UTF16; size_t j = 0; if (length > UINT32_MAX) @throw [OFOutOfRangeException exception]; | | | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | char *buffer = buffer_; of_char16_t *UTF16; size_t j = 0; if (length > UINT32_MAX) @throw [OFOutOfRangeException exception]; UTF16 = of_alloc(length, sizeof(of_char16_t)); @try { DWORD UTF16Len; OFMutableData *rest = nil; size_t i = 0; if ([OFSystemInfo isWindowsNT]) { if (!ReadConsoleW(_handle, UTF16, (DWORD)length, |
︙ | ︙ | |||
360 361 362 363 364 365 366 | bytesWritten: bytesWritten * 2 errNo: 0]; _incompleteUTF8SurrogateLen = 0; i += toCopy; } | | | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | bytesWritten: bytesWritten * 2 errNo: 0]; _incompleteUTF8SurrogateLen = 0; i += toCopy; } tmp = of_alloc(length * 2, sizeof(of_char16_t)); @try { DWORD bytesWritten; while (i < length) { of_unichar_t c; ssize_t UTF8Len; |
︙ | ︙ |