1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: add builtin.init call inside of _vinit

This commit is contained in:
Alexey
2020-04-03 14:27:19 +03:00
committed by GitHub
parent 50b9faf347
commit 6c4de001b8
4 changed files with 12 additions and 9 deletions

View File

@ -58,6 +58,13 @@ const (
SYMOPT_DEBUG = 0x80000000
)
fn init() {
if is_atty(1) > 0 {
C.SetConsoleMode(C.GetStdHandle(C.STD_OUTPUT_HANDLE), C.ENABLE_PROCESSED_OUTPUT | 0x0004) // ENABLE_VIRTUAL_TERMINAL_PROCESSING
C.setbuf(C.stdout, 0)
}
}
fn print_backtrace_skipping_top_frames_msvc(skipframes int) bool {
$if msvc {