Differences From Artifact [8c3f9ce8af]:
- File src/OFWin32ConsoleStdIOStream.m — part of check-in [1a86b8175b] at 2022-02-12 07:46:07 on branch trunk — Update copyright (user: js, size: 14678) [annotate] [blame] [check-ins using] [more...]
- File src/platform/Windows/OFWin32ConsoleStdIOStream.m — part of check-in [9e29b98fc3] at 2022-09-24 20:24:25 on branch trunk — Move OFWin32ConsoleStdIOStream to platforms (user: js, size: 14678) [annotate] [blame] [check-ins using]
To Artifact [0e3a4cbb4c]:
- File
src/platform/Windows/OFWin32ConsoleStdIOStream.m
— part of check-in
[c86b8f10f0]
at
2022-11-16 01:27:26
on branch trunk
— Add OFAssert()
This uses the same format as OFEnsure(). (user: js, size: 14660) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
35 36 37 38 39 40 41 | * In order to not do this when redirecting input / output to a file (as the * file would then be read / written in the wrong encoding and break reading / * writing binary), it checks that the handle is indeed a console. */ #include "config.h" | < | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | * In order to not do this when redirecting input / output to a file (as the * file would then be read / written in the wrong encoding and break reading / * writing binary), it checks that the handle is indeed a console. */ #include "config.h" #include <errno.h> #include <io.h> #import "OFWin32ConsoleStdIOStream.h" #import "OFColor.h" #import "OFData.h" #import "OFStdIOStream+Private.h" |
︙ | ︙ | |||
291 292 293 294 295 296 297 | if (_incompleteUTF8SurrogateLen < (size_t)UTF8Len) return 0; UTF8Len = OFUTF8StringDecode( _incompleteUTF8Surrogate, _incompleteUTF8SurrogateLen, &c); if (UTF8Len <= 0 || c > 0x10FFFF) { | | | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | if (_incompleteUTF8SurrogateLen < (size_t)UTF8Len) return 0; UTF8Len = OFUTF8StringDecode( _incompleteUTF8Surrogate, _incompleteUTF8SurrogateLen, &c); if (UTF8Len <= 0 || c > 0x10FFFF) { OFAssert(UTF8Len == 0 || UTF8Len < -4); UTF16[0] = 0xFFFD; UTF16Len = 1; } else { if (c > 0xFFFF) { c -= 0x10000; UTF16[0] = 0xD800 | (c >> 10); |
︙ | ︙ |