Added a program init function

This commit is contained in:
Eduard Urbach 2025-02-16 15:46:54 +01:00
parent 0ddaeca844
commit 9da25da525
Signed by: eduard
GPG key ID: 49226B848C78F6C8
11 changed files with 78 additions and 38 deletions

20
lib/core/core_windows.q Normal file
View file

@ -0,0 +1,20 @@
extern kernel32 {
SetConsoleCP(cp UInt)
SetConsoleOutputCP(cp UInt)
ExitProcess(code UInt)
}
const cp {
utf8 65001
}
init() {
kernel32.SetConsoleCP(cp.utf8)
kernel32.SetConsoleOutputCP(cp.utf8)
main.main()
exit()
}
exit() {
kernel32.ExitProcess(0)
}