1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-16 08:13:29 +00:00

vendor: add github.com/manifoldco/promptui and dependencies

This commit is contained in:
Nick Craig-Wood
2019-09-25 10:12:15 +01:00
parent 28cc2009d4
commit 956fc5062b
211 changed files with 64314 additions and 0 deletions

29
vendor/github.com/chzyer/readline/term_bsd.go generated vendored Normal file
View File

@@ -0,0 +1,29 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd netbsd openbsd
package readline
import (
"syscall"
"unsafe"
)
func getTermios(fd int) (*Termios, error) {
termios := new(Termios)
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCGETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
if err != 0 {
return nil, err
}
return termios, nil
}
func setTermios(fd int, termios *Termios) error {
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCSETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
if err != 0 {
return err
}
return nil
}