mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/creack/pty v1.1.21
full diff: https://github.com/creack/pty/compare/v1.1.18...v1.1.21 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
12
vendor/github.com/creack/pty/winsize_unix.go
generated
vendored
12
vendor/github.com/creack/pty/winsize_unix.go
generated
vendored
@ -11,16 +11,16 @@ import (
|
||||
|
||||
// Winsize describes the terminal size.
|
||||
type Winsize struct {
|
||||
Rows uint16 // ws_row: Number of rows (in cells)
|
||||
Cols uint16 // ws_col: Number of columns (in cells)
|
||||
X uint16 // ws_xpixel: Width in pixels
|
||||
Y uint16 // ws_ypixel: Height in pixels
|
||||
Rows uint16 // ws_row: Number of rows (in cells).
|
||||
Cols uint16 // ws_col: Number of columns (in cells).
|
||||
X uint16 // ws_xpixel: Width in pixels.
|
||||
Y uint16 // ws_ypixel: Height in pixels.
|
||||
}
|
||||
|
||||
// Setsize resizes t to s.
|
||||
func Setsize(t *os.File, ws *Winsize) error {
|
||||
//nolint:gosec // Expected unsafe pointer for Syscall call.
|
||||
return ioctl(t.Fd(), syscall.TIOCSWINSZ, uintptr(unsafe.Pointer(ws)))
|
||||
return ioctl(t, syscall.TIOCSWINSZ, uintptr(unsafe.Pointer(ws)))
|
||||
}
|
||||
|
||||
// GetsizeFull returns the full terminal size description.
|
||||
@ -28,7 +28,7 @@ func GetsizeFull(t *os.File) (size *Winsize, err error) {
|
||||
var ws Winsize
|
||||
|
||||
//nolint:gosec // Expected unsafe pointer for Syscall call.
|
||||
if err := ioctl(t.Fd(), syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&ws))); err != nil {
|
||||
if err := ioctl(t, syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&ws))); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ws, nil
|
||||
|
Reference in New Issue
Block a user