mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
clipboard: fix v -cstrict -cc gcc vlib/clipboard/clipboard_test.v
This commit is contained in:
parent
4bc9a8f8d8
commit
f54f156d25
7 changed files with 31 additions and 30 deletions
|
@ -554,7 +554,7 @@ pub fn get_raw_line() string {
|
|||
h_input := C.GetStdHandle(C.STD_INPUT_HANDLE)
|
||||
mut bytes_read := u32(0)
|
||||
if is_atty(0) > 0 {
|
||||
x := C.ReadConsole(h_input, buf, max_line_chars * 2, &bytes_read, 0)
|
||||
x := C.ReadConsole(h_input, buf, max_line_chars * 2, voidptr(&bytes_read), 0)
|
||||
if !x {
|
||||
return tos(buf, 0)
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ pub fn get_raw_line() string {
|
|||
mut offset := 0
|
||||
for {
|
||||
pos := buf + offset
|
||||
res := C.ReadFile(h_input, pos, 1, &u32(&bytes_read), 0)
|
||||
res := C.ReadFile(h_input, pos, 1, voidptr(&bytes_read), 0)
|
||||
if !res && offset == 0 {
|
||||
return tos(buf, 0)
|
||||
}
|
||||
|
@ -605,7 +605,7 @@ pub fn get_raw_stdin() []u8 {
|
|||
mut offset := 0
|
||||
for {
|
||||
pos := buf + offset
|
||||
res := C.ReadFile(h_input, pos, block_bytes, &u32(&bytes_read), 0)
|
||||
res := C.ReadFile(h_input, pos, block_bytes, voidptr(&bytes_read), 0)
|
||||
offset += bytes_read
|
||||
if !res {
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue