mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix windows build
This commit is contained in:
parent
74bdc57fad
commit
1cfe44d9c6
@ -380,6 +380,7 @@ pub fn (a []int) str() string {
|
||||
for i in 0..a.len {
|
||||
val := a[i].str()
|
||||
sb.write(val)
|
||||
//println('"$val"')
|
||||
val.free()
|
||||
if i < a.len - 1 {
|
||||
sb.write(', ')
|
||||
|
@ -21,6 +21,8 @@ fn C.GetConsoleScreenBufferInfo(handle os.HANDLE, info &CONSOLE_SCREEN_BUFFER_IN
|
||||
|
||||
// get_terminal_size returns a number of colums and rows of terminal window.
|
||||
pub fn get_terminal_size() (int, int) {
|
||||
return 80, 40 // QTODO
|
||||
/*
|
||||
if is_atty(1) > 0 && os.getenv('TERM') != 'dumb' {
|
||||
info := CONSOLE_SCREEN_BUFFER_INFO{}
|
||||
|
||||
@ -32,4 +34,5 @@ pub fn get_terminal_size() (int, int) {
|
||||
}
|
||||
|
||||
return default_columns_size, default_rows_size
|
||||
*/
|
||||
}
|
||||
|
@ -789,7 +789,11 @@ fn (g mut Gen) gen_fn_decl(it ast.FnDecl) {
|
||||
if g.autofree {
|
||||
g.writeln('free(_const_os__args.data); // empty, inited in _vinit()')
|
||||
}
|
||||
g.writeln('_const_os__args = os__init_os_args(argc, (byteptr*)argv);')
|
||||
$if windows {
|
||||
g.writeln('_const_os__args = os__init_os_args(argc, (byteptr*)argv);')
|
||||
} $else {
|
||||
g.writeln('_const_os__args = os__init_os_args_wide(argc, (byteptr*)argv);')
|
||||
}
|
||||
}
|
||||
}
|
||||
g.stmts(it.stmts)
|
||||
|
Loading…
Reference in New Issue
Block a user