mirror of https://github.com/k3d-io/k3d
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
321 B
20 lines
321 B
3 years ago
|
// +build !windows
|
||
|
|
||
|
package term
|
||
|
|
||
|
import (
|
||
|
"golang.org/x/sys/unix"
|
||
|
)
|
||
|
|
||
|
func tcget(fd uintptr) (*Termios, error) {
|
||
|
p, err := unix.IoctlGetTermios(int(fd), getTermios)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return p, nil
|
||
|
}
|
||
|
|
||
|
func tcset(fd uintptr, p *Termios) error {
|
||
|
return unix.IoctlSetTermios(int(fd), setTermios, p)
|
||
|
}
|