mirror of
https://github.com/rclone/rclone.git
synced 2024-11-29 03:48:27 +08:00
vendor: update termbox-go to fix ncdu command on FreeBSD
see 58d4fcbce2
This commit is contained in:
parent
e0d41da3e3
commit
3801b8109e
4
go.mod
4
go.mod
|
@ -29,11 +29,11 @@ require (
|
||||||
github.com/mattn/go-colorable v0.1.4
|
github.com/mattn/go-colorable v0.1.4
|
||||||
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect
|
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect
|
||||||
github.com/mattn/go-isatty v0.0.11-0.20191112051248-2a2f0ea997f9 // indirect
|
github.com/mattn/go-isatty v0.0.11-0.20191112051248-2a2f0ea997f9 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.6
|
github.com/mattn/go-runewidth v0.0.7
|
||||||
github.com/mitchellh/go-homedir v1.1.0
|
github.com/mitchellh/go-homedir v1.1.0
|
||||||
github.com/ncw/go-acd v0.0.0-20171120105400-887eb06ab6a2
|
github.com/ncw/go-acd v0.0.0-20171120105400-887eb06ab6a2
|
||||||
github.com/ncw/swift v1.0.49
|
github.com/ncw/swift v1.0.49
|
||||||
github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317
|
github.com/nsf/termbox-go v0.0.0-20191229070316-58d4fcbce2a7
|
||||||
github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd
|
github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd
|
||||||
github.com/onsi/ginkgo v1.9.0 // indirect
|
github.com/onsi/ginkgo v1.9.0 // indirect
|
||||||
github.com/onsi/gomega v1.6.0 // indirect
|
github.com/onsi/gomega v1.6.0 // indirect
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -180,6 +180,8 @@ github.com/mattn/go-isatty v0.0.11-0.20191112051248-2a2f0ea997f9 h1:tM1L+QoyOIq/
|
||||||
github.com/mattn/go-isatty v0.0.11-0.20191112051248-2a2f0ea997f9/go.mod h1:cxQpGCW53krnBJYXw0m6SYdk+OIHR4jbEstSUj/+MQ4=
|
github.com/mattn/go-isatty v0.0.11-0.20191112051248-2a2f0ea997f9/go.mod h1:cxQpGCW53krnBJYXw0m6SYdk+OIHR4jbEstSUj/+MQ4=
|
||||||
github.com/mattn/go-runewidth v0.0.6 h1:V2iyH+aX9C5fsYCpK60U8BYIvmhqxuOL3JZcqc1NB7k=
|
github.com/mattn/go-runewidth v0.0.6 h1:V2iyH+aX9C5fsYCpK60U8BYIvmhqxuOL3JZcqc1NB7k=
|
||||||
github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||||
|
github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54=
|
||||||
|
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
|
@ -191,6 +193,8 @@ github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/
|
||||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
|
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
|
||||||
github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317 h1:hhGN4SFXgXo61Q4Sjj/X9sBjyeSa2kdpaOzCO+8EVQw=
|
github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317 h1:hhGN4SFXgXo61Q4Sjj/X9sBjyeSa2kdpaOzCO+8EVQw=
|
||||||
github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
|
github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
|
||||||
|
github.com/nsf/termbox-go v0.0.0-20191229070316-58d4fcbce2a7 h1:OkWEy7aQeQTbgdrcGi9bifx+Y6bMM7ae7y42hDFaBvA=
|
||||||
|
github.com/nsf/termbox-go v0.0.0-20191229070316-58d4fcbce2a7/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
|
||||||
github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd h1:+iAPaTbi1gZpcpDwe/BW1fx7Xoesv69hLNGPheoyhBs=
|
github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd h1:+iAPaTbi1gZpcpDwe/BW1fx7Xoesv69hLNGPheoyhBs=
|
||||||
github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd/go.mod h1:4soZNh0zW0LtYGdQ416i0jO0EIqMGcbtaspRS4BDvRQ=
|
github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd/go.mod h1:4soZNh0zW0LtYGdQ416i0jO0EIqMGcbtaspRS4BDvRQ=
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
|
|
11
vendor/github.com/mattn/go-runewidth/runewidth.go
generated
vendored
11
vendor/github.com/mattn/go-runewidth/runewidth.go
generated
vendored
|
@ -102,11 +102,9 @@ func NewCondition() *Condition {
|
||||||
// See http://www.unicode.org/reports/tr11/
|
// See http://www.unicode.org/reports/tr11/
|
||||||
func (c *Condition) RuneWidth(r rune) int {
|
func (c *Condition) RuneWidth(r rune) int {
|
||||||
switch {
|
switch {
|
||||||
case r < 0 || r > 0x10FFFF ||
|
case r < 0 || r > 0x10FFFF || inTables(r, nonprint, combining, notassigned):
|
||||||
inTables(r, nonprint, combining, notassigned):
|
|
||||||
return 0
|
return 0
|
||||||
case (c.EastAsianWidth && IsAmbiguousWidth(r)) ||
|
case (c.EastAsianWidth && IsAmbiguousWidth(r)) || inTables(r, doublewidth):
|
||||||
inTables(r, doublewidth, emoji):
|
|
||||||
return 2
|
return 2
|
||||||
default:
|
default:
|
||||||
return 1
|
return 1
|
||||||
|
@ -128,9 +126,12 @@ func (c *Condition) stringWidthZeroJoiner(s string) (width int) {
|
||||||
}
|
}
|
||||||
w := c.RuneWidth(r)
|
w := c.RuneWidth(r)
|
||||||
if r2 == 0x200D && inTables(r, emoji) && inTables(r1, emoji) {
|
if r2 == 0x200D && inTables(r, emoji) && inTables(r1, emoji) {
|
||||||
w = 0
|
if width < w {
|
||||||
|
width = w
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
width += w
|
width += w
|
||||||
|
}
|
||||||
r1, r2 = r2, r
|
r1, r2 = r2, r
|
||||||
}
|
}
|
||||||
return width
|
return width
|
||||||
|
|
19
vendor/github.com/nsf/termbox-go/api.go
generated
vendored
19
vendor/github.com/nsf/termbox-go/api.go
generated
vendored
|
@ -2,13 +2,16 @@
|
||||||
|
|
||||||
package termbox
|
package termbox
|
||||||
|
|
||||||
import "github.com/mattn/go-runewidth"
|
import (
|
||||||
import "fmt"
|
"fmt"
|
||||||
import "os"
|
"os"
|
||||||
import "os/signal"
|
"os/signal"
|
||||||
import "syscall"
|
"runtime"
|
||||||
import "runtime"
|
"syscall"
|
||||||
import "time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/mattn/go-runewidth"
|
||||||
|
)
|
||||||
|
|
||||||
// public API
|
// public API
|
||||||
|
|
||||||
|
@ -24,7 +27,7 @@ import "time"
|
||||||
func Init() error {
|
func Init() error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
if runtime.GOOS == "openbsd" {
|
if runtime.GOOS == "openbsd" || runtime.GOOS == "freebsd" {
|
||||||
out, err = os.OpenFile("/dev/tty", os.O_RDWR, 0)
|
out, err = os.OpenFile("/dev/tty", os.O_RDWR, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
|
@ -120,7 +120,7 @@ github.com/mattn/go-colorable
|
||||||
github.com/mattn/go-ieproxy
|
github.com/mattn/go-ieproxy
|
||||||
# github.com/mattn/go-isatty v0.0.11-0.20191112051248-2a2f0ea997f9
|
# github.com/mattn/go-isatty v0.0.11-0.20191112051248-2a2f0ea997f9
|
||||||
github.com/mattn/go-isatty
|
github.com/mattn/go-isatty
|
||||||
# github.com/mattn/go-runewidth v0.0.6
|
# github.com/mattn/go-runewidth v0.0.7
|
||||||
github.com/mattn/go-runewidth
|
github.com/mattn/go-runewidth
|
||||||
# github.com/mitchellh/go-homedir v1.1.0
|
# github.com/mitchellh/go-homedir v1.1.0
|
||||||
github.com/mitchellh/go-homedir
|
github.com/mitchellh/go-homedir
|
||||||
|
@ -128,7 +128,7 @@ github.com/mitchellh/go-homedir
|
||||||
github.com/ncw/go-acd
|
github.com/ncw/go-acd
|
||||||
# github.com/ncw/swift v1.0.49
|
# github.com/ncw/swift v1.0.49
|
||||||
github.com/ncw/swift
|
github.com/ncw/swift
|
||||||
# github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317
|
# github.com/nsf/termbox-go v0.0.0-20191229070316-58d4fcbce2a7
|
||||||
github.com/nsf/termbox-go
|
github.com/nsf/termbox-go
|
||||||
# github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd
|
# github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd
|
||||||
github.com/okzk/sdnotify
|
github.com/okzk/sdnotify
|
||||||
|
|
Loading…
Reference in New Issue
Block a user