authorgravatar for Garfield550@users.noreply.github.comGarfield Lee <Garfield550@users.noreply.github.com> 2024-05-10 07:38:39+08:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-05-09 16:38:39-07:00
loge69caaa39f06b7ddf00c1e439c3df91f4efbdef3
tree6b4921887efb693b54cc21adc3625a4e4cf87c23
parent4163126c01c6439acd7a1f958d49b1ae4eeb9e68
signaturebadge-check Signed by PGP key B5690EEEBB952194

lib/std/os/windows/kernel32: add signature for SetConsoleMode (#18715)

- From lib/libc/include/any-windows-any/wincon.h#L235 - See also https://learn.microsoft.com/en-us/windows/console/setconsolemode - Also add DISABLE_NEWLINE_AUTO_RETURN constant which will be used by SetConsoleMode in lib/std/os/windows. Co-authored-by: Kexy Biscuit <kexybiscuit@biscuitt.in>

2 files changed, 2 insertions(+), 0 deletions(-)

lib/std/os/windows.zig+1
......@@ -3928,6 +3928,7 @@ pub const CONSOLE_SCREEN_BUFFER_INFO = extern struct {
39283928};
39293929
39303930pub const ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4;
3931pub const DISABLE_NEWLINE_AUTO_RETURN = 0x8;
39313932
39323933pub const FOREGROUND_BLUE = 1;
39333934pub const FOREGROUND_GREEN = 2;
lib/std/os/windows/kernel32.zig+1
......@@ -165,6 +165,7 @@ pub extern "kernel32" fn GetCommandLineA() callconv(WINAPI) LPSTR;
165165pub extern "kernel32" fn GetCommandLineW() callconv(WINAPI) LPWSTR;
166166
167167pub extern "kernel32" fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: *DWORD) callconv(WINAPI) BOOL;
168pub extern "kernel32" fn SetConsoleMode(in_hConsoleHandle: HANDLE, in_dwMode: DWORD) callconv(WINAPI) BOOL;
168169
169170pub extern "kernel32" fn GetConsoleOutputCP() callconv(WINAPI) UINT;
170171