Skip to content

Commit 0d2a328

Browse files
KexyBiscuitGarfield550
authored andcommitted
lib/std/os/windows/kernel32: add signature for SetConsoleMode
- 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.
1 parent c085c6e commit 0d2a328

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/std/os/windows.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3733,6 +3733,7 @@ pub const CONSOLE_SCREEN_BUFFER_INFO = extern struct {
37333733
};
37343734

37353735
pub const ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4;
3736+
pub const DISABLE_NEWLINE_AUTO_RETURN = 0x8;
37363737

37373738
pub const FOREGROUND_BLUE = 1;
37383739
pub const FOREGROUND_GREEN = 2;

lib/std/os/windows/kernel32.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ pub extern "kernel32" fn GetCommandLineA() callconv(WINAPI) LPSTR;
165165
pub extern "kernel32" fn GetCommandLineW() callconv(WINAPI) LPWSTR;
166166

167167
pub extern "kernel32" fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: *DWORD) callconv(WINAPI) BOOL;
168+
pub extern "kernel32" fn SetConsoleMode(in_hConsoleHandle: HANDLE, in_dwMode: DWORD) callconv(WINAPI) BOOL;
168169

169170
pub extern "kernel32" fn GetConsoleOutputCP() callconv(WINAPI) UINT;
170171

0 commit comments

Comments
 (0)