mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
os,term.termios: add termios.set_state/2, state.disable_echo/0, use them in os.input_password, to fix v -os wasm32_emscripten examples/2048/
This commit is contained in:
parent
37e7d5f5ae
commit
32114a679a
13 changed files with 161 additions and 40 deletions
|
@ -47,3 +47,13 @@ pub fn tcsetattr(fd int, optional_actions int, mut termios_p Termios) int {
|
|||
pub fn ioctl(fd int, request u64, arg voidptr) int {
|
||||
return -1
|
||||
}
|
||||
|
||||
// set_state applies the flags in the `new_state` to the descriptor `fd`.
|
||||
pub fn set_state(fd int, new_state Termios) int {
|
||||
return -1
|
||||
}
|
||||
|
||||
// disable_echo disables echoing characters as they are typed,
|
||||
// when that Termios state is later set with termios.set_state(fd,t)
|
||||
pub fn (mut t Termios) disable_echo() {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue