mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
C fn definitions on Linux
This commit is contained in:
@ -34,10 +34,15 @@ enum Action {
|
||||
suspend
|
||||
}
|
||||
|
||||
fn C.tcgetattr() int
|
||||
fn C.tcsetattr() int
|
||||
fn C.ioctl() int
|
||||
fn C.raise()
|
||||
|
||||
// Toggle raw mode of the terminal by changing its attributes
|
||||
// Catches SIGUSER (CTRL+C) Signal to reset tty
|
||||
fn (r mut Readline) enable_raw_mode() {
|
||||
if ( C.tcgetattr(0, &r.orig_termios) == -1 ) {
|
||||
if C.tcgetattr(0, &r.orig_termios) == -1 {
|
||||
r.is_tty = false
|
||||
r.is_raw = false
|
||||
return
|
||||
|
Reference in New Issue
Block a user