mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +02:00
various changes to improve integration tests
This commit is contained in:
parent
7b757d1cfe
commit
7af7af27c6
8
go.mod
8
go.mod
@ -11,14 +11,14 @@ require (
|
||||
github.com/creack/pty v1.1.11
|
||||
github.com/fsmiamoto/git-todo-parser v0.0.2
|
||||
github.com/fsnotify/fsnotify v1.4.7
|
||||
github.com/gdamore/tcell/v2 v2.5.2
|
||||
github.com/gdamore/tcell/v2 v2.5.3
|
||||
github.com/go-errors/errors v1.4.2
|
||||
github.com/gookit/color v1.4.2
|
||||
github.com/imdario/mergo v0.3.11
|
||||
github.com/integrii/flaggy v1.4.0
|
||||
github.com/jesseduffield/generics v0.0.0-20220320043834-727e535cbe68
|
||||
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20220815095708-156fda5e0419
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20220916034937-22d48fda22d6
|
||||
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10
|
||||
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
|
||||
github.com/jesseduffield/yaml v2.1.0+incompatible
|
||||
@ -61,13 +61,13 @@ require (
|
||||
github.com/onsi/ginkgo v1.10.3 // indirect
|
||||
github.com/onsi/gomega v1.7.1 // indirect
|
||||
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
|
||||
github.com/rivo/uniseg v0.3.4 // indirect
|
||||
github.com/rivo/uniseg v0.4.2 // indirect
|
||||
github.com/sergi/go-diff v1.1.0 // indirect
|
||||
github.com/xanzy/ssh-agent v0.2.1 // indirect
|
||||
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect
|
||||
golang.org/x/exp v0.0.0-20220318154914-8dddf5d87bd8 // indirect
|
||||
golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
|
16
go.sum
16
go.sum
@ -35,8 +35,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
|
||||
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
|
||||
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
|
||||
github.com/gdamore/tcell/v2 v2.4.0/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU=
|
||||
github.com/gdamore/tcell/v2 v2.5.2 h1:tKzG29kO9p2V++3oBY2W9zUjYu7IK1MENFeY/BzJSVY=
|
||||
github.com/gdamore/tcell/v2 v2.5.2/go.mod h1:wSkrPaXoiIWZqW/g7Px4xc79di6FTcpB8tvaKJ6uGBo=
|
||||
github.com/gdamore/tcell/v2 v2.5.3 h1:b9XQrT6QGbgI7JvZOJXFNczOQeIYbo8BfeSMzt2sAV0=
|
||||
github.com/gdamore/tcell/v2 v2.5.3/go.mod h1:wSkrPaXoiIWZqW/g7Px4xc79di6FTcpB8tvaKJ6uGBo=
|
||||
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
|
||||
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
|
||||
github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||
@ -72,8 +72,8 @@ github.com/jesseduffield/generics v0.0.0-20220320043834-727e535cbe68 h1:EQP2Tv8T
|
||||
github.com/jesseduffield/generics v0.0.0-20220320043834-727e535cbe68/go.mod h1:+LLj9/WUPAP8LqCchs7P+7X0R98HiFujVFANdNaxhGk=
|
||||
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4 h1:GOQrmaE8i+KEdB8NzAegKYd4tPn/inM0I1uo0NXFerg=
|
||||
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4/go.mod h1:nGNEErzf+NRznT+N2SWqmHnDnF9aLgANB1CUNEan09o=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20220815095708-156fda5e0419 h1:p3Ix7RUcy4X16Lk5jTSfTxecJT7ryqYHclfRbo/Svzs=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20220815095708-156fda5e0419/go.mod h1:znJuCDnF2Ph40YZSlBwdX/4GEofnIoWLGdT4mK5zRAU=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20220916034937-22d48fda22d6 h1:FgxhH7++BaLcDwldyNtxkeVUC2z7ur2QYtJ8Msgkgc0=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20220916034937-22d48fda22d6/go.mod h1:znJuCDnF2Ph40YZSlBwdX/4GEofnIoWLGdT4mK5zRAU=
|
||||
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10 h1:jmpr7KpX2+2GRiE91zTgfq49QvgiqB0nbmlwZ8UnOx0=
|
||||
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10/go.mod h1:aA97kHeNA+sj2Hbki0pvLslmE4CbDyhBeSSTUUnOuVo=
|
||||
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e h1:uw/oo+kg7t/oeMs6sqlAwr85ND/9cpO3up3VxphxY0U=
|
||||
@ -134,8 +134,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw=
|
||||
github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8=
|
||||
github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI=
|
||||
github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
|
||||
github.com/samber/lo v1.10.1 h1:0D3h7i0U3hRAbaCeQ82DLe67n0A7Bbl0/cEoWqFGp+U=
|
||||
@ -194,8 +194,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 h1:ohgcoMbSofXygzo6AD2I1kz3BFmW1QArPYTtwEM3UXc=
|
||||
golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc=
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
|
@ -494,8 +494,6 @@ func (gui *Gui) Run(startArgs appTypes.StartArgs) error {
|
||||
})
|
||||
deadlock.Opts.Disable = !gui.Debug
|
||||
|
||||
gui.handleTestMode(startArgs.IntegrationTest)
|
||||
|
||||
gui.g.OnSearchEscape = gui.onSearchEscape
|
||||
if err := gui.Config.ReloadUserConfig(); err != nil {
|
||||
return nil
|
||||
@ -552,6 +550,8 @@ func (gui *Gui) Run(startArgs appTypes.StartArgs) error {
|
||||
|
||||
gui.c.Log.Info("starting main loop")
|
||||
|
||||
gui.handleTestMode(startArgs.IntegrationTest)
|
||||
|
||||
return gui.g.MainLoop()
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,8 @@ package clients
|
||||
// for an example
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@ -39,6 +41,7 @@ func TestIntegration(t *testing.T) {
|
||||
}
|
||||
|
||||
t.Run(test.Name(), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
err := f()
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
@ -57,12 +60,26 @@ func runCmdHeadless(cmd *exec.Cmd) error {
|
||||
"TERM=xterm",
|
||||
)
|
||||
|
||||
f, err := pty.StartWithSize(cmd, &pty.Winsize{Rows: 100, Cols: 100})
|
||||
// not writing stderr to the pty because we want to capture a panic if
|
||||
// there is one. But some commands will not be in tty mode if stderr is
|
||||
// not a terminal. We'll need to keep an eye out for that.
|
||||
stderr := new(bytes.Buffer)
|
||||
cmd.Stderr = stderr
|
||||
|
||||
// these rows and columns are ignored because internally we use tcell's
|
||||
// simulation screen. However we still need the pty for the sake of
|
||||
// running other commands in a pty.
|
||||
f, err := pty.StartWithSize(cmd, &pty.Winsize{Rows: 300, Cols: 300})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, _ = io.Copy(ioutil.Discard, f)
|
||||
|
||||
if cmd.Wait() != nil {
|
||||
// return an error with the stderr output
|
||||
return errors.New(stderr.String())
|
||||
}
|
||||
|
||||
return f.Close()
|
||||
}
|
||||
|
@ -111,6 +111,13 @@ func (self *Assert) CurrentViewName(expectedViewName string) {
|
||||
})
|
||||
}
|
||||
|
||||
func (self *Assert) CurrentWindowName(expectedWindowName string) {
|
||||
self.assertWithRetries(func() (bool, string) {
|
||||
actual := self.gui.CurrentContext().GetView().Name()
|
||||
return actual == expectedWindowName, fmt.Sprintf("Expected current window name to be '%s', but got '%s'", expectedWindowName, actual)
|
||||
})
|
||||
}
|
||||
|
||||
func (self *Assert) CurrentBranchName(expectedViewName string) {
|
||||
self.assertWithRetries(func() (bool, string) {
|
||||
actual := self.gui.CheckedOutRef().Name
|
||||
@ -210,7 +217,7 @@ func (self *Assert) matchString(matcher *matcher, context string, getValue func(
|
||||
}
|
||||
|
||||
func (self *Assert) assertWithRetries(test func() (bool, string)) {
|
||||
waitTimes := []int{0, 1, 5, 10, 200, 500, 1000}
|
||||
waitTimes := []int{0, 1, 5, 10, 200, 500, 1000, 2000}
|
||||
|
||||
var message string
|
||||
for _, waitTime := range waitTimes {
|
||||
|
@ -42,22 +42,27 @@ func (self *Input) pressKey(keyStr string) {
|
||||
|
||||
func (self *Input) SwitchToStatusWindow() {
|
||||
self.pressKey(self.keys.Universal.JumpToBlock[0])
|
||||
self.assert.CurrentWindowName("status")
|
||||
}
|
||||
|
||||
func (self *Input) SwitchToFilesWindow() {
|
||||
self.pressKey(self.keys.Universal.JumpToBlock[1])
|
||||
self.assert.CurrentWindowName("files")
|
||||
}
|
||||
|
||||
func (self *Input) SwitchToBranchesWindow() {
|
||||
self.pressKey(self.keys.Universal.JumpToBlock[2])
|
||||
self.assert.CurrentWindowName("localBranches")
|
||||
}
|
||||
|
||||
func (self *Input) SwitchToCommitsWindow() {
|
||||
self.pressKey(self.keys.Universal.JumpToBlock[3])
|
||||
self.assert.CurrentWindowName("commits")
|
||||
}
|
||||
|
||||
func (self *Input) SwitchToStashWindow() {
|
||||
self.pressKey(self.keys.Universal.JumpToBlock[4])
|
||||
self.assert.CurrentWindowName("stash")
|
||||
}
|
||||
|
||||
func (self *Input) Type(content string) {
|
||||
@ -132,38 +137,43 @@ func (self *Input) NavigateToListItemContainingText(text string) {
|
||||
|
||||
view := currentContext.GetView()
|
||||
|
||||
// first we look for a duplicate on the current screen. We won't bother looking beyond that though.
|
||||
matchCount := 0
|
||||
matchIndex := -1
|
||||
for i, line := range view.ViewBufferLines() {
|
||||
if strings.Contains(line, text) {
|
||||
matchCount++
|
||||
matchIndex = i
|
||||
}
|
||||
}
|
||||
if matchCount > 1 {
|
||||
self.assert.Fail(fmt.Sprintf("Found %d matches for %s, expected only a single match", matchCount, text))
|
||||
}
|
||||
if matchCount == 1 {
|
||||
selectedLineIdx := view.SelectedLineIdx()
|
||||
if selectedLineIdx == matchIndex {
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
return
|
||||
}
|
||||
if selectedLineIdx < matchIndex {
|
||||
for i := selectedLineIdx; i < matchIndex; i++ {
|
||||
self.NextItem()
|
||||
}
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
return
|
||||
} else {
|
||||
for i := selectedLineIdx; i > matchIndex; i-- {
|
||||
self.PreviousItem()
|
||||
}
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
return
|
||||
}
|
||||
}
|
||||
var matchIndex int
|
||||
|
||||
self.assert.Fail(fmt.Sprintf("Could not find item containing text: %s", text))
|
||||
self.assert.assertWithRetries(func() (bool, string) {
|
||||
matchCount := 0
|
||||
matchIndex = -1
|
||||
// first we look for a duplicate on the current screen. We won't bother looking beyond that though.
|
||||
for i, line := range view.ViewBufferLines() {
|
||||
if strings.Contains(line, text) {
|
||||
matchCount++
|
||||
matchIndex = i
|
||||
}
|
||||
}
|
||||
if matchCount > 1 {
|
||||
return false, fmt.Sprintf("Found %d matches for %s, expected only a single match", matchCount, text)
|
||||
} else if matchCount == 0 {
|
||||
return false, fmt.Sprintf("Could not find item containing text: %s", text)
|
||||
} else {
|
||||
return true, ""
|
||||
}
|
||||
})
|
||||
|
||||
selectedLineIdx := view.SelectedLineIdx()
|
||||
if selectedLineIdx == matchIndex {
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
return
|
||||
}
|
||||
if selectedLineIdx < matchIndex {
|
||||
for i := selectedLineIdx; i < matchIndex; i++ {
|
||||
self.NextItem()
|
||||
}
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
return
|
||||
} else {
|
||||
for i := selectedLineIdx; i > matchIndex; i-- {
|
||||
self.PreviousItem()
|
||||
}
|
||||
self.assert.MatchSelectedLine(Contains(text))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -58,11 +58,11 @@ func RunTests(
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
|
||||
paths := NewPaths(
|
||||
filepath.Join(testDir, test.Name()),
|
||||
)
|
||||
|
||||
testWrapper(test, func() error { //nolint: thelper
|
||||
paths := NewPaths(
|
||||
filepath.Join(testDir, test.Name()),
|
||||
)
|
||||
|
||||
return runTest(test, paths, projectRootDir, logf, runCmd, mode, keyPressDelay)
|
||||
})
|
||||
}
|
||||
@ -126,16 +126,7 @@ func buildLazygit() error {
|
||||
}
|
||||
|
||||
func createFixture(test *IntegrationTest, paths Paths) error {
|
||||
originalDir, err := os.Getwd()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.Chdir(paths.ActualRepo()); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
shell := NewShell()
|
||||
shell := NewShell(paths.ActualRepo())
|
||||
shell.RunCommand("git init -b master")
|
||||
shell.RunCommand(`git config user.email "CI@example.com"`)
|
||||
shell.RunCommand(`git config user.name "CI"`)
|
||||
@ -143,10 +134,6 @@ func createFixture(test *IntegrationTest, paths Paths) error {
|
||||
|
||||
test.SetupRepo(shell)
|
||||
|
||||
if err := os.Chdir(originalDir); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/secureexec"
|
||||
"github.com/mgutz/str"
|
||||
@ -12,16 +13,20 @@ import (
|
||||
// this is for running shell commands, mostly for the sake of setting up the repo
|
||||
// but you can also run the commands from within lazygit to emulate things happening
|
||||
// in the background.
|
||||
type Shell struct{}
|
||||
type Shell struct {
|
||||
// working directory the shell is invoked in
|
||||
dir string
|
||||
}
|
||||
|
||||
func NewShell() *Shell {
|
||||
return &Shell{}
|
||||
func NewShell(dir string) *Shell {
|
||||
return &Shell{dir: dir}
|
||||
}
|
||||
|
||||
func (s *Shell) RunCommand(cmdStr string) *Shell {
|
||||
args := str.ToArgv(cmdStr)
|
||||
cmd := secureexec.Command(args[0], args[1:]...)
|
||||
cmd.Env = os.Environ()
|
||||
cmd.Dir = s.dir
|
||||
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
@ -32,18 +37,20 @@ func (s *Shell) RunCommand(cmdStr string) *Shell {
|
||||
}
|
||||
|
||||
func (s *Shell) CreateFile(path string, content string) *Shell {
|
||||
err := ioutil.WriteFile(path, []byte(content), 0o644)
|
||||
fullPath := filepath.Join(s.dir, path)
|
||||
err := ioutil.WriteFile(fullPath, []byte(content), 0o644)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("error creating file: %s\n%s", path, err))
|
||||
panic(fmt.Sprintf("error creating file: %s\n%s", fullPath, err))
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *Shell) UpdateFile(path string, content string) *Shell {
|
||||
err := ioutil.WriteFile(path, []byte(content), 0o644)
|
||||
fullPath := filepath.Join(s.dir, path)
|
||||
err := ioutil.WriteFile(fullPath, []byte(content), 0o644)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("error updating file: %s\n%s", path, err))
|
||||
panic(fmt.Sprintf("error updating file: %s\n%s", fullPath, err))
|
||||
}
|
||||
|
||||
return s
|
||||
|
@ -174,7 +174,7 @@ func (self *Snapshotter) compareSnapshots() error {
|
||||
}
|
||||
self.logf("%s", string(bytes))
|
||||
|
||||
return errors.New(getDiff(f.Name(), actualRepo, expectedRepo))
|
||||
return errors.New(getDiff(f.Name(), expectedRepo, actualRepo))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ func (self *IntegrationTest) SetupRepo(shell *Shell) {
|
||||
|
||||
// I want access to all contexts, the model, the ability to press a key, the ability to log,
|
||||
func (self *IntegrationTest) Run(gui integrationTypes.GuiDriver) {
|
||||
shell := NewShell()
|
||||
shell := NewShell("/tmp/lazygit-test")
|
||||
assert := NewAssert(gui)
|
||||
keys := gui.Keys()
|
||||
input := NewInput(gui, keys, assert, KeyPressDelay())
|
||||
|
@ -56,6 +56,10 @@ func (self *fakeGuiDriver) SecondaryView() *gocui.View {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *fakeGuiDriver) View(viewName string) *gocui.View {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestAssertionFailure(t *testing.T) {
|
||||
test := NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: unitTestDescription,
|
||||
|
@ -4,6 +4,8 @@
|
||||
package deprecated
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@ -95,12 +97,26 @@ func runCmdHeadless(cmd *exec.Cmd) error {
|
||||
"TERM=xterm",
|
||||
)
|
||||
|
||||
f, err := pty.StartWithSize(cmd, &pty.Winsize{Rows: 100, Cols: 100})
|
||||
// not writing stderr to the pty because we want to capture a panic if
|
||||
// there is one. But some commands will not be in tty mode if stderr is
|
||||
// not a terminal. We'll need to keep an eye out for that.
|
||||
stderr := new(bytes.Buffer)
|
||||
cmd.Stderr = stderr
|
||||
|
||||
// these rows and columns are ignored because internally we use tcell's
|
||||
// simulation screen. However we still need the pty for the sake of
|
||||
// running other commands in a pty.
|
||||
f, err := pty.StartWithSize(cmd, &pty.Winsize{Rows: 300, Cols: 300})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, _ = io.Copy(ioutil.Discard, f)
|
||||
|
||||
if cmd.Wait() != nil {
|
||||
// return an error with the stderr output
|
||||
return errors.New(stderr.String())
|
||||
}
|
||||
|
||||
return f.Close()
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ func getTestSpeeds(testStartSpeed float64, mode Mode, speedStr string) []float64
|
||||
if startSpeed > 5 {
|
||||
speeds = append(speeds, 5)
|
||||
}
|
||||
speeds = append(speeds, 1, 1)
|
||||
speeds = append(speeds, 1, 0.5)
|
||||
|
||||
return speeds
|
||||
}
|
||||
|
@ -84,9 +84,11 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert.CurrentViewName("mergeConflicts")
|
||||
input.PrimaryAction()
|
||||
|
||||
assert.MatchViewContent("information", Contains("rebasing"))
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
|
||||
input.Confirm()
|
||||
assert.MatchViewContent("information", NotContains("rebasing"))
|
||||
|
||||
// this proves we actually have integrated the changes from second-change-branch
|
||||
assert.MatchViewContent("commits", Contains("second-change-branch unrelated change"))
|
||||
|
@ -13,7 +13,7 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupRepo: func(shell *Shell) {
|
||||
commonRebaseSetup(shell)
|
||||
// addin a couple additional commits so that we can drop one
|
||||
shell.EmptyCommit("to drop")
|
||||
shell.EmptyCommit("to remove")
|
||||
shell.EmptyCommit("to keep")
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
|
||||
@ -29,6 +29,8 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert.MatchCurrentViewContent(Contains("Are you sure you want to rebase 'first-change-branch' onto 'second-change-branch'?"))
|
||||
input.Confirm()
|
||||
|
||||
assert.MatchViewContent("information", Contains("rebasing"))
|
||||
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("Conflicts!"))
|
||||
input.Confirm()
|
||||
@ -37,9 +39,10 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert.MatchSelectedLine(Contains("file"))
|
||||
|
||||
input.SwitchToCommitsWindow()
|
||||
assert.MatchSelectedLine(Contains("pick")) // this means it's a rebasing commit
|
||||
input.NextItem()
|
||||
input.PressKeys(keys.Universal.Remove)
|
||||
assert.MatchSelectedLine(Contains("to drop"))
|
||||
assert.MatchSelectedLine(Contains("to remove"))
|
||||
assert.MatchSelectedLine(Contains("drop"))
|
||||
|
||||
input.SwitchToFilesWindow()
|
||||
@ -55,9 +58,11 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
|
||||
input.Confirm()
|
||||
|
||||
assert.MatchViewContent("information", NotContains("rebasing"))
|
||||
|
||||
// this proves we actually have integrated the changes from second-change-branch
|
||||
assert.MatchViewContent("commits", Contains("second-change-branch unrelated change"))
|
||||
assert.MatchViewContent("commits", Contains("to keep"))
|
||||
assert.MatchViewContent("commits", NotContains("to drop"))
|
||||
assert.MatchViewContent("commits", NotContains("to remove"))
|
||||
},
|
||||
})
|
||||
|
9
vendor/github.com/gdamore/tcell/v2/README.md
generated
vendored
9
vendor/github.com/gdamore/tcell/v2/README.md
generated
vendored
@ -1,16 +1,11 @@
|
||||
<a href="https://stand-with-ukraine.pp.ua">
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/d/d2/Flag_of_Ukraine.png" height="20px" width="100%"/>
|
||||
</a>
|
||||
|
||||
<img src="logos/tcell.png" style="float: right"/>
|
||||
|
||||
Please see [here](UKRAINE.md) for an important message for the people of Russia.
|
||||
|
||||
# Tcell
|
||||
|
||||
_Tcell_ is a _Go_ package that provides a cell based view for text terminals, like _XTerm_.
|
||||
It was inspired by _termbox_, but includes many additional improvements.
|
||||
|
||||
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
|
||||
[![Linux](https://img.shields.io/github/workflow/status/gdamore/tcell/linux?logoColor=grey&logo=linux&label=)](https://github.com/gdamore/tcell/actions/workflows/linux.yml)
|
||||
[![Windows](https://img.shields.io/github/workflow/status/gdamore/tcell/windows?logoColor=grey&logo=windows&label=)](https://github.com/gdamore/tcell/actions/workflows/windows.yml)
|
||||
[![Apache License](https://img.shields.io/github/license/gdamore/tcell.svg?logoColor=silver&logo=opensourceinitiative&color=blue&label=)](https://github.com/gdamore/tcell/blob/master/LICENSE)
|
||||
@ -18,6 +13,8 @@ It was inspired by _termbox_, but includes many additional improvements.
|
||||
[![Discord](https://img.shields.io/discord/639503822733180969?label=&logo=discord)](https://discord.gg/urTTxDN)
|
||||
[![Coverage](https://img.shields.io/codecov/c/github/gdamore/tcell?logoColor=grey&logo=codecov&label=)](https://codecov.io/gh/gdamore/tcell)
|
||||
|
||||
Please see [here](UKRAINE.md) for an important message for the people of Russia.
|
||||
|
||||
NOTE: This is version 2 of _Tcell_. There are breaking changes relative to version 1.
|
||||
Version 1.x remains available using the import `github.com/gdamore/tcell`.
|
||||
|
||||
|
19
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
19
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
@ -206,6 +206,16 @@ func NewGui(mode OutputMode, supportOverlaps bool, playMode PlayMode, headless b
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if headless || runtime.GOOS == "windows" {
|
||||
g.maxX, g.maxY = g.screen.Size()
|
||||
} else {
|
||||
// TODO: find out if we actually need this bespoke logic for linux
|
||||
g.maxX, g.maxY, err = g.getTermWindowSize()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
g.outputMode = mode
|
||||
|
||||
g.stop = make(chan struct{})
|
||||
@ -225,15 +235,6 @@ func NewGui(mode OutputMode, supportOverlaps bool, playMode PlayMode, headless b
|
||||
}
|
||||
}
|
||||
|
||||
if runtime.GOOS != "windows" {
|
||||
g.maxX, g.maxY, err = g.getTermWindowSize()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
g.maxX, g.maxY = Screen.Size()
|
||||
}
|
||||
|
||||
g.BgColor, g.FgColor, g.FrameColor = ColorDefault, ColorDefault, ColorDefault
|
||||
g.SelBgColor, g.SelFgColor, g.SelFrameColor = ColorDefault, ColorDefault, ColorDefault
|
||||
|
||||
|
4
vendor/github.com/jesseduffield/gocui/tcell_driver.go
generated
vendored
4
vendor/github.com/jesseduffield/gocui/tcell_driver.go
generated
vendored
@ -84,6 +84,10 @@ func (g *Gui) tcellInitSimulation() error {
|
||||
} else {
|
||||
g.screen = s
|
||||
Screen = s
|
||||
// setting to a larger value than the typical terminal size
|
||||
// so that during a test we're more likely to see an item to select in a view.
|
||||
s.SetSize(100, 100)
|
||||
s.Sync()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
3
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
3
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
@ -1245,6 +1245,9 @@ func (v *View) SelectedLineIdx() int {
|
||||
|
||||
// expected to only be used in tests
|
||||
func (v *View) SelectedLine() string {
|
||||
if len(v.lines) == 0 {
|
||||
return ""
|
||||
}
|
||||
line := v.lines[v.SelectedLineIdx()]
|
||||
str := lineType(line).String()
|
||||
return strings.Replace(str, "\x00", " ", -1)
|
||||
|
16
vendor/github.com/rivo/uniseg/README.md
generated
vendored
16
vendor/github.com/rivo/uniseg/README.md
generated
vendored
@ -3,13 +3,13 @@
|
||||
[![Go Reference](https://pkg.go.dev/badge/github.com/rivo/uniseg.svg)](https://pkg.go.dev/github.com/rivo/uniseg)
|
||||
[![Go Report](https://img.shields.io/badge/go%20report-A%2B-brightgreen.svg)](https://goreportcard.com/report/github.com/rivo/uniseg)
|
||||
|
||||
This Go package implements Unicode Text Segmentation according to [Unicode Standard Annex #29](https://unicode.org/reports/tr29/) and Unicode Line Breaking according to [Unicode Standard Annex #14](https://unicode.org/reports/tr14/) (Unicode version 14.0.0).
|
||||
This Go package implements Unicode Text Segmentation according to [Unicode Standard Annex #29](https://unicode.org/reports/tr29/), Unicode Line Breaking according to [Unicode Standard Annex #14](https://unicode.org/reports/tr14/) (Unicode version 14.0.0), and monospace font string width calculation similar to [wcwidth](https://man7.org/linux/man-pages/man3/wcwidth.3.html).
|
||||
|
||||
## Background
|
||||
|
||||
### Grapheme Clusters
|
||||
|
||||
In Go, [strings are read-only slices of bytes](https://blog.golang.org/strings). They can be turned into Unicode code points using the `for` loop or by casting: `[]rune(str)`. However, multiple code points may be combined into one user-perceived character or what the Unicode specification calls "grapheme cluster". Here are some examples:
|
||||
In Go, [strings are read-only slices of bytes](https://go.dev/blog/strings). They can be turned into Unicode code points using the `for` loop or by casting: `[]rune(str)`. However, multiple code points may be combined into one user-perceived character or what the Unicode specification calls "grapheme cluster". Here are some examples:
|
||||
|
||||
|String|Bytes (UTF-8)|Code points (runes)|Grapheme clusters|
|
||||
|-|-|-|-|
|
||||
@ -31,6 +31,10 @@ Sentence boundaries are often used for triple-click or some other method of sele
|
||||
|
||||
Line breaking, also known as word wrapping, is the process of breaking a section of text into lines such that it will fit in the available width of a page, window or other display area. This package provides tools to determine where a string may or may not be broken and where it must be broken (for example after newline characters).
|
||||
|
||||
### Monospace Width
|
||||
|
||||
Most terminals or text displays / text editors using a monospace font (for example source code editors) use a fixed width for each character. Some characters such as emojis or characters found in Asian and other languages may take up more than one character cell. This package provides tools to determine the number of cells a string will take up when displayed in a monospace font. See [here](https://pkg.go.dev/github.com/rivo/uniseg#hdr-Monospace_Width) for more information.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
@ -47,6 +51,14 @@ fmt.Println(n)
|
||||
// 2
|
||||
```
|
||||
|
||||
### Calculating the Monospace String Width
|
||||
|
||||
```go
|
||||
width := uniseg.StringWidth("🇩🇪🏳️🌈!")
|
||||
fmt.Println(width)
|
||||
// 5
|
||||
```
|
||||
|
||||
### Using the [`Graphemes`](https://pkg.go.dev/github.com/rivo/uniseg#Graphemes) Class
|
||||
|
||||
This is the most convenient method of iterating over grapheme clusters:
|
||||
|
77
vendor/github.com/rivo/uniseg/doc.go
generated
vendored
77
vendor/github.com/rivo/uniseg/doc.go
generated
vendored
@ -1,8 +1,9 @@
|
||||
/*
|
||||
Package uniseg implements Unicode Text Segmentation and Unicode Line Breaking.
|
||||
Unicode Text Segmentation conforms to Unicode Standard Annex #29
|
||||
(https://unicode.org/reports/tr29/) and Unicode Line Breaking conforms to
|
||||
Unicode Standard Annex #14 (https://unicode.org/reports/tr14/).
|
||||
Package uniseg implements Unicode Text Segmentation, Unicode Line Breaking, and
|
||||
string width calculation for monospace fonts. Unicode Text Segmentation conforms
|
||||
to Unicode Standard Annex #29 (https://unicode.org/reports/tr29/) and Unicode
|
||||
Line Breaking conforms to Unicode Standard Annex #14
|
||||
(https://unicode.org/reports/tr14/).
|
||||
|
||||
In short, using this package, you can split a string into grapheme clusters
|
||||
(what people would usually refer to as a "character"), into words, and into
|
||||
@ -12,8 +13,23 @@ as emojis, combining characters, or characters from Asian, Arabic, Hebrew, or
|
||||
other languages. Additionally, you can use it to implement line breaking (or
|
||||
"word wrapping"), that is, to determine where text can be broken over to the
|
||||
next line when the width of the line is not big enough to fit the entire text.
|
||||
Finally, you can use it to calculate the display width of a string for monospace
|
||||
fonts.
|
||||
|
||||
Grapheme Clusters
|
||||
# Getting Started
|
||||
|
||||
If you just want to count the number of characters in a string, you can use
|
||||
[GraphemeClusterCount]. If you want to determine the display width of a string,
|
||||
you can use [StringWidth]. If you want to iterate over a string, you can use
|
||||
[Step], [StepString], or the [Graphemes] class (more convenient but less
|
||||
performant). This will provide you with all information: grapheme clusters,
|
||||
word boundaries, sentence boundaries, line breaks, and monospace character
|
||||
widths. The specialized functions [FirstGraphemeCluster],
|
||||
[FirstGraphemeClusterInString], [FirstWord], [FirstWordInString],
|
||||
[FirstSentence], and [FirstSentenceInString] can be used if only one type of
|
||||
information is needed.
|
||||
|
||||
# Grapheme Clusters
|
||||
|
||||
Consider the rainbow flag emoji: 🏳️🌈. On most modern systems, it appears as one
|
||||
character. But its string representation actually has 14 bytes, so counting
|
||||
@ -21,11 +37,11 @@ bytes (or using len("🏳️🌈")) will not work as expected. Counting runes
|
||||
either: The flag has 4 Unicode code points, thus 4 runes. The stdlib function
|
||||
utf8.RuneCountInString("🏳️🌈") and len([]rune("🏳️🌈")) will both return 4.
|
||||
|
||||
The uniseg.GraphemeClusterCount(str) function will return 1 for the rainbow flag
|
||||
emoji. The Graphemes class and a variety of functions in this package will allow
|
||||
you to split strings into its grapheme clusters.
|
||||
The [GraphemeClusterCount] function will return 1 for the rainbow flag emoji.
|
||||
The Graphemes class and a variety of functions in this package will allow you to
|
||||
split strings into its grapheme clusters.
|
||||
|
||||
Word Boundaries
|
||||
# Word Boundaries
|
||||
|
||||
Word boundaries are used in a number of different contexts. The most familiar
|
||||
ones are selection (double-click mouse selection), cursor movement ("move to
|
||||
@ -33,7 +49,7 @@ next word" control-arrow keys), and the dialog option "Whole Word Search" for
|
||||
search and replace. This package provides methods for determining word
|
||||
boundaries.
|
||||
|
||||
Sentence Boundaries
|
||||
# Sentence Boundaries
|
||||
|
||||
Sentence boundaries are often used for triple-click or some other method of
|
||||
selecting or iterating through blocks of text that are larger than single words.
|
||||
@ -41,7 +57,7 @@ They are also used to determine whether words occur within the same sentence in
|
||||
database queries. This package provides methods for determining sentence
|
||||
boundaries.
|
||||
|
||||
Line Breaking
|
||||
# Line Breaking
|
||||
|
||||
Line breaking, also known as word wrapping, is the process of breaking a section
|
||||
of text into lines such that it will fit in the available width of a page,
|
||||
@ -49,5 +65,44 @@ window or other display area. This package provides methods to determine the
|
||||
positions in a string where a line must be broken, may be broken, or must not be
|
||||
broken.
|
||||
|
||||
# Monospace Width
|
||||
|
||||
Monospace width, as referred to in this package, is the width of a string in a
|
||||
monospace font. This is commonly used in terminal user interfaces or text
|
||||
displays or editors that don't support proportional fonts. A width of 1
|
||||
corresponds to a single character cell. The C function [wcwidth()] and its
|
||||
implementation in other programming languages is in widespread use for the same
|
||||
purpose. However, there is no standard for the calculation of such widths, and
|
||||
this package differs from wcwidth() in a number of ways, presumably to generate
|
||||
more visually pleasing results.
|
||||
|
||||
To start, we assume that every code point has a width of 1, with the following
|
||||
exceptions:
|
||||
|
||||
- Code points with grapheme cluster break properties Control, CR, LF, Extend,
|
||||
and ZWJ have a width of 0.
|
||||
- U+2E3A, Two-Em Dash, has a width of 3.
|
||||
- U+2E3B, Three-Em Dash, has a width of 4.
|
||||
- Characters with the East-Asian Width properties "Fullwidth" (F) and "Wide"
|
||||
(W) have a width of 2. (Properties "Ambiguous" (A) and "Neutral" (N) both
|
||||
have a width of 1.)
|
||||
- Code points with grapheme cluster break property Regional Indicator have a
|
||||
width of 2.
|
||||
- Code points with grapheme cluster break property Extended Pictographic have
|
||||
a width of 2, unless their Emoji Presentation flag is "No", in which case
|
||||
the width is 1.
|
||||
|
||||
For Hangul grapheme clusters composed of conjoining Jamo and for Regional
|
||||
Indicators (flags), all code points except the first one have a width of 0. For
|
||||
grapheme clusters starting with an Extended Pictographic, any additional code
|
||||
point will force a total width of 2, except if the Variation Selector-15
|
||||
(U+FE0E) is included, in which case the total width is always 1. Grapheme
|
||||
clusters ending with Variation Selector-16 (U+FE0F) have a width of 2.
|
||||
|
||||
Note that whether these widths appear correct depends on your application's
|
||||
render engine, to which extent it conforms to the Unicode Standard, and its
|
||||
choice of font.
|
||||
|
||||
[wcwidth()]: https://man7.org/linux/man-pages/man3/wcwidth.3.html
|
||||
*/
|
||||
package uniseg
|
||||
|
5
vendor/github.com/rivo/uniseg/eastasianwidth.go
generated
vendored
5
vendor/github.com/rivo/uniseg/eastasianwidth.go
generated
vendored
@ -4,7 +4,10 @@ package uniseg
|
||||
|
||||
// eastAsianWidth are taken from
|
||||
// https://www.unicode.org/Public/14.0.0/ucd/EastAsianWidth.txt
|
||||
// on July 25, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// and
|
||||
// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt
|
||||
// ("Extended_Pictographic" only)
|
||||
// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// license agreement.
|
||||
var eastAsianWidth = [][3]int{
|
||||
{0x0000, 0x001F, prN}, // Cc [32] <control-0000>..<control-001F>
|
||||
|
285
vendor/github.com/rivo/uniseg/emojipresentation.go
generated
vendored
Normal file
285
vendor/github.com/rivo/uniseg/emojipresentation.go
generated
vendored
Normal file
@ -0,0 +1,285 @@
|
||||
package uniseg
|
||||
|
||||
// Code generated via go generate from gen_properties.go. DO NOT EDIT.
|
||||
|
||||
// emojiPresentation are taken from
|
||||
//
|
||||
// and
|
||||
// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt
|
||||
// ("Extended_Pictographic" only)
|
||||
// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// license agreement.
|
||||
var emojiPresentation = [][3]int{
|
||||
{0x231A, 0x231B, prEmojiPresentation}, // E0.6 [2] (⌚..⌛) watch..hourglass done
|
||||
{0x23E9, 0x23EC, prEmojiPresentation}, // E0.6 [4] (⏩..⏬) fast-forward button..fast down button
|
||||
{0x23F0, 0x23F0, prEmojiPresentation}, // E0.6 [1] (⏰) alarm clock
|
||||
{0x23F3, 0x23F3, prEmojiPresentation}, // E0.6 [1] (⏳) hourglass not done
|
||||
{0x25FD, 0x25FE, prEmojiPresentation}, // E0.6 [2] (◽..◾) white medium-small square..black medium-small square
|
||||
{0x2614, 0x2615, prEmojiPresentation}, // E0.6 [2] (☔..☕) umbrella with rain drops..hot beverage
|
||||
{0x2648, 0x2653, prEmojiPresentation}, // E0.6 [12] (♈..♓) Aries..Pisces
|
||||
{0x267F, 0x267F, prEmojiPresentation}, // E0.6 [1] (♿) wheelchair symbol
|
||||
{0x2693, 0x2693, prEmojiPresentation}, // E0.6 [1] (⚓) anchor
|
||||
{0x26A1, 0x26A1, prEmojiPresentation}, // E0.6 [1] (⚡) high voltage
|
||||
{0x26AA, 0x26AB, prEmojiPresentation}, // E0.6 [2] (⚪..⚫) white circle..black circle
|
||||
{0x26BD, 0x26BE, prEmojiPresentation}, // E0.6 [2] (⚽..⚾) soccer ball..baseball
|
||||
{0x26C4, 0x26C5, prEmojiPresentation}, // E0.6 [2] (⛄..⛅) snowman without snow..sun behind cloud
|
||||
{0x26CE, 0x26CE, prEmojiPresentation}, // E0.6 [1] (⛎) Ophiuchus
|
||||
{0x26D4, 0x26D4, prEmojiPresentation}, // E0.6 [1] (⛔) no entry
|
||||
{0x26EA, 0x26EA, prEmojiPresentation}, // E0.6 [1] (⛪) church
|
||||
{0x26F2, 0x26F3, prEmojiPresentation}, // E0.6 [2] (⛲..⛳) fountain..flag in hole
|
||||
{0x26F5, 0x26F5, prEmojiPresentation}, // E0.6 [1] (⛵) sailboat
|
||||
{0x26FA, 0x26FA, prEmojiPresentation}, // E0.6 [1] (⛺) tent
|
||||
{0x26FD, 0x26FD, prEmojiPresentation}, // E0.6 [1] (⛽) fuel pump
|
||||
{0x2705, 0x2705, prEmojiPresentation}, // E0.6 [1] (✅) check mark button
|
||||
{0x270A, 0x270B, prEmojiPresentation}, // E0.6 [2] (✊..✋) raised fist..raised hand
|
||||
{0x2728, 0x2728, prEmojiPresentation}, // E0.6 [1] (✨) sparkles
|
||||
{0x274C, 0x274C, prEmojiPresentation}, // E0.6 [1] (❌) cross mark
|
||||
{0x274E, 0x274E, prEmojiPresentation}, // E0.6 [1] (❎) cross mark button
|
||||
{0x2753, 0x2755, prEmojiPresentation}, // E0.6 [3] (❓..❕) red question mark..white exclamation mark
|
||||
{0x2757, 0x2757, prEmojiPresentation}, // E0.6 [1] (❗) red exclamation mark
|
||||
{0x2795, 0x2797, prEmojiPresentation}, // E0.6 [3] (➕..➗) plus..divide
|
||||
{0x27B0, 0x27B0, prEmojiPresentation}, // E0.6 [1] (➰) curly loop
|
||||
{0x27BF, 0x27BF, prEmojiPresentation}, // E1.0 [1] (➿) double curly loop
|
||||
{0x2B1B, 0x2B1C, prEmojiPresentation}, // E0.6 [2] (⬛..⬜) black large square..white large square
|
||||
{0x2B50, 0x2B50, prEmojiPresentation}, // E0.6 [1] (⭐) star
|
||||
{0x2B55, 0x2B55, prEmojiPresentation}, // E0.6 [1] (⭕) hollow red circle
|
||||
{0x1F004, 0x1F004, prEmojiPresentation}, // E0.6 [1] (🀄) mahjong red dragon
|
||||
{0x1F0CF, 0x1F0CF, prEmojiPresentation}, // E0.6 [1] (🃏) joker
|
||||
{0x1F18E, 0x1F18E, prEmojiPresentation}, // E0.6 [1] (🆎) AB button (blood type)
|
||||
{0x1F191, 0x1F19A, prEmojiPresentation}, // E0.6 [10] (🆑..🆚) CL button..VS button
|
||||
{0x1F1E6, 0x1F1FF, prEmojiPresentation}, // E0.0 [26] (🇦..🇿) regional indicator symbol letter a..regional indicator symbol letter z
|
||||
{0x1F201, 0x1F201, prEmojiPresentation}, // E0.6 [1] (🈁) Japanese “here” button
|
||||
{0x1F21A, 0x1F21A, prEmojiPresentation}, // E0.6 [1] (🈚) Japanese “free of charge” button
|
||||
{0x1F22F, 0x1F22F, prEmojiPresentation}, // E0.6 [1] (🈯) Japanese “reserved” button
|
||||
{0x1F232, 0x1F236, prEmojiPresentation}, // E0.6 [5] (🈲..🈶) Japanese “prohibited” button..Japanese “not free of charge” button
|
||||
{0x1F238, 0x1F23A, prEmojiPresentation}, // E0.6 [3] (🈸..🈺) Japanese “application” button..Japanese “open for business” button
|
||||
{0x1F250, 0x1F251, prEmojiPresentation}, // E0.6 [2] (🉐..🉑) Japanese “bargain” button..Japanese “acceptable” button
|
||||
{0x1F300, 0x1F30C, prEmojiPresentation}, // E0.6 [13] (🌀..🌌) cyclone..milky way
|
||||
{0x1F30D, 0x1F30E, prEmojiPresentation}, // E0.7 [2] (🌍..🌎) globe showing Europe-Africa..globe showing Americas
|
||||
{0x1F30F, 0x1F30F, prEmojiPresentation}, // E0.6 [1] (🌏) globe showing Asia-Australia
|
||||
{0x1F310, 0x1F310, prEmojiPresentation}, // E1.0 [1] (🌐) globe with meridians
|
||||
{0x1F311, 0x1F311, prEmojiPresentation}, // E0.6 [1] (🌑) new moon
|
||||
{0x1F312, 0x1F312, prEmojiPresentation}, // E1.0 [1] (🌒) waxing crescent moon
|
||||
{0x1F313, 0x1F315, prEmojiPresentation}, // E0.6 [3] (🌓..🌕) first quarter moon..full moon
|
||||
{0x1F316, 0x1F318, prEmojiPresentation}, // E1.0 [3] (🌖..🌘) waning gibbous moon..waning crescent moon
|
||||
{0x1F319, 0x1F319, prEmojiPresentation}, // E0.6 [1] (🌙) crescent moon
|
||||
{0x1F31A, 0x1F31A, prEmojiPresentation}, // E1.0 [1] (🌚) new moon face
|
||||
{0x1F31B, 0x1F31B, prEmojiPresentation}, // E0.6 [1] (🌛) first quarter moon face
|
||||
{0x1F31C, 0x1F31C, prEmojiPresentation}, // E0.7 [1] (🌜) last quarter moon face
|
||||
{0x1F31D, 0x1F31E, prEmojiPresentation}, // E1.0 [2] (🌝..🌞) full moon face..sun with face
|
||||
{0x1F31F, 0x1F320, prEmojiPresentation}, // E0.6 [2] (🌟..🌠) glowing star..shooting star
|
||||
{0x1F32D, 0x1F32F, prEmojiPresentation}, // E1.0 [3] (🌭..🌯) hot dog..burrito
|
||||
{0x1F330, 0x1F331, prEmojiPresentation}, // E0.6 [2] (🌰..🌱) chestnut..seedling
|
||||
{0x1F332, 0x1F333, prEmojiPresentation}, // E1.0 [2] (🌲..🌳) evergreen tree..deciduous tree
|
||||
{0x1F334, 0x1F335, prEmojiPresentation}, // E0.6 [2] (🌴..🌵) palm tree..cactus
|
||||
{0x1F337, 0x1F34A, prEmojiPresentation}, // E0.6 [20] (🌷..🍊) tulip..tangerine
|
||||
{0x1F34B, 0x1F34B, prEmojiPresentation}, // E1.0 [1] (🍋) lemon
|
||||
{0x1F34C, 0x1F34F, prEmojiPresentation}, // E0.6 [4] (🍌..🍏) banana..green apple
|
||||
{0x1F350, 0x1F350, prEmojiPresentation}, // E1.0 [1] (🍐) pear
|
||||
{0x1F351, 0x1F37B, prEmojiPresentation}, // E0.6 [43] (🍑..🍻) peach..clinking beer mugs
|
||||
{0x1F37C, 0x1F37C, prEmojiPresentation}, // E1.0 [1] (🍼) baby bottle
|
||||
{0x1F37E, 0x1F37F, prEmojiPresentation}, // E1.0 [2] (🍾..🍿) bottle with popping cork..popcorn
|
||||
{0x1F380, 0x1F393, prEmojiPresentation}, // E0.6 [20] (🎀..🎓) ribbon..graduation cap
|
||||
{0x1F3A0, 0x1F3C4, prEmojiPresentation}, // E0.6 [37] (🎠..🏄) carousel horse..person surfing
|
||||
{0x1F3C5, 0x1F3C5, prEmojiPresentation}, // E1.0 [1] (🏅) sports medal
|
||||
{0x1F3C6, 0x1F3C6, prEmojiPresentation}, // E0.6 [1] (🏆) trophy
|
||||
{0x1F3C7, 0x1F3C7, prEmojiPresentation}, // E1.0 [1] (🏇) horse racing
|
||||
{0x1F3C8, 0x1F3C8, prEmojiPresentation}, // E0.6 [1] (🏈) american football
|
||||
{0x1F3C9, 0x1F3C9, prEmojiPresentation}, // E1.0 [1] (🏉) rugby football
|
||||
{0x1F3CA, 0x1F3CA, prEmojiPresentation}, // E0.6 [1] (🏊) person swimming
|
||||
{0x1F3CF, 0x1F3D3, prEmojiPresentation}, // E1.0 [5] (🏏..🏓) cricket game..ping pong
|
||||
{0x1F3E0, 0x1F3E3, prEmojiPresentation}, // E0.6 [4] (🏠..🏣) house..Japanese post office
|
||||
{0x1F3E4, 0x1F3E4, prEmojiPresentation}, // E1.0 [1] (🏤) post office
|
||||
{0x1F3E5, 0x1F3F0, prEmojiPresentation}, // E0.6 [12] (🏥..🏰) hospital..castle
|
||||
{0x1F3F4, 0x1F3F4, prEmojiPresentation}, // E1.0 [1] (🏴) black flag
|
||||
{0x1F3F8, 0x1F407, prEmojiPresentation}, // E1.0 [16] (🏸..🐇) badminton..rabbit
|
||||
{0x1F408, 0x1F408, prEmojiPresentation}, // E0.7 [1] (🐈) cat
|
||||
{0x1F409, 0x1F40B, prEmojiPresentation}, // E1.0 [3] (🐉..🐋) dragon..whale
|
||||
{0x1F40C, 0x1F40E, prEmojiPresentation}, // E0.6 [3] (🐌..🐎) snail..horse
|
||||
{0x1F40F, 0x1F410, prEmojiPresentation}, // E1.0 [2] (🐏..🐐) ram..goat
|
||||
{0x1F411, 0x1F412, prEmojiPresentation}, // E0.6 [2] (🐑..🐒) ewe..monkey
|
||||
{0x1F413, 0x1F413, prEmojiPresentation}, // E1.0 [1] (🐓) rooster
|
||||
{0x1F414, 0x1F414, prEmojiPresentation}, // E0.6 [1] (🐔) chicken
|
||||
{0x1F415, 0x1F415, prEmojiPresentation}, // E0.7 [1] (🐕) dog
|
||||
{0x1F416, 0x1F416, prEmojiPresentation}, // E1.0 [1] (🐖) pig
|
||||
{0x1F417, 0x1F429, prEmojiPresentation}, // E0.6 [19] (🐗..🐩) boar..poodle
|
||||
{0x1F42A, 0x1F42A, prEmojiPresentation}, // E1.0 [1] (🐪) camel
|
||||
{0x1F42B, 0x1F43E, prEmojiPresentation}, // E0.6 [20] (🐫..🐾) two-hump camel..paw prints
|
||||
{0x1F440, 0x1F440, prEmojiPresentation}, // E0.6 [1] (👀) eyes
|
||||
{0x1F442, 0x1F464, prEmojiPresentation}, // E0.6 [35] (👂..👤) ear..bust in silhouette
|
||||
{0x1F465, 0x1F465, prEmojiPresentation}, // E1.0 [1] (👥) busts in silhouette
|
||||
{0x1F466, 0x1F46B, prEmojiPresentation}, // E0.6 [6] (👦..👫) boy..woman and man holding hands
|
||||
{0x1F46C, 0x1F46D, prEmojiPresentation}, // E1.0 [2] (👬..👭) men holding hands..women holding hands
|
||||
{0x1F46E, 0x1F4AC, prEmojiPresentation}, // E0.6 [63] (👮..💬) police officer..speech balloon
|
||||
{0x1F4AD, 0x1F4AD, prEmojiPresentation}, // E1.0 [1] (💭) thought balloon
|
||||
{0x1F4AE, 0x1F4B5, prEmojiPresentation}, // E0.6 [8] (💮..💵) white flower..dollar banknote
|
||||
{0x1F4B6, 0x1F4B7, prEmojiPresentation}, // E1.0 [2] (💶..💷) euro banknote..pound banknote
|
||||
{0x1F4B8, 0x1F4EB, prEmojiPresentation}, // E0.6 [52] (💸..📫) money with wings..closed mailbox with raised flag
|
||||
{0x1F4EC, 0x1F4ED, prEmojiPresentation}, // E0.7 [2] (📬..📭) open mailbox with raised flag..open mailbox with lowered flag
|
||||
{0x1F4EE, 0x1F4EE, prEmojiPresentation}, // E0.6 [1] (📮) postbox
|
||||
{0x1F4EF, 0x1F4EF, prEmojiPresentation}, // E1.0 [1] (📯) postal horn
|
||||
{0x1F4F0, 0x1F4F4, prEmojiPresentation}, // E0.6 [5] (📰..📴) newspaper..mobile phone off
|
||||
{0x1F4F5, 0x1F4F5, prEmojiPresentation}, // E1.0 [1] (📵) no mobile phones
|
||||
{0x1F4F6, 0x1F4F7, prEmojiPresentation}, // E0.6 [2] (📶..📷) antenna bars..camera
|
||||
{0x1F4F8, 0x1F4F8, prEmojiPresentation}, // E1.0 [1] (📸) camera with flash
|
||||
{0x1F4F9, 0x1F4FC, prEmojiPresentation}, // E0.6 [4] (📹..📼) video camera..videocassette
|
||||
{0x1F4FF, 0x1F502, prEmojiPresentation}, // E1.0 [4] (📿..🔂) prayer beads..repeat single button
|
||||
{0x1F503, 0x1F503, prEmojiPresentation}, // E0.6 [1] (🔃) clockwise vertical arrows
|
||||
{0x1F504, 0x1F507, prEmojiPresentation}, // E1.0 [4] (🔄..🔇) counterclockwise arrows button..muted speaker
|
||||
{0x1F508, 0x1F508, prEmojiPresentation}, // E0.7 [1] (🔈) speaker low volume
|
||||
{0x1F509, 0x1F509, prEmojiPresentation}, // E1.0 [1] (🔉) speaker medium volume
|
||||
{0x1F50A, 0x1F514, prEmojiPresentation}, // E0.6 [11] (🔊..🔔) speaker high volume..bell
|
||||
{0x1F515, 0x1F515, prEmojiPresentation}, // E1.0 [1] (🔕) bell with slash
|
||||
{0x1F516, 0x1F52B, prEmojiPresentation}, // E0.6 [22] (🔖..🔫) bookmark..water pistol
|
||||
{0x1F52C, 0x1F52D, prEmojiPresentation}, // E1.0 [2] (🔬..🔭) microscope..telescope
|
||||
{0x1F52E, 0x1F53D, prEmojiPresentation}, // E0.6 [16] (🔮..🔽) crystal ball..downwards button
|
||||
{0x1F54B, 0x1F54E, prEmojiPresentation}, // E1.0 [4] (🕋..🕎) kaaba..menorah
|
||||
{0x1F550, 0x1F55B, prEmojiPresentation}, // E0.6 [12] (🕐..🕛) one o’clock..twelve o’clock
|
||||
{0x1F55C, 0x1F567, prEmojiPresentation}, // E0.7 [12] (🕜..🕧) one-thirty..twelve-thirty
|
||||
{0x1F57A, 0x1F57A, prEmojiPresentation}, // E3.0 [1] (🕺) man dancing
|
||||
{0x1F595, 0x1F596, prEmojiPresentation}, // E1.0 [2] (🖕..🖖) middle finger..vulcan salute
|
||||
{0x1F5A4, 0x1F5A4, prEmojiPresentation}, // E3.0 [1] (🖤) black heart
|
||||
{0x1F5FB, 0x1F5FF, prEmojiPresentation}, // E0.6 [5] (🗻..🗿) mount fuji..moai
|
||||
{0x1F600, 0x1F600, prEmojiPresentation}, // E1.0 [1] (😀) grinning face
|
||||
{0x1F601, 0x1F606, prEmojiPresentation}, // E0.6 [6] (😁..😆) beaming face with smiling eyes..grinning squinting face
|
||||
{0x1F607, 0x1F608, prEmojiPresentation}, // E1.0 [2] (😇..😈) smiling face with halo..smiling face with horns
|
||||
{0x1F609, 0x1F60D, prEmojiPresentation}, // E0.6 [5] (😉..😍) winking face..smiling face with heart-eyes
|
||||
{0x1F60E, 0x1F60E, prEmojiPresentation}, // E1.0 [1] (😎) smiling face with sunglasses
|
||||
{0x1F60F, 0x1F60F, prEmojiPresentation}, // E0.6 [1] (😏) smirking face
|
||||
{0x1F610, 0x1F610, prEmojiPresentation}, // E0.7 [1] (😐) neutral face
|
||||
{0x1F611, 0x1F611, prEmojiPresentation}, // E1.0 [1] (😑) expressionless face
|
||||
{0x1F612, 0x1F614, prEmojiPresentation}, // E0.6 [3] (😒..😔) unamused face..pensive face
|
||||
{0x1F615, 0x1F615, prEmojiPresentation}, // E1.0 [1] (😕) confused face
|
||||
{0x1F616, 0x1F616, prEmojiPresentation}, // E0.6 [1] (😖) confounded face
|
||||
{0x1F617, 0x1F617, prEmojiPresentation}, // E1.0 [1] (😗) kissing face
|
||||
{0x1F618, 0x1F618, prEmojiPresentation}, // E0.6 [1] (😘) face blowing a kiss
|
||||
{0x1F619, 0x1F619, prEmojiPresentation}, // E1.0 [1] (😙) kissing face with smiling eyes
|
||||
{0x1F61A, 0x1F61A, prEmojiPresentation}, // E0.6 [1] (😚) kissing face with closed eyes
|
||||
{0x1F61B, 0x1F61B, prEmojiPresentation}, // E1.0 [1] (😛) face with tongue
|
||||
{0x1F61C, 0x1F61E, prEmojiPresentation}, // E0.6 [3] (😜..😞) winking face with tongue..disappointed face
|
||||
{0x1F61F, 0x1F61F, prEmojiPresentation}, // E1.0 [1] (😟) worried face
|
||||
{0x1F620, 0x1F625, prEmojiPresentation}, // E0.6 [6] (😠..😥) angry face..sad but relieved face
|
||||
{0x1F626, 0x1F627, prEmojiPresentation}, // E1.0 [2] (😦..😧) frowning face with open mouth..anguished face
|
||||
{0x1F628, 0x1F62B, prEmojiPresentation}, // E0.6 [4] (😨..😫) fearful face..tired face
|
||||
{0x1F62C, 0x1F62C, prEmojiPresentation}, // E1.0 [1] (😬) grimacing face
|
||||
{0x1F62D, 0x1F62D, prEmojiPresentation}, // E0.6 [1] (😭) loudly crying face
|
||||
{0x1F62E, 0x1F62F, prEmojiPresentation}, // E1.0 [2] (😮..😯) face with open mouth..hushed face
|
||||
{0x1F630, 0x1F633, prEmojiPresentation}, // E0.6 [4] (😰..😳) anxious face with sweat..flushed face
|
||||
{0x1F634, 0x1F634, prEmojiPresentation}, // E1.0 [1] (😴) sleeping face
|
||||
{0x1F635, 0x1F635, prEmojiPresentation}, // E0.6 [1] (😵) face with crossed-out eyes
|
||||
{0x1F636, 0x1F636, prEmojiPresentation}, // E1.0 [1] (😶) face without mouth
|
||||
{0x1F637, 0x1F640, prEmojiPresentation}, // E0.6 [10] (😷..🙀) face with medical mask..weary cat
|
||||
{0x1F641, 0x1F644, prEmojiPresentation}, // E1.0 [4] (🙁..🙄) slightly frowning face..face with rolling eyes
|
||||
{0x1F645, 0x1F64F, prEmojiPresentation}, // E0.6 [11] (🙅..🙏) person gesturing NO..folded hands
|
||||
{0x1F680, 0x1F680, prEmojiPresentation}, // E0.6 [1] (🚀) rocket
|
||||
{0x1F681, 0x1F682, prEmojiPresentation}, // E1.0 [2] (🚁..🚂) helicopter..locomotive
|
||||
{0x1F683, 0x1F685, prEmojiPresentation}, // E0.6 [3] (🚃..🚅) railway car..bullet train
|
||||
{0x1F686, 0x1F686, prEmojiPresentation}, // E1.0 [1] (🚆) train
|
||||
{0x1F687, 0x1F687, prEmojiPresentation}, // E0.6 [1] (🚇) metro
|
||||
{0x1F688, 0x1F688, prEmojiPresentation}, // E1.0 [1] (🚈) light rail
|
||||
{0x1F689, 0x1F689, prEmojiPresentation}, // E0.6 [1] (🚉) station
|
||||
{0x1F68A, 0x1F68B, prEmojiPresentation}, // E1.0 [2] (🚊..🚋) tram..tram car
|
||||
{0x1F68C, 0x1F68C, prEmojiPresentation}, // E0.6 [1] (🚌) bus
|
||||
{0x1F68D, 0x1F68D, prEmojiPresentation}, // E0.7 [1] (🚍) oncoming bus
|
||||
{0x1F68E, 0x1F68E, prEmojiPresentation}, // E1.0 [1] (🚎) trolleybus
|
||||
{0x1F68F, 0x1F68F, prEmojiPresentation}, // E0.6 [1] (🚏) bus stop
|
||||
{0x1F690, 0x1F690, prEmojiPresentation}, // E1.0 [1] (🚐) minibus
|
||||
{0x1F691, 0x1F693, prEmojiPresentation}, // E0.6 [3] (🚑..🚓) ambulance..police car
|
||||
{0x1F694, 0x1F694, prEmojiPresentation}, // E0.7 [1] (🚔) oncoming police car
|
||||
{0x1F695, 0x1F695, prEmojiPresentation}, // E0.6 [1] (🚕) taxi
|
||||
{0x1F696, 0x1F696, prEmojiPresentation}, // E1.0 [1] (🚖) oncoming taxi
|
||||
{0x1F697, 0x1F697, prEmojiPresentation}, // E0.6 [1] (🚗) automobile
|
||||
{0x1F698, 0x1F698, prEmojiPresentation}, // E0.7 [1] (🚘) oncoming automobile
|
||||
{0x1F699, 0x1F69A, prEmojiPresentation}, // E0.6 [2] (🚙..🚚) sport utility vehicle..delivery truck
|
||||
{0x1F69B, 0x1F6A1, prEmojiPresentation}, // E1.0 [7] (🚛..🚡) articulated lorry..aerial tramway
|
||||
{0x1F6A2, 0x1F6A2, prEmojiPresentation}, // E0.6 [1] (🚢) ship
|
||||
{0x1F6A3, 0x1F6A3, prEmojiPresentation}, // E1.0 [1] (🚣) person rowing boat
|
||||
{0x1F6A4, 0x1F6A5, prEmojiPresentation}, // E0.6 [2] (🚤..🚥) speedboat..horizontal traffic light
|
||||
{0x1F6A6, 0x1F6A6, prEmojiPresentation}, // E1.0 [1] (🚦) vertical traffic light
|
||||
{0x1F6A7, 0x1F6AD, prEmojiPresentation}, // E0.6 [7] (🚧..🚭) construction..no smoking
|
||||
{0x1F6AE, 0x1F6B1, prEmojiPresentation}, // E1.0 [4] (🚮..🚱) litter in bin sign..non-potable water
|
||||
{0x1F6B2, 0x1F6B2, prEmojiPresentation}, // E0.6 [1] (🚲) bicycle
|
||||
{0x1F6B3, 0x1F6B5, prEmojiPresentation}, // E1.0 [3] (🚳..🚵) no bicycles..person mountain biking
|
||||
{0x1F6B6, 0x1F6B6, prEmojiPresentation}, // E0.6 [1] (🚶) person walking
|
||||
{0x1F6B7, 0x1F6B8, prEmojiPresentation}, // E1.0 [2] (🚷..🚸) no pedestrians..children crossing
|
||||
{0x1F6B9, 0x1F6BE, prEmojiPresentation}, // E0.6 [6] (🚹..🚾) men’s room..water closet
|
||||
{0x1F6BF, 0x1F6BF, prEmojiPresentation}, // E1.0 [1] (🚿) shower
|
||||
{0x1F6C0, 0x1F6C0, prEmojiPresentation}, // E0.6 [1] (🛀) person taking bath
|
||||
{0x1F6C1, 0x1F6C5, prEmojiPresentation}, // E1.0 [5] (🛁..🛅) bathtub..left luggage
|
||||
{0x1F6CC, 0x1F6CC, prEmojiPresentation}, // E1.0 [1] (🛌) person in bed
|
||||
{0x1F6D0, 0x1F6D0, prEmojiPresentation}, // E1.0 [1] (🛐) place of worship
|
||||
{0x1F6D1, 0x1F6D2, prEmojiPresentation}, // E3.0 [2] (🛑..🛒) stop sign..shopping cart
|
||||
{0x1F6D5, 0x1F6D5, prEmojiPresentation}, // E12.0 [1] (🛕) hindu temple
|
||||
{0x1F6D6, 0x1F6D7, prEmojiPresentation}, // E13.0 [2] (🛖..🛗) hut..elevator
|
||||
{0x1F6DD, 0x1F6DF, prEmojiPresentation}, // E14.0 [3] (🛝..🛟) playground slide..ring buoy
|
||||
{0x1F6EB, 0x1F6EC, prEmojiPresentation}, // E1.0 [2] (🛫..🛬) airplane departure..airplane arrival
|
||||
{0x1F6F4, 0x1F6F6, prEmojiPresentation}, // E3.0 [3] (🛴..🛶) kick scooter..canoe
|
||||
{0x1F6F7, 0x1F6F8, prEmojiPresentation}, // E5.0 [2] (🛷..🛸) sled..flying saucer
|
||||
{0x1F6F9, 0x1F6F9, prEmojiPresentation}, // E11.0 [1] (🛹) skateboard
|
||||
{0x1F6FA, 0x1F6FA, prEmojiPresentation}, // E12.0 [1] (🛺) auto rickshaw
|
||||
{0x1F6FB, 0x1F6FC, prEmojiPresentation}, // E13.0 [2] (🛻..🛼) pickup truck..roller skate
|
||||
{0x1F7E0, 0x1F7EB, prEmojiPresentation}, // E12.0 [12] (🟠..🟫) orange circle..brown square
|
||||
{0x1F7F0, 0x1F7F0, prEmojiPresentation}, // E14.0 [1] (🟰) heavy equals sign
|
||||
{0x1F90C, 0x1F90C, prEmojiPresentation}, // E13.0 [1] (🤌) pinched fingers
|
||||
{0x1F90D, 0x1F90F, prEmojiPresentation}, // E12.0 [3] (🤍..🤏) white heart..pinching hand
|
||||
{0x1F910, 0x1F918, prEmojiPresentation}, // E1.0 [9] (🤐..🤘) zipper-mouth face..sign of the horns
|
||||
{0x1F919, 0x1F91E, prEmojiPresentation}, // E3.0 [6] (🤙..🤞) call me hand..crossed fingers
|
||||
{0x1F91F, 0x1F91F, prEmojiPresentation}, // E5.0 [1] (🤟) love-you gesture
|
||||
{0x1F920, 0x1F927, prEmojiPresentation}, // E3.0 [8] (🤠..🤧) cowboy hat face..sneezing face
|
||||
{0x1F928, 0x1F92F, prEmojiPresentation}, // E5.0 [8] (🤨..🤯) face with raised eyebrow..exploding head
|
||||
{0x1F930, 0x1F930, prEmojiPresentation}, // E3.0 [1] (🤰) pregnant woman
|
||||
{0x1F931, 0x1F932, prEmojiPresentation}, // E5.0 [2] (🤱..🤲) breast-feeding..palms up together
|
||||
{0x1F933, 0x1F93A, prEmojiPresentation}, // E3.0 [8] (🤳..🤺) selfie..person fencing
|
||||
{0x1F93C, 0x1F93E, prEmojiPresentation}, // E3.0 [3] (🤼..🤾) people wrestling..person playing handball
|
||||
{0x1F93F, 0x1F93F, prEmojiPresentation}, // E12.0 [1] (🤿) diving mask
|
||||
{0x1F940, 0x1F945, prEmojiPresentation}, // E3.0 [6] (🥀..🥅) wilted flower..goal net
|
||||
{0x1F947, 0x1F94B, prEmojiPresentation}, // E3.0 [5] (🥇..🥋) 1st place medal..martial arts uniform
|
||||
{0x1F94C, 0x1F94C, prEmojiPresentation}, // E5.0 [1] (🥌) curling stone
|
||||
{0x1F94D, 0x1F94F, prEmojiPresentation}, // E11.0 [3] (🥍..🥏) lacrosse..flying disc
|
||||
{0x1F950, 0x1F95E, prEmojiPresentation}, // E3.0 [15] (🥐..🥞) croissant..pancakes
|
||||
{0x1F95F, 0x1F96B, prEmojiPresentation}, // E5.0 [13] (🥟..🥫) dumpling..canned food
|
||||
{0x1F96C, 0x1F970, prEmojiPresentation}, // E11.0 [5] (🥬..🥰) leafy green..smiling face with hearts
|
||||
{0x1F971, 0x1F971, prEmojiPresentation}, // E12.0 [1] (🥱) yawning face
|
||||
{0x1F972, 0x1F972, prEmojiPresentation}, // E13.0 [1] (🥲) smiling face with tear
|
||||
{0x1F973, 0x1F976, prEmojiPresentation}, // E11.0 [4] (🥳..🥶) partying face..cold face
|
||||
{0x1F977, 0x1F978, prEmojiPresentation}, // E13.0 [2] (🥷..🥸) ninja..disguised face
|
||||
{0x1F979, 0x1F979, prEmojiPresentation}, // E14.0 [1] (🥹) face holding back tears
|
||||
{0x1F97A, 0x1F97A, prEmojiPresentation}, // E11.0 [1] (🥺) pleading face
|
||||
{0x1F97B, 0x1F97B, prEmojiPresentation}, // E12.0 [1] (🥻) sari
|
||||
{0x1F97C, 0x1F97F, prEmojiPresentation}, // E11.0 [4] (🥼..🥿) lab coat..flat shoe
|
||||
{0x1F980, 0x1F984, prEmojiPresentation}, // E1.0 [5] (🦀..🦄) crab..unicorn
|
||||
{0x1F985, 0x1F991, prEmojiPresentation}, // E3.0 [13] (🦅..🦑) eagle..squid
|
||||
{0x1F992, 0x1F997, prEmojiPresentation}, // E5.0 [6] (🦒..🦗) giraffe..cricket
|
||||
{0x1F998, 0x1F9A2, prEmojiPresentation}, // E11.0 [11] (🦘..🦢) kangaroo..swan
|
||||
{0x1F9A3, 0x1F9A4, prEmojiPresentation}, // E13.0 [2] (🦣..🦤) mammoth..dodo
|
||||
{0x1F9A5, 0x1F9AA, prEmojiPresentation}, // E12.0 [6] (🦥..🦪) sloth..oyster
|
||||
{0x1F9AB, 0x1F9AD, prEmojiPresentation}, // E13.0 [3] (🦫..🦭) beaver..seal
|
||||
{0x1F9AE, 0x1F9AF, prEmojiPresentation}, // E12.0 [2] (🦮..🦯) guide dog..white cane
|
||||
{0x1F9B0, 0x1F9B9, prEmojiPresentation}, // E11.0 [10] (🦰..🦹) red hair..supervillain
|
||||
{0x1F9BA, 0x1F9BF, prEmojiPresentation}, // E12.0 [6] (🦺..🦿) safety vest..mechanical leg
|
||||
{0x1F9C0, 0x1F9C0, prEmojiPresentation}, // E1.0 [1] (🧀) cheese wedge
|
||||
{0x1F9C1, 0x1F9C2, prEmojiPresentation}, // E11.0 [2] (🧁..🧂) cupcake..salt
|
||||
{0x1F9C3, 0x1F9CA, prEmojiPresentation}, // E12.0 [8] (🧃..🧊) beverage box..ice
|
||||
{0x1F9CB, 0x1F9CB, prEmojiPresentation}, // E13.0 [1] (🧋) bubble tea
|
||||
{0x1F9CC, 0x1F9CC, prEmojiPresentation}, // E14.0 [1] (🧌) troll
|
||||
{0x1F9CD, 0x1F9CF, prEmojiPresentation}, // E12.0 [3] (🧍..🧏) person standing..deaf person
|
||||
{0x1F9D0, 0x1F9E6, prEmojiPresentation}, // E5.0 [23] (🧐..🧦) face with monocle..socks
|
||||
{0x1F9E7, 0x1F9FF, prEmojiPresentation}, // E11.0 [25] (🧧..🧿) red envelope..nazar amulet
|
||||
{0x1FA70, 0x1FA73, prEmojiPresentation}, // E12.0 [4] (🩰..🩳) ballet shoes..shorts
|
||||
{0x1FA74, 0x1FA74, prEmojiPresentation}, // E13.0 [1] (🩴) thong sandal
|
||||
{0x1FA78, 0x1FA7A, prEmojiPresentation}, // E12.0 [3] (🩸..🩺) drop of blood..stethoscope
|
||||
{0x1FA7B, 0x1FA7C, prEmojiPresentation}, // E14.0 [2] (🩻..🩼) x-ray..crutch
|
||||
{0x1FA80, 0x1FA82, prEmojiPresentation}, // E12.0 [3] (🪀..🪂) yo-yo..parachute
|
||||
{0x1FA83, 0x1FA86, prEmojiPresentation}, // E13.0 [4] (🪃..🪆) boomerang..nesting dolls
|
||||
{0x1FA90, 0x1FA95, prEmojiPresentation}, // E12.0 [6] (🪐..🪕) ringed planet..banjo
|
||||
{0x1FA96, 0x1FAA8, prEmojiPresentation}, // E13.0 [19] (🪖..🪨) military helmet..rock
|
||||
{0x1FAA9, 0x1FAAC, prEmojiPresentation}, // E14.0 [4] (🪩..🪬) mirror ball..hamsa
|
||||
{0x1FAB0, 0x1FAB6, prEmojiPresentation}, // E13.0 [7] (🪰..🪶) fly..feather
|
||||
{0x1FAB7, 0x1FABA, prEmojiPresentation}, // E14.0 [4] (🪷..🪺) lotus..nest with eggs
|
||||
{0x1FAC0, 0x1FAC2, prEmojiPresentation}, // E13.0 [3] (🫀..🫂) anatomical heart..people hugging
|
||||
{0x1FAC3, 0x1FAC5, prEmojiPresentation}, // E14.0 [3] (🫃..🫅) pregnant man..person with crown
|
||||
{0x1FAD0, 0x1FAD6, prEmojiPresentation}, // E13.0 [7] (🫐..🫖) blueberries..teapot
|
||||
{0x1FAD7, 0x1FAD9, prEmojiPresentation}, // E14.0 [3] (🫗..🫙) pouring liquid..jar
|
||||
{0x1FAE0, 0x1FAE7, prEmojiPresentation}, // E14.0 [8] (🫠..🫧) melting face..bubbles
|
||||
{0x1FAF0, 0x1FAF6, prEmojiPresentation}, // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands
|
||||
}
|
122
vendor/github.com/rivo/uniseg/gen_properties.go
generated
vendored
122
vendor/github.com/rivo/uniseg/gen_properties.go
generated
vendored
@ -3,19 +3,22 @@
|
||||
// This program generates a property file in Go file from Unicode Character
|
||||
// Database auxiliary data files. The command line arguments are as follows:
|
||||
//
|
||||
// 1. The name of the Unicode data file (just the filename, without extension).
|
||||
// 2. The name of the locally generated Go file.
|
||||
// 3. The name of the slice mapping code points to properties.
|
||||
// 4. The name of the generator, for logging purposes.
|
||||
// 5. (Optional) Flags, comma-separated. The following flags are available:
|
||||
// - "emojis": include emoji properties (Extended Pictographic only).
|
||||
// - "gencat": include general category properties.
|
||||
// 1. The name of the Unicode data file (just the filename, without extension).
|
||||
// Can be "-" (to skip) if the emoji flag is included.
|
||||
// 2. The name of the locally generated Go file.
|
||||
// 3. The name of the slice mapping code points to properties.
|
||||
// 4. The name of the generator, for logging purposes.
|
||||
// 5. (Optional) Flags, comma-separated. The following flags are available:
|
||||
// - "emojis=<property>": include the specified emoji properties (e.g.
|
||||
// "Extended_Pictographic").
|
||||
// - "gencat": include general category properties.
|
||||
//
|
||||
//go:generate go run gen_properties.go auxiliary/GraphemeBreakProperty graphemeproperties.go graphemeCodePoints graphemes emojis
|
||||
//go:generate go run gen_properties.go auxiliary/WordBreakProperty wordproperties.go workBreakCodePoints words emojis
|
||||
//go:generate go run gen_properties.go auxiliary/GraphemeBreakProperty graphemeproperties.go graphemeCodePoints graphemes emojis=Extended_Pictographic
|
||||
//go:generate go run gen_properties.go auxiliary/WordBreakProperty wordproperties.go workBreakCodePoints words emojis=Extended_Pictographic
|
||||
//go:generate go run gen_properties.go auxiliary/SentenceBreakProperty sentenceproperties.go sentenceBreakCodePoints sentences
|
||||
//go:generate go run gen_properties.go LineBreak lineproperties.go lineBreakCodePoints lines gencat
|
||||
//go:generate go run gen_properties.go EastAsianWidth eastasianwidth.go eastAsianWidth eastasianwidth
|
||||
//go:generate go run gen_properties.go - emojipresentation.go emojiPresentation emojipresentation emojis=Emoji_Presentation
|
||||
package main
|
||||
|
||||
import (
|
||||
@ -38,8 +41,8 @@ import (
|
||||
// We want to test against a specific version rather than the latest. When the
|
||||
// package is upgraded to a new version, change these to generate new tests.
|
||||
const (
|
||||
gbpURL = `https://www.unicode.org/Public/14.0.0/ucd/%s.txt`
|
||||
emojiURL = `https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt`
|
||||
propertyURL = `https://www.unicode.org/Public/14.0.0/ucd/%s.txt`
|
||||
emojiURL = `https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt`
|
||||
)
|
||||
|
||||
// The regular expression for a line containing a code point range property.
|
||||
@ -55,20 +58,25 @@ func main() {
|
||||
log.SetFlags(0)
|
||||
|
||||
// Parse flags.
|
||||
flags := make(map[string]struct{})
|
||||
flags := make(map[string]string)
|
||||
if len(os.Args) >= 6 {
|
||||
for _, flag := range strings.Split(os.Args[5], ",") {
|
||||
flags[flag] = struct{}{}
|
||||
flagFields := strings.Split(flag, "=")
|
||||
if len(flagFields) == 1 {
|
||||
flags[flagFields[0]] = "yes"
|
||||
} else {
|
||||
flags[flagFields[0]] = flagFields[1]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the text file and generate Go source code from it.
|
||||
var emojis string
|
||||
if _, ok := flags["emojis"]; ok {
|
||||
emojis = emojiURL
|
||||
}
|
||||
_, includeGeneralCategory := flags["gencat"]
|
||||
src, err := parse(fmt.Sprintf(gbpURL, os.Args[1]), emojis, includeGeneralCategory)
|
||||
var mainURL string
|
||||
if os.Args[1] != "-" {
|
||||
mainURL = fmt.Sprintf(propertyURL, os.Args[1])
|
||||
}
|
||||
src, err := parse(mainURL, flags["emojis"], includeGeneralCategory)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@ -88,49 +96,57 @@ func main() {
|
||||
|
||||
// parse parses the Unicode Properties text files located at the given URLs and
|
||||
// returns their equivalent Go source code to be used in the uniseg package. If
|
||||
// "emojiURL" is an empty string, no emoji code points will be included. If
|
||||
// "emojiProperty" is not an empty string, emoji code points for that emoji
|
||||
// property (e.g. "Extended_Pictographic") will be included. In those cases, you
|
||||
// may pass an empty "propertyURL" to skip parsing the main properties file. If
|
||||
// "includeGeneralCategory" is true, the Unicode General Category property will
|
||||
// be extracted from the comments and included in the output.
|
||||
func parse(gbpURL, emojiURL string, includeGeneralCategory bool) (string, error) {
|
||||
func parse(propertyURL, emojiProperty string, includeGeneralCategory bool) (string, error) {
|
||||
if propertyURL == "" && emojiProperty == "" {
|
||||
return "", errors.New("no properties to parse")
|
||||
}
|
||||
|
||||
// Temporary buffer to hold properties.
|
||||
var properties [][4]string
|
||||
|
||||
// Open the first URL.
|
||||
log.Printf("Parsing %s", gbpURL)
|
||||
res, err := http.Get(gbpURL)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
in1 := res.Body
|
||||
defer in1.Close()
|
||||
|
||||
// Parse it.
|
||||
scanner := bufio.NewScanner(in1)
|
||||
num := 0
|
||||
for scanner.Scan() {
|
||||
num++
|
||||
line := strings.TrimSpace(scanner.Text())
|
||||
|
||||
// Skip comments and empty lines.
|
||||
if strings.HasPrefix(line, "#") || line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
// Everything else must be a code point range, a property and a comment.
|
||||
from, to, property, comment, err := parseProperty(line)
|
||||
if propertyURL != "" {
|
||||
log.Printf("Parsing %s", propertyURL)
|
||||
res, err := http.Get(propertyURL)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("%s line %d: %v", os.Args[4], num, err)
|
||||
return "", err
|
||||
}
|
||||
in1 := res.Body
|
||||
defer in1.Close()
|
||||
|
||||
// Parse it.
|
||||
scanner := bufio.NewScanner(in1)
|
||||
num := 0
|
||||
for scanner.Scan() {
|
||||
num++
|
||||
line := strings.TrimSpace(scanner.Text())
|
||||
|
||||
// Skip comments and empty lines.
|
||||
if strings.HasPrefix(line, "#") || line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
// Everything else must be a code point range, a property and a comment.
|
||||
from, to, property, comment, err := parseProperty(line)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("%s line %d: %v", os.Args[4], num, err)
|
||||
}
|
||||
properties = append(properties, [4]string{from, to, property, comment})
|
||||
}
|
||||
if err := scanner.Err(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
properties = append(properties, [4]string{from, to, property, comment})
|
||||
}
|
||||
if err := scanner.Err(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Open the second URL.
|
||||
if emojiURL != "" {
|
||||
if emojiProperty != "" {
|
||||
log.Printf("Parsing %s", emojiURL)
|
||||
res, err = http.Get(emojiURL)
|
||||
res, err := http.Get(emojiURL)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@ -138,15 +154,15 @@ func parse(gbpURL, emojiURL string, includeGeneralCategory bool) (string, error)
|
||||
defer in2.Close()
|
||||
|
||||
// Parse it.
|
||||
scanner = bufio.NewScanner(in2)
|
||||
num = 0
|
||||
scanner := bufio.NewScanner(in2)
|
||||
num := 0
|
||||
for scanner.Scan() {
|
||||
num++
|
||||
line := scanner.Text()
|
||||
|
||||
// Skip comments, empty lines, and everything not containing
|
||||
// "Extended_Pictographic".
|
||||
if strings.HasPrefix(line, "#") || line == "" || !strings.Contains(line, "Extended_Pictographic") {
|
||||
if strings.HasPrefix(line, "#") || line == "" || !strings.Contains(line, emojiProperty) {
|
||||
continue
|
||||
}
|
||||
|
||||
@ -189,7 +205,7 @@ func parse(gbpURL, emojiURL string, includeGeneralCategory bool) (string, error)
|
||||
// Code generated via go generate from gen_properties.go. DO NOT EDIT.
|
||||
|
||||
// ` + os.Args[3] + ` are taken from
|
||||
// ` + gbpURL + emojiComment + `
|
||||
// ` + propertyURL + emojiComment + `
|
||||
// on ` + time.Now().Format("January 2, 2006") + `. See https://www.unicode.org/license.html for the Unicode
|
||||
// license agreement.
|
||||
var ` + os.Args[3] + ` = [][` + strconv.Itoa(columns) + `]int{
|
||||
|
136
vendor/github.com/rivo/uniseg/grapheme.go
generated
vendored
136
vendor/github.com/rivo/uniseg/grapheme.go
generated
vendored
@ -4,12 +4,14 @@ import "unicode/utf8"
|
||||
|
||||
// Graphemes implements an iterator over Unicode grapheme clusters, or
|
||||
// user-perceived characters. While iterating, it also provides information
|
||||
// about word boundaries, sentence boundaries, and line breaks.
|
||||
// about word boundaries, sentence boundaries, line breaks, and monospace
|
||||
// character widths.
|
||||
//
|
||||
// After constructing the class via [NewGraphemes] for a given string "str",
|
||||
// [Next] is called for every grapheme cluster in a loop until it returns false.
|
||||
// Inside the loop, information about the grapheme cluster as well as boundary
|
||||
// information is available via the various methods (see examples below).
|
||||
// [Graphemes.Next] is called for every grapheme cluster in a loop until it
|
||||
// returns false. Inside the loop, information about the grapheme cluster as
|
||||
// well as boundary information and character width is available via the various
|
||||
// methods (see examples below).
|
||||
//
|
||||
// Using this class to iterate over a string is convenient but it is much slower
|
||||
// than using this package's [Step] or [StepString] functions or any of the
|
||||
@ -28,18 +30,18 @@ type Graphemes struct {
|
||||
// string.
|
||||
offset int
|
||||
|
||||
// The current boundary information of the Step() parser.
|
||||
// The current boundary information of the [Step] parser.
|
||||
boundaries int
|
||||
|
||||
// The current state of the Step() parser.
|
||||
// The current state of the [Step] parser.
|
||||
state int
|
||||
}
|
||||
|
||||
// NewGraphemes returns a new grapheme cluster iterator.
|
||||
func NewGraphemes(s string) *Graphemes {
|
||||
func NewGraphemes(str string) *Graphemes {
|
||||
return &Graphemes{
|
||||
original: s,
|
||||
remaining: s,
|
||||
original: str,
|
||||
remaining: str,
|
||||
state: -1,
|
||||
}
|
||||
}
|
||||
@ -60,8 +62,8 @@ func (g *Graphemes) Next() bool {
|
||||
}
|
||||
|
||||
// Runes returns a slice of runes (code points) which corresponds to the current
|
||||
// grapheme cluster. If the iterator is already past the end or [Next] has not
|
||||
// yet been called, nil is returned.
|
||||
// grapheme cluster. If the iterator is already past the end or [Graphemes.Next]
|
||||
// has not yet been called, nil is returned.
|
||||
func (g *Graphemes) Runes() []rune {
|
||||
if g.state < 0 {
|
||||
return nil
|
||||
@ -70,15 +72,15 @@ func (g *Graphemes) Runes() []rune {
|
||||
}
|
||||
|
||||
// Str returns a substring of the original string which corresponds to the
|
||||
// current grapheme cluster. If the iterator is already past the end or [Next]
|
||||
// has not yet been called, an empty string is returned.
|
||||
// current grapheme cluster. If the iterator is already past the end or
|
||||
// [Graphemes.Next] has not yet been called, an empty string is returned.
|
||||
func (g *Graphemes) Str() string {
|
||||
return g.cluster
|
||||
}
|
||||
|
||||
// Bytes returns a byte slice which corresponds to the current grapheme cluster.
|
||||
// If the iterator is already past the end or [Next] has not yet been called,
|
||||
// nil is returned.
|
||||
// If the iterator is already past the end or [Graphemes.Next] has not yet been
|
||||
// called, nil is returned.
|
||||
func (g *Graphemes) Bytes() []byte {
|
||||
if g.state < 0 {
|
||||
return nil
|
||||
@ -90,8 +92,8 @@ func (g *Graphemes) Bytes() []byte {
|
||||
// positions into the original string. The first returned value "from" indexes
|
||||
// the first byte and the second returned value "to" indexes the first byte that
|
||||
// is not included anymore, i.e. str[from:to] is the current grapheme cluster of
|
||||
// the original string "str". If [Next] has not yet been called, both values are
|
||||
// 0. If the iterator is already past the end, both values are 1.
|
||||
// the original string "str". If [Graphemes.Next] has not yet been called, both
|
||||
// values are 0. If the iterator is already past the end, both values are 1.
|
||||
func (g *Graphemes) Positions() (int, int) {
|
||||
if g.state == -1 {
|
||||
return 0, 0
|
||||
@ -133,8 +135,16 @@ func (g *Graphemes) LineBreak() int {
|
||||
return g.boundaries & MaskLine
|
||||
}
|
||||
|
||||
// Width returns the monospace width of the current grapheme cluster.
|
||||
func (g *Graphemes) Width() int {
|
||||
if g.state < 0 {
|
||||
return 0
|
||||
}
|
||||
return g.boundaries >> ShiftWidth
|
||||
}
|
||||
|
||||
// Reset puts the iterator into its initial state such that the next call to
|
||||
// [Next] sets it to the first grapheme cluster again.
|
||||
// [Graphemes.Next] sets it to the first grapheme cluster again.
|
||||
func (g *Graphemes) Reset() {
|
||||
g.state = -1
|
||||
g.offset = 0
|
||||
@ -153,6 +163,10 @@ func GraphemeClusterCount(s string) (n int) {
|
||||
return
|
||||
}
|
||||
|
||||
// The number of bits the grapheme property must be shifted to make place for
|
||||
// grapheme states.
|
||||
const shiftGraphemePropState = 4
|
||||
|
||||
// FirstGraphemeCluster returns the first grapheme cluster found in the given
|
||||
// byte slice according to the rules of Unicode Standard Annex #29, Grapheme
|
||||
// Cluster Boundaries. This function can be called continuously to extract all
|
||||
@ -168,15 +182,15 @@ func GraphemeClusterCount(s string) (n int) {
|
||||
// "cluster" byte slice is the sub-slice of the input slice containing the
|
||||
// identified grapheme cluster.
|
||||
//
|
||||
// The returned width is the width of the grapheme cluster for most monospace
|
||||
// fonts where a value of 1 represents one character cell.
|
||||
//
|
||||
// Given an empty byte slice "b", the function returns nil values.
|
||||
//
|
||||
// While slightly less convenient than using the Graphemes class, this function
|
||||
// has much better performance and makes no allocations. It lends itself well to
|
||||
// large byte slices.
|
||||
//
|
||||
// The "reserved" return value is a placeholder for future functionality and may
|
||||
// be ignored for the time being.
|
||||
func FirstGraphemeCluster(b []byte, state int) (cluster, rest []byte, reserved, newState int) {
|
||||
func FirstGraphemeCluster(b []byte, state int) (cluster, rest []byte, width, newState int) {
|
||||
// An empty byte slice returns nothing.
|
||||
if len(b) == 0 {
|
||||
return
|
||||
@ -185,34 +199,60 @@ func FirstGraphemeCluster(b []byte, state int) (cluster, rest []byte, reserved,
|
||||
// Extract the first rune.
|
||||
r, length := utf8.DecodeRune(b)
|
||||
if len(b) <= length { // If we're already past the end, there is nothing else to parse.
|
||||
return b, nil, 0, grAny
|
||||
var prop int
|
||||
if state < 0 {
|
||||
prop = property(graphemeCodePoints, r)
|
||||
} else {
|
||||
prop = state >> shiftGraphemePropState
|
||||
}
|
||||
return b, nil, runeWidth(r, prop), grAny | (prop << shiftGraphemePropState)
|
||||
}
|
||||
|
||||
// If we don't know the state, determine it now.
|
||||
var firstProp int
|
||||
if state < 0 {
|
||||
state, _ = transitionGraphemeState(state, r)
|
||||
state, firstProp, _ = transitionGraphemeState(state, r)
|
||||
} else {
|
||||
firstProp = state >> shiftGraphemePropState
|
||||
}
|
||||
width += runeWidth(r, firstProp)
|
||||
|
||||
// Transition until we find a boundary.
|
||||
var boundary bool
|
||||
for {
|
||||
var (
|
||||
prop int
|
||||
boundary bool
|
||||
)
|
||||
|
||||
r, l := utf8.DecodeRune(b[length:])
|
||||
state, boundary = transitionGraphemeState(state, r)
|
||||
state, prop, boundary = transitionGraphemeState(state&maskGraphemeState, r)
|
||||
|
||||
if boundary {
|
||||
return b[:length], b[length:], 0, state
|
||||
return b[:length], b[length:], width, state | (prop << shiftGraphemePropState)
|
||||
}
|
||||
|
||||
if r == vs16 {
|
||||
width = 2
|
||||
} else if firstProp != prExtendedPictographic && firstProp != prRegionalIndicator && firstProp != prL {
|
||||
width += runeWidth(r, prop)
|
||||
} else if firstProp == prExtendedPictographic {
|
||||
if r == vs15 {
|
||||
width = 1
|
||||
} else {
|
||||
width = 2
|
||||
}
|
||||
}
|
||||
|
||||
length += l
|
||||
if len(b) <= length {
|
||||
return b, nil, 0, grAny
|
||||
return b, nil, width, grAny | (prop << shiftGraphemePropState)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FirstGraphemeClusterInString is like [FirstGraphemeCluster] but its input and
|
||||
// outputs are strings.
|
||||
func FirstGraphemeClusterInString(str string, state int) (cluster, rest string, reserved, newState int) {
|
||||
func FirstGraphemeClusterInString(str string, state int) (cluster, rest string, width, newState int) {
|
||||
// An empty string returns nothing.
|
||||
if len(str) == 0 {
|
||||
return
|
||||
@ -221,27 +261,53 @@ func FirstGraphemeClusterInString(str string, state int) (cluster, rest string,
|
||||
// Extract the first rune.
|
||||
r, length := utf8.DecodeRuneInString(str)
|
||||
if len(str) <= length { // If we're already past the end, there is nothing else to parse.
|
||||
return str, "", 0, grAny
|
||||
var prop int
|
||||
if state < 0 {
|
||||
prop = property(graphemeCodePoints, r)
|
||||
} else {
|
||||
prop = state >> shiftGraphemePropState
|
||||
}
|
||||
return str, "", runeWidth(r, prop), grAny | (prop << shiftGraphemePropState)
|
||||
}
|
||||
|
||||
// If we don't know the state, determine it now.
|
||||
var firstProp int
|
||||
if state < 0 {
|
||||
state, _ = transitionGraphemeState(state, r)
|
||||
state, firstProp, _ = transitionGraphemeState(state, r)
|
||||
} else {
|
||||
firstProp = state >> shiftGraphemePropState
|
||||
}
|
||||
width += runeWidth(r, firstProp)
|
||||
|
||||
// Transition until we find a boundary.
|
||||
var boundary bool
|
||||
for {
|
||||
var (
|
||||
prop int
|
||||
boundary bool
|
||||
)
|
||||
|
||||
r, l := utf8.DecodeRuneInString(str[length:])
|
||||
state, boundary = transitionGraphemeState(state, r)
|
||||
state, prop, boundary = transitionGraphemeState(state&maskGraphemeState, r)
|
||||
|
||||
if boundary {
|
||||
return str[:length], str[length:], 0, state
|
||||
return str[:length], str[length:], width, state | (prop << shiftGraphemePropState)
|
||||
}
|
||||
|
||||
if r == vs16 {
|
||||
width = 2
|
||||
} else if firstProp != prExtendedPictographic && firstProp != prRegionalIndicator && firstProp != prL {
|
||||
width += runeWidth(r, prop)
|
||||
} else if firstProp == prExtendedPictographic {
|
||||
if r == vs15 {
|
||||
width = 1
|
||||
} else {
|
||||
width = 2
|
||||
}
|
||||
}
|
||||
|
||||
length += l
|
||||
if len(str) <= length {
|
||||
return str, "", 0, grAny
|
||||
return str, "", width, grAny | (prop << shiftGraphemePropState)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
vendor/github.com/rivo/uniseg/graphemeproperties.go
generated
vendored
2
vendor/github.com/rivo/uniseg/graphemeproperties.go
generated
vendored
@ -7,7 +7,7 @@ package uniseg
|
||||
// and
|
||||
// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt
|
||||
// ("Extended_Pictographic" only)
|
||||
// on July 25, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// license agreement.
|
||||
var graphemeCodePoints = [][3]int{
|
||||
{0x0000, 0x0009, prControl}, // Cc [10] <control-0000>..<control-0009>
|
||||
|
37
vendor/github.com/rivo/uniseg/graphemerules.go
generated
vendored
37
vendor/github.com/rivo/uniseg/graphemerules.go
generated
vendored
@ -27,14 +27,14 @@ const (
|
||||
//
|
||||
// This map is queried as follows:
|
||||
//
|
||||
// 1. Find specific state + specific property. Stop if found.
|
||||
// 2. Find specific state + any property.
|
||||
// 3. Find any state + specific property.
|
||||
// 4. If only (2) or (3) (but not both) was found, stop.
|
||||
// 5. If both (2) and (3) were found, use state from (3) and breaking instruction
|
||||
// from the transition with the lower rule number, prefer (3) if rule numbers
|
||||
// are equal. Stop.
|
||||
// 6. Assume grAny and grBoundary.
|
||||
// 1. Find specific state + specific property. Stop if found.
|
||||
// 2. Find specific state + any property.
|
||||
// 3. Find any state + specific property.
|
||||
// 4. If only (2) or (3) (but not both) was found, stop.
|
||||
// 5. If both (2) and (3) were found, use state from (3) and breaking instruction
|
||||
// from the transition with the lower rule number, prefer (3) if rule numbers
|
||||
// are equal. Stop.
|
||||
// 6. Assume grAny and grBoundary.
|
||||
//
|
||||
// Unicode version 14.0.0.
|
||||
var grTransitions = map[[2]int][3]int{
|
||||
@ -92,22 +92,23 @@ var grTransitions = map[[2]int][3]int{
|
||||
}
|
||||
|
||||
// transitionGraphemeState determines the new state of the grapheme cluster
|
||||
// parser given the current state and the next code point. It also returns
|
||||
// whether a cluster boundary was detected.
|
||||
func transitionGraphemeState(state int, r rune) (newState int, boundary bool) {
|
||||
// parser given the current state and the next code point. It also returns the
|
||||
// code point's grapheme property (the value mapped by the [graphemeCodePoints]
|
||||
// table) and whether a cluster boundary was detected.
|
||||
func transitionGraphemeState(state int, r rune) (newState, prop int, boundary bool) {
|
||||
// Determine the property of the next character.
|
||||
nextProperty := property(graphemeCodePoints, r)
|
||||
prop = property(graphemeCodePoints, r)
|
||||
|
||||
// Find the applicable transition.
|
||||
transition, ok := grTransitions[[2]int{state, nextProperty}]
|
||||
transition, ok := grTransitions[[2]int{state, prop}]
|
||||
if ok {
|
||||
// We have a specific transition. We'll use it.
|
||||
return transition[0], transition[1] == grBoundary
|
||||
return transition[0], prop, transition[1] == grBoundary
|
||||
}
|
||||
|
||||
// No specific transition found. Try the less specific ones.
|
||||
transAnyProp, okAnyProp := grTransitions[[2]int{state, prAny}]
|
||||
transAnyState, okAnyState := grTransitions[[2]int{grAny, nextProperty}]
|
||||
transAnyState, okAnyState := grTransitions[[2]int{grAny, prop}]
|
||||
if okAnyProp && okAnyState {
|
||||
// Both apply. We'll use a mix (see comments for grTransitions).
|
||||
newState = transAnyState[0]
|
||||
@ -120,7 +121,7 @@ func transitionGraphemeState(state int, r rune) (newState int, boundary bool) {
|
||||
|
||||
if okAnyProp {
|
||||
// We only have a specific state.
|
||||
return transAnyProp[0], transAnyProp[1] == grBoundary
|
||||
return transAnyProp[0], prop, transAnyProp[1] == grBoundary
|
||||
// This branch will probably never be reached because okAnyState will
|
||||
// always be true given the current transition map. But we keep it here
|
||||
// for future modifications to the transition map where this may not be
|
||||
@ -129,9 +130,9 @@ func transitionGraphemeState(state int, r rune) (newState int, boundary bool) {
|
||||
|
||||
if okAnyState {
|
||||
// We only have a specific property.
|
||||
return transAnyState[0], transAnyState[1] == grBoundary
|
||||
return transAnyState[0], prop, transAnyState[1] == grBoundary
|
||||
}
|
||||
|
||||
// No known transition. GB999: Any ÷ Any.
|
||||
return grAny, true
|
||||
return grAny, prop, true
|
||||
}
|
||||
|
8
vendor/github.com/rivo/uniseg/line.go
generated
vendored
8
vendor/github.com/rivo/uniseg/line.go
generated
vendored
@ -13,7 +13,7 @@ import "unicode/utf8"
|
||||
//
|
||||
// The returned "segment" may not be broken into smaller parts, unless no other
|
||||
// breaking opportunities present themselves, in which case you may break by
|
||||
// grapheme clusters (using the FirstGraphemeCluster() function to determine the
|
||||
// grapheme clusters (using the [FirstGraphemeCluster] function to determine the
|
||||
// grapheme clusters).
|
||||
//
|
||||
// The "mustBreak" flag indicates whether you MUST break the line after the
|
||||
@ -42,7 +42,7 @@ import "unicode/utf8"
|
||||
//
|
||||
// Note also that this algorithm may break within grapheme clusters. This is
|
||||
// addressed in Section 8.2 Example 6 of UAX #14. To avoid this, you can use
|
||||
// the Step() function instead.
|
||||
// the [Step] function instead.
|
||||
func FirstLineSegment(b []byte, state int) (segment, rest []byte, mustBreak bool, newState int) {
|
||||
// An empty byte slice returns nothing.
|
||||
if len(b) == 0 {
|
||||
@ -114,7 +114,9 @@ func FirstLineSegmentInString(str string, state int) (segment, rest string, must
|
||||
}
|
||||
|
||||
// HasTrailingLineBreak returns true if the last rune in the given byte slice is
|
||||
// one of the hard line break code points as defined in LB4 and LB5 of UAX #14.
|
||||
// one of the hard line break code points defined in LB4 and LB5 of [UAX #14].
|
||||
//
|
||||
// [UAX #14]: https://www.unicode.org/reports/tr14/#Algorithm
|
||||
func HasTrailingLineBreak(b []byte) bool {
|
||||
r, _ := utf8.DecodeLastRune(b)
|
||||
property, _ := propertyWithGenCat(lineBreakCodePoints, r)
|
||||
|
5
vendor/github.com/rivo/uniseg/lineproperties.go
generated
vendored
5
vendor/github.com/rivo/uniseg/lineproperties.go
generated
vendored
@ -4,7 +4,10 @@ package uniseg
|
||||
|
||||
// lineBreakCodePoints are taken from
|
||||
// https://www.unicode.org/Public/14.0.0/ucd/LineBreak.txt
|
||||
// on July 25, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// and
|
||||
// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt
|
||||
// ("Extended_Pictographic" only)
|
||||
// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// license agreement.
|
||||
var lineBreakCodePoints = [][4]int{
|
||||
{0x0000, 0x0008, prCM, gcCc}, // [9] <control-0000>..<control-0008>
|
||||
|
13
vendor/github.com/rivo/uniseg/properties.go
generated
vendored
13
vendor/github.com/rivo/uniseg/properties.go
generated
vendored
@ -3,9 +3,9 @@ package uniseg
|
||||
// The Unicode properties as used in the various parsers. Only the ones needed
|
||||
// in the context of this package are included.
|
||||
const (
|
||||
prXX = 0 // Same as prAny.
|
||||
prAny = iota // prAny must be 0.
|
||||
prPrepend
|
||||
prXX = 0 // Same as prAny.
|
||||
prAny = iota // prAny must be 0.
|
||||
prPrepend // Grapheme properties must come first, to reduce the number of bits stored in the state vector.
|
||||
prCR
|
||||
prLF
|
||||
prControl
|
||||
@ -86,6 +86,7 @@ const (
|
||||
prW
|
||||
prH
|
||||
prF
|
||||
prEmojiPresentation
|
||||
)
|
||||
|
||||
// Unicode General Categories. Only the ones needed in the context of this
|
||||
@ -124,6 +125,12 @@ const (
|
||||
gcCo
|
||||
)
|
||||
|
||||
// Special code points.
|
||||
const (
|
||||
vs15 = 0xfe0e // Variation Selector-15 (text presentation)
|
||||
vs16 = 0xfe0f // Variation Selector-16 (emoji presentation)
|
||||
)
|
||||
|
||||
// propertySearch performs a binary search on a property slice and returns the
|
||||
// entry whose range (start = first array element, end = second array element)
|
||||
// includes r, or an array of 0's if no such entry was found.
|
||||
|
5
vendor/github.com/rivo/uniseg/sentenceproperties.go
generated
vendored
5
vendor/github.com/rivo/uniseg/sentenceproperties.go
generated
vendored
@ -4,7 +4,10 @@ package uniseg
|
||||
|
||||
// sentenceBreakCodePoints are taken from
|
||||
// https://www.unicode.org/Public/14.0.0/ucd/auxiliary/SentenceBreakProperty.txt
|
||||
// on July 25, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// and
|
||||
// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt
|
||||
// ("Extended_Pictographic" only)
|
||||
// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// license agreement.
|
||||
var sentenceBreakCodePoints = [][3]int{
|
||||
{0x0009, 0x0009, prSp}, // Cc <control-0009>
|
||||
|
112
vendor/github.com/rivo/uniseg/step.go
generated
vendored
112
vendor/github.com/rivo/uniseg/step.go
generated
vendored
@ -2,31 +2,37 @@ package uniseg
|
||||
|
||||
import "unicode/utf8"
|
||||
|
||||
// The bit masks used to extract boundary information returned by the Step()
|
||||
// function.
|
||||
// The bit masks used to extract boundary information returned by [Step].
|
||||
const (
|
||||
MaskLine = 3
|
||||
MaskWord = 4
|
||||
MaskSentence = 8
|
||||
)
|
||||
|
||||
// The bit positions by which boundary flags are shifted by the Step() function.
|
||||
// This must correspond to the Mask constants.
|
||||
// The number of bits to shift the boundary information returned by [Step] to
|
||||
// obtain the monospace width of the grapheme cluster.
|
||||
const ShiftWidth = 4
|
||||
|
||||
// The bit positions by which boundary flags are shifted by the [Step] function.
|
||||
// These must correspond to the Mask constants.
|
||||
const (
|
||||
shiftWord = 2
|
||||
shiftSentence = 3
|
||||
// shiftwWidth is ShiftWidth above. No mask as these are always the remaining bits.
|
||||
)
|
||||
|
||||
// The bit positions by which states are shifted by the Step() function. These
|
||||
// The bit positions by which states are shifted by the [Step] function. These
|
||||
// values must ensure state values defined for each of the boundary algorithms
|
||||
// don't overlap (and that they all still fit in a single int).
|
||||
// don't overlap (and that they all still fit in a single int). These must
|
||||
// correspond to the Mask constants.
|
||||
const (
|
||||
shiftWordState = 4
|
||||
shiftSentenceState = 9
|
||||
shiftLineState = 13
|
||||
shiftPropState = 21 // No mask as these are always the remaining bits.
|
||||
)
|
||||
|
||||
// The bit mask used to extract the state returned by the Step() function, after
|
||||
// The bit mask used to extract the state returned by the [Step] function, after
|
||||
// shifting. These values must correspond to the shift constants.
|
||||
const (
|
||||
maskGraphemeState = 0xf
|
||||
@ -37,10 +43,11 @@ const (
|
||||
|
||||
// Step returns the first grapheme cluster (user-perceived character) found in
|
||||
// the given byte slice. It also returns information about the boundary between
|
||||
// that grapheme cluster and the one following it. There are three types of
|
||||
// boundary information: word boundaries, sentence boundaries, and line breaks.
|
||||
// This function is therefore a combination of FirstGraphemeCluster(),
|
||||
// FirstWord(), FirstSentence(), and FirstLineSegment().
|
||||
// that grapheme cluster and the one following it as well as the monospace width
|
||||
// of the grapheme cluster. There are three types of boundary information: word
|
||||
// boundaries, sentence boundaries, and line breaks. This function is therefore
|
||||
// a combination of [FirstGraphemeCluster], [FirstWord], [FirstSentence], and
|
||||
// [FirstLineSegment].
|
||||
//
|
||||
// The "boundaries" return value can be evaluated as follows:
|
||||
//
|
||||
@ -54,6 +61,8 @@ const (
|
||||
// boundary.
|
||||
// - boundaries&MaskLine == LineCanBreak: You may or may not break the line at
|
||||
// the boundary.
|
||||
// - boundaries >> ShiftWidth: The width of the grapheme cluster for most
|
||||
// monospace fonts where a value of 1 represents one character cell.
|
||||
//
|
||||
// This function can be called continuously to extract all grapheme clusters
|
||||
// from a byte slice, as illustrated in the examples below.
|
||||
@ -87,14 +96,20 @@ func Step(b []byte, state int) (cluster, rest []byte, boundaries int, newState i
|
||||
// Extract the first rune.
|
||||
r, length := utf8.DecodeRune(b)
|
||||
if len(b) <= length { // If we're already past the end, there is nothing else to parse.
|
||||
return b, nil, LineMustBreak | (1 << shiftWord) | (1 << shiftSentence), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState)
|
||||
var prop int
|
||||
if state < 0 {
|
||||
prop = property(graphemeCodePoints, r)
|
||||
} else {
|
||||
prop = state >> shiftPropState
|
||||
}
|
||||
return b, nil, LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (runeWidth(r, prop) << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState) | (prop << shiftPropState)
|
||||
}
|
||||
|
||||
// If we don't know the state, determine it now.
|
||||
var graphemeState, wordState, sentenceState, lineState int
|
||||
var graphemeState, wordState, sentenceState, lineState, firstProp int
|
||||
remainder := b[length:]
|
||||
if state < 0 {
|
||||
graphemeState, _ = transitionGraphemeState(state, r)
|
||||
graphemeState, firstProp, _ = transitionGraphemeState(state, r)
|
||||
wordState, _ = transitionWordBreakState(state, r, remainder, "")
|
||||
sentenceState, _ = transitionSentenceBreakState(state, r, remainder, "")
|
||||
lineState, _ = transitionLineBreakState(state, r, remainder, "")
|
||||
@ -103,36 +118,51 @@ func Step(b []byte, state int) (cluster, rest []byte, boundaries int, newState i
|
||||
wordState = (state >> shiftWordState) & maskWordState
|
||||
sentenceState = (state >> shiftSentenceState) & maskSentenceState
|
||||
lineState = (state >> shiftLineState) & maskLineState
|
||||
firstProp = state >> shiftPropState
|
||||
}
|
||||
|
||||
// Transition until we find a grapheme cluster boundary.
|
||||
var (
|
||||
graphemeBoundary, wordBoundary, sentenceBoundary bool
|
||||
lineBreak int
|
||||
)
|
||||
width := runeWidth(r, firstProp)
|
||||
for {
|
||||
var (
|
||||
graphemeBoundary, wordBoundary, sentenceBoundary bool
|
||||
lineBreak, prop int
|
||||
)
|
||||
|
||||
r, l := utf8.DecodeRune(remainder)
|
||||
remainder = b[length+l:]
|
||||
|
||||
graphemeState, graphemeBoundary = transitionGraphemeState(graphemeState, r)
|
||||
graphemeState, prop, graphemeBoundary = transitionGraphemeState(graphemeState, r)
|
||||
wordState, wordBoundary = transitionWordBreakState(wordState, r, remainder, "")
|
||||
sentenceState, sentenceBoundary = transitionSentenceBreakState(sentenceState, r, remainder, "")
|
||||
lineState, lineBreak = transitionLineBreakState(lineState, r, remainder, "")
|
||||
|
||||
if graphemeBoundary {
|
||||
boundary := lineBreak
|
||||
boundary := lineBreak | (width << ShiftWidth)
|
||||
if wordBoundary {
|
||||
boundary |= 1 << shiftWord
|
||||
}
|
||||
if sentenceBoundary {
|
||||
boundary |= 1 << shiftSentence
|
||||
}
|
||||
return b[:length], b[length:], boundary, graphemeState | (wordState << shiftWordState) | (sentenceState << shiftSentenceState) | (lineState << shiftLineState)
|
||||
return b[:length], b[length:], boundary, graphemeState | (wordState << shiftWordState) | (sentenceState << shiftSentenceState) | (lineState << shiftLineState) | (prop << shiftPropState)
|
||||
}
|
||||
|
||||
if r == vs16 {
|
||||
width = 2
|
||||
} else if firstProp != prExtendedPictographic && firstProp != prRegionalIndicator && firstProp != prL {
|
||||
width += runeWidth(r, prop)
|
||||
} else if firstProp == prExtendedPictographic {
|
||||
if r == vs15 {
|
||||
width = 1
|
||||
} else {
|
||||
width = 2
|
||||
}
|
||||
}
|
||||
|
||||
length += l
|
||||
if len(b) <= length {
|
||||
return b, nil, LineMustBreak | (1 << shiftWord) | (1 << shiftSentence), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState)
|
||||
return b, nil, LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (width << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState) | (prop << shiftPropState)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -147,14 +177,15 @@ func StepString(str string, state int) (cluster, rest string, boundaries int, ne
|
||||
// Extract the first rune.
|
||||
r, length := utf8.DecodeRuneInString(str)
|
||||
if len(str) <= length { // If we're already past the end, there is nothing else to parse.
|
||||
return str, "", LineMustBreak | (1 << shiftWord) | (1 << shiftSentence), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState)
|
||||
prop := property(graphemeCodePoints, r)
|
||||
return str, "", LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (runeWidth(r, prop) << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState)
|
||||
}
|
||||
|
||||
// If we don't know the state, determine it now.
|
||||
var graphemeState, wordState, sentenceState, lineState int
|
||||
var graphemeState, wordState, sentenceState, lineState, firstProp int
|
||||
remainder := str[length:]
|
||||
if state < 0 {
|
||||
graphemeState, _ = transitionGraphemeState(state, r)
|
||||
graphemeState, firstProp, _ = transitionGraphemeState(state, r)
|
||||
wordState, _ = transitionWordBreakState(state, r, nil, remainder)
|
||||
sentenceState, _ = transitionSentenceBreakState(state, r, nil, remainder)
|
||||
lineState, _ = transitionLineBreakState(state, r, nil, remainder)
|
||||
@ -163,36 +194,51 @@ func StepString(str string, state int) (cluster, rest string, boundaries int, ne
|
||||
wordState = (state >> shiftWordState) & maskWordState
|
||||
sentenceState = (state >> shiftSentenceState) & maskSentenceState
|
||||
lineState = (state >> shiftLineState) & maskLineState
|
||||
firstProp = state >> shiftPropState
|
||||
}
|
||||
|
||||
// Transition until we find a grapheme cluster boundary.
|
||||
var (
|
||||
graphemeBoundary, wordBoundary, sentenceBoundary bool
|
||||
lineBreak int
|
||||
)
|
||||
width := runeWidth(r, firstProp)
|
||||
for {
|
||||
var (
|
||||
graphemeBoundary, wordBoundary, sentenceBoundary bool
|
||||
lineBreak, prop int
|
||||
)
|
||||
|
||||
r, l := utf8.DecodeRuneInString(remainder)
|
||||
remainder = str[length+l:]
|
||||
|
||||
graphemeState, graphemeBoundary = transitionGraphemeState(graphemeState, r)
|
||||
graphemeState, prop, graphemeBoundary = transitionGraphemeState(graphemeState, r)
|
||||
wordState, wordBoundary = transitionWordBreakState(wordState, r, nil, remainder)
|
||||
sentenceState, sentenceBoundary = transitionSentenceBreakState(sentenceState, r, nil, remainder)
|
||||
lineState, lineBreak = transitionLineBreakState(lineState, r, nil, remainder)
|
||||
|
||||
if graphemeBoundary {
|
||||
boundary := lineBreak
|
||||
boundary := lineBreak | (width << ShiftWidth)
|
||||
if wordBoundary {
|
||||
boundary |= 1 << shiftWord
|
||||
}
|
||||
if sentenceBoundary {
|
||||
boundary |= 1 << shiftSentence
|
||||
}
|
||||
return str[:length], str[length:], boundary, graphemeState | (wordState << shiftWordState) | (sentenceState << shiftSentenceState) | (lineState << shiftLineState)
|
||||
return str[:length], str[length:], boundary, graphemeState | (wordState << shiftWordState) | (sentenceState << shiftSentenceState) | (lineState << shiftLineState) | (prop << shiftPropState)
|
||||
}
|
||||
|
||||
if r == vs16 {
|
||||
width = 2
|
||||
} else if firstProp != prExtendedPictographic && firstProp != prRegionalIndicator && firstProp != prL {
|
||||
width += runeWidth(r, prop)
|
||||
} else if firstProp == prExtendedPictographic {
|
||||
if r == vs15 {
|
||||
width = 1
|
||||
} else {
|
||||
width = 2
|
||||
}
|
||||
}
|
||||
|
||||
length += l
|
||||
if len(str) <= length {
|
||||
return str, "", LineMustBreak | (1 << shiftWord) | (1 << shiftSentence), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState)
|
||||
return str, "", LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (width << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState) | (prop << shiftPropState)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
54
vendor/github.com/rivo/uniseg/width.go
generated
vendored
Normal file
54
vendor/github.com/rivo/uniseg/width.go
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
package uniseg
|
||||
|
||||
// runeWidth returns the monospace width for the given rune. The provided
|
||||
// grapheme property is a value mapped by the [graphemeCodePoints] table.
|
||||
//
|
||||
// Every rune has a width of 1, except for runes with the following properties
|
||||
// (evaluated in this order):
|
||||
//
|
||||
// - Control, CR, LF, Extend, ZWJ: Width of 0
|
||||
// - \u2e3a, TWO-EM DASH: Width of 3
|
||||
// - \u2e3b, THREE-EM DASH: Width of 4
|
||||
// - East-Asian width Fullwidth and Wide: Width of 2 (Ambiguous and Neutral
|
||||
// have a width of 1)
|
||||
// - Regional Indicator: Width of 2
|
||||
// - Extended Pictographic: Width of 2, unless Emoji Presentation is "No".
|
||||
func runeWidth(r rune, graphemeProperty int) int {
|
||||
switch graphemeProperty {
|
||||
case prControl, prCR, prLF, prExtend, prZWJ:
|
||||
return 0
|
||||
case prRegionalIndicator:
|
||||
return 2
|
||||
case prExtendedPictographic:
|
||||
if property(emojiPresentation, r) == prEmojiPresentation {
|
||||
return 2
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
switch r {
|
||||
case 0x2e3a:
|
||||
return 3
|
||||
case 0x2e3b:
|
||||
return 4
|
||||
}
|
||||
|
||||
switch property(eastAsianWidth, r) {
|
||||
case prW, prF:
|
||||
return 2
|
||||
}
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
// StringWidth returns the monospace width for the given string, that is, the
|
||||
// number of same-size cells to be occupied by the string.
|
||||
func StringWidth(s string) (width int) {
|
||||
state := -1
|
||||
for len(s) > 0 {
|
||||
var w int
|
||||
_, s, w, state = FirstGraphemeClusterInString(s, state)
|
||||
width += w
|
||||
}
|
||||
return
|
||||
}
|
4
vendor/github.com/rivo/uniseg/wordproperties.go
generated
vendored
4
vendor/github.com/rivo/uniseg/wordproperties.go
generated
vendored
@ -7,7 +7,7 @@ package uniseg
|
||||
// and
|
||||
// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt
|
||||
// ("Extended_Pictographic" only)
|
||||
// on July 25, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode
|
||||
// license agreement.
|
||||
var workBreakCodePoints = [][3]int{
|
||||
{0x000A, 0x000A, prLF}, // Cc <control-000A>
|
||||
@ -624,8 +624,8 @@ var workBreakCodePoints = [][3]int{
|
||||
{0x212A, 0x212D, prALetter}, // L& [4] KELVIN SIGN..BLACK-LETTER CAPITAL C
|
||||
{0x212F, 0x2134, prALetter}, // L& [6] SCRIPT SMALL E..SCRIPT SMALL O
|
||||
{0x2135, 0x2138, prALetter}, // Lo [4] ALEF SYMBOL..DALET SYMBOL
|
||||
{0x2139, 0x2139, prALetter}, // L& INFORMATION SOURCE
|
||||
{0x2139, 0x2139, prExtendedPictographic}, // E0.6 [1] (ℹ️) information
|
||||
{0x2139, 0x2139, prALetter}, // L& INFORMATION SOURCE
|
||||
{0x213C, 0x213F, prALetter}, // L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI
|
||||
{0x2145, 0x2149, prALetter}, // L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J
|
||||
{0x214E, 0x214E, prALetter}, // L& TURNED SMALL F
|
||||
|
5
vendor/golang.org/x/sys/cpu/cpu_arm64.go
generated
vendored
5
vendor/golang.org/x/sys/cpu/cpu_arm64.go
generated
vendored
@ -6,7 +6,10 @@ package cpu
|
||||
|
||||
import "runtime"
|
||||
|
||||
const cacheLineSize = 64
|
||||
// cacheLineSize is used to prevent false sharing of cache lines.
|
||||
// We choose 128 because Apple Silicon, a.k.a. M1, has 128-byte cache line size.
|
||||
// It doesn't cost much and is much more future-proof.
|
||||
const cacheLineSize = 128
|
||||
|
||||
func initOptions() {
|
||||
options = []option{
|
||||
|
10
vendor/golang.org/x/sys/plan9/syscall.go
generated
vendored
10
vendor/golang.org/x/sys/plan9/syscall.go
generated
vendored
@ -29,8 +29,6 @@ import (
|
||||
"bytes"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
// ByteSliceFromString returns a NUL-terminated slice of bytes
|
||||
@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
|
||||
ptr = unsafe.Pointer(uintptr(ptr) + 1)
|
||||
}
|
||||
|
||||
var s []byte
|
||||
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
h.Data = unsafe.Pointer(p)
|
||||
h.Len = n
|
||||
h.Cap = n
|
||||
|
||||
return string(s)
|
||||
return string(unsafe.Slice(p, n))
|
||||
}
|
||||
|
||||
// Single-word zero for use when we need a valid pointer to 0 bytes.
|
||||
|
20
vendor/golang.org/x/sys/unix/ioctl_linux.go
generated
vendored
20
vendor/golang.org/x/sys/unix/ioctl_linux.go
generated
vendored
@ -4,9 +4,7 @@
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
import "unsafe"
|
||||
|
||||
// IoctlRetInt performs an ioctl operation specified by req on a device
|
||||
// associated with opened file descriptor fd, and returns a non-negative
|
||||
@ -217,3 +215,19 @@ func IoctlKCMAttach(fd int, info KCMAttach) error {
|
||||
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
|
||||
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
|
||||
}
|
||||
|
||||
// IoctlLoopGetStatus64 gets the status of the loop device associated with the
|
||||
// file descriptor fd using the LOOP_GET_STATUS64 operation.
|
||||
func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) {
|
||||
var value LoopInfo64
|
||||
if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &value, nil
|
||||
}
|
||||
|
||||
// IoctlLoopSetStatus64 sets the status of the loop device associated with the
|
||||
// file descriptor fd using the LOOP_SET_STATUS64 operation.
|
||||
func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {
|
||||
return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value))
|
||||
}
|
||||
|
9
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
9
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
@ -156,10 +156,10 @@ openbsd_amd64)
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
openbsd_arm)
|
||||
mkasm="go run mkasm.go"
|
||||
mkerrors="$mkerrors"
|
||||
mksyscall="go run mksyscall.go -l32 -openbsd -arm"
|
||||
mksyscall="go run mksyscall.go -l32 -openbsd -arm -libc"
|
||||
mksysctl="go run mksysctl_openbsd.go"
|
||||
mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
@ -214,11 +214,6 @@ esac
|
||||
if [ "$GOOSARCH" == "aix_ppc64" ]; then
|
||||
# aix/ppc64 script generates files instead of writing to stdin.
|
||||
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
|
||||
elif [ "$GOOS" == "darwin" ]; then
|
||||
# 1.12 and later, syscalls via libSystem
|
||||
echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
|
||||
# 1.13 and later, syscalls via libSystem (including syscallPtr)
|
||||
echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
|
||||
elif [ "$GOOS" == "illumos" ]; then
|
||||
# illumos code generation requires a --illumos switch
|
||||
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
|
||||
|
27
vendor/golang.org/x/sys/unix/str.go
generated
vendored
27
vendor/golang.org/x/sys/unix/str.go
generated
vendored
@ -1,27 +0,0 @@
|
||||
// Copyright 2009 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.
|
||||
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package unix
|
||||
|
||||
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
||||
if val < 0 {
|
||||
return "-" + uitoa(uint(-val))
|
||||
}
|
||||
return uitoa(uint(val))
|
||||
}
|
||||
|
||||
func uitoa(val uint) string {
|
||||
var buf [32]byte // big enough for int64
|
||||
i := len(buf) - 1
|
||||
for val >= 10 {
|
||||
buf[i] = byte(val%10 + '0')
|
||||
i--
|
||||
val /= 10
|
||||
}
|
||||
buf[i] = byte(val + '0')
|
||||
return string(buf[i:])
|
||||
}
|
10
vendor/golang.org/x/sys/unix/syscall.go
generated
vendored
10
vendor/golang.org/x/sys/unix/syscall.go
generated
vendored
@ -29,8 +29,6 @@ import (
|
||||
"bytes"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
// ByteSliceFromString returns a NUL-terminated slice of bytes
|
||||
@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
|
||||
ptr = unsafe.Pointer(uintptr(ptr) + 1)
|
||||
}
|
||||
|
||||
var s []byte
|
||||
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
h.Data = unsafe.Pointer(p)
|
||||
h.Len = n
|
||||
h.Cap = n
|
||||
|
||||
return string(s)
|
||||
return string(unsafe.Slice(p, n))
|
||||
}
|
||||
|
||||
// Single-word zero for use when we need a valid pointer to 0 bytes.
|
||||
|
32
vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
generated
vendored
32
vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
generated
vendored
@ -1,32 +0,0 @@
|
||||
// Copyright 2019 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.
|
||||
|
||||
//go:build darwin && go1.12 && !go1.13
|
||||
// +build darwin,go1.12,!go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const _SYS_GETDIRENTRIES64 = 344
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// To implement this using libSystem we'd need syscall_syscallPtr for
|
||||
// fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
|
||||
// back to raw syscalls for this func on Go 1.12.
|
||||
var p unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
p = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
p = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
return n, errnoErr(e1)
|
||||
}
|
||||
return n, nil
|
||||
}
|
108
vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
generated
vendored
108
vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
generated
vendored
@ -1,108 +0,0 @@
|
||||
// Copyright 2019 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.
|
||||
|
||||
//go:build darwin && go1.13
|
||||
// +build darwin,go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
//sys closedir(dir uintptr) (err error)
|
||||
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
||||
|
||||
func fdopendir(fd int) (dir uintptr, err error) {
|
||||
r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
|
||||
dir = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_fdopendir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
|
||||
// We store the number of entries to skip in the seek
|
||||
// offset of fd. See issue #31368.
|
||||
// It's not the full required semantics, but should handle the case
|
||||
// of calling Getdirentries or ReadDirent repeatedly.
|
||||
// It won't handle assigning the results of lseek to *basep, or handle
|
||||
// the directory being edited underfoot.
|
||||
skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
// We need to duplicate the incoming file descriptor
|
||||
// because the caller expects to retain control of it, but
|
||||
// fdopendir expects to take control of its argument.
|
||||
// Just Dup'ing the file descriptor is not enough, as the
|
||||
// result shares underlying state. Use Openat to make a really
|
||||
// new file descriptor referring to the same directory.
|
||||
fd2, err := Openat(fd, ".", O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
d, err := fdopendir(fd2)
|
||||
if err != nil {
|
||||
Close(fd2)
|
||||
return 0, err
|
||||
}
|
||||
defer closedir(d)
|
||||
|
||||
var cnt int64
|
||||
for {
|
||||
var entry Dirent
|
||||
var entryp *Dirent
|
||||
e := readdir_r(d, &entry, &entryp)
|
||||
if e != 0 {
|
||||
return n, errnoErr(e)
|
||||
}
|
||||
if entryp == nil {
|
||||
break
|
||||
}
|
||||
if skip > 0 {
|
||||
skip--
|
||||
cnt++
|
||||
continue
|
||||
}
|
||||
|
||||
reclen := int(entry.Reclen)
|
||||
if reclen > len(buf) {
|
||||
// Not enough room. Return for now.
|
||||
// The counter will let us know where we should start up again.
|
||||
// Note: this strategy for suspending in the middle and
|
||||
// restarting is O(n^2) in the length of the directory. Oh well.
|
||||
break
|
||||
}
|
||||
|
||||
// Copy entry into return buffer.
|
||||
var s []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
hdr.Data = unsafe.Pointer(&entry)
|
||||
hdr.Cap = reclen
|
||||
hdr.Len = reclen
|
||||
copy(buf, s)
|
||||
|
||||
buf = buf[reclen:]
|
||||
n += reclen
|
||||
cnt++
|
||||
}
|
||||
// Set the seek offset of the input fd to record
|
||||
// how many files we've already returned.
|
||||
_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
return n, nil
|
||||
}
|
90
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
90
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -19,6 +19,96 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sys closedir(dir uintptr) (err error)
|
||||
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
||||
|
||||
func fdopendir(fd int) (dir uintptr, err error) {
|
||||
r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
|
||||
dir = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_fdopendir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
|
||||
// We store the number of entries to skip in the seek
|
||||
// offset of fd. See issue #31368.
|
||||
// It's not the full required semantics, but should handle the case
|
||||
// of calling Getdirentries or ReadDirent repeatedly.
|
||||
// It won't handle assigning the results of lseek to *basep, or handle
|
||||
// the directory being edited underfoot.
|
||||
skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
// We need to duplicate the incoming file descriptor
|
||||
// because the caller expects to retain control of it, but
|
||||
// fdopendir expects to take control of its argument.
|
||||
// Just Dup'ing the file descriptor is not enough, as the
|
||||
// result shares underlying state. Use Openat to make a really
|
||||
// new file descriptor referring to the same directory.
|
||||
fd2, err := Openat(fd, ".", O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
d, err := fdopendir(fd2)
|
||||
if err != nil {
|
||||
Close(fd2)
|
||||
return 0, err
|
||||
}
|
||||
defer closedir(d)
|
||||
|
||||
var cnt int64
|
||||
for {
|
||||
var entry Dirent
|
||||
var entryp *Dirent
|
||||
e := readdir_r(d, &entry, &entryp)
|
||||
if e != 0 {
|
||||
return n, errnoErr(e)
|
||||
}
|
||||
if entryp == nil {
|
||||
break
|
||||
}
|
||||
if skip > 0 {
|
||||
skip--
|
||||
cnt++
|
||||
continue
|
||||
}
|
||||
|
||||
reclen := int(entry.Reclen)
|
||||
if reclen > len(buf) {
|
||||
// Not enough room. Return for now.
|
||||
// The counter will let us know where we should start up again.
|
||||
// Note: this strategy for suspending in the middle and
|
||||
// restarting is O(n^2) in the length of the directory. Oh well.
|
||||
break
|
||||
}
|
||||
|
||||
// Copy entry into return buffer.
|
||||
s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
|
||||
copy(buf, s)
|
||||
|
||||
buf = buf[reclen:]
|
||||
n += reclen
|
||||
cnt++
|
||||
}
|
||||
// Set the seek offset of the input fd to record
|
||||
// how many files we've already returned.
|
||||
_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
return n, nil
|
||||
}
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
|
2
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
generated
vendored
@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
||||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
2
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
generated
vendored
@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
||||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
generated
vendored
@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
2
vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
generated
vendored
@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
30
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
30
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -13,6 +13,7 @@ package unix
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"strconv"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
@ -233,7 +234,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error {
|
||||
func Futimes(fd int, tv []Timeval) (err error) {
|
||||
// Believe it or not, this is the best we can do on Linux
|
||||
// (and is what glibc does).
|
||||
return Utimes("/proc/self/fd/"+itoa(fd), tv)
|
||||
return Utimes("/proc/self/fd/"+strconv.Itoa(fd), tv)
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
@ -1891,17 +1892,28 @@ func PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uint
|
||||
return int(ret), nil
|
||||
}
|
||||
|
||||
// issue 1435.
|
||||
// On linux Setuid and Setgid only affects the current thread, not the process.
|
||||
// This does not match what most callers expect so we must return an error
|
||||
// here rather than letting the caller think that the call succeeded.
|
||||
|
||||
func Setuid(uid int) (err error) {
|
||||
return EOPNOTSUPP
|
||||
return syscall.Setuid(uid)
|
||||
}
|
||||
|
||||
func Setgid(uid int) (err error) {
|
||||
return EOPNOTSUPP
|
||||
func Setgid(gid int) (err error) {
|
||||
return syscall.Setgid(gid)
|
||||
}
|
||||
|
||||
func Setreuid(ruid, euid int) (err error) {
|
||||
return syscall.Setreuid(ruid, euid)
|
||||
}
|
||||
|
||||
func Setregid(rgid, egid int) (err error) {
|
||||
return syscall.Setregid(rgid, egid)
|
||||
}
|
||||
|
||||
func Setresuid(ruid, euid, suid int) (err error) {
|
||||
return syscall.Setresuid(ruid, euid, suid)
|
||||
}
|
||||
|
||||
func Setresgid(rgid, egid, sgid int) (err error) {
|
||||
return syscall.Setresgid(rgid, egid, sgid)
|
||||
}
|
||||
|
||||
// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
@ -41,10 +41,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
@ -46,11 +46,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
@ -62,10 +62,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
@ -39,11 +39,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
generated
vendored
@ -34,10 +34,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
@ -37,11 +37,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
@ -32,10 +32,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
generated
vendored
@ -34,10 +34,6 @@ import (
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
@ -34,11 +34,7 @@ package unix
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
@ -38,11 +38,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
@ -34,11 +34,7 @@ import (
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
@ -31,11 +31,7 @@ package unix
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
generated
vendored
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (openbsd && 386) || (openbsd && amd64) || (openbsd && arm64)
|
||||
// +build openbsd,386 openbsd,amd64 openbsd,arm64
|
||||
//go:build (openbsd && 386) || (openbsd && amd64) || (openbsd && arm) || (openbsd && arm64)
|
||||
// +build openbsd,386 openbsd,amd64 openbsd,arm openbsd,arm64
|
||||
|
||||
package unix
|
||||
|
||||
|
111
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
111
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@ -750,8 +750,8 @@ type EventPort struct {
|
||||
// we should handle things gracefully. To do so, we need to keep an extra
|
||||
// reference to the cookie around until the event is processed
|
||||
// thus the otherwise seemingly extraneous "cookies" map
|
||||
// The key of this map is a pointer to the corresponding &fCookie.cookie
|
||||
cookies map[*interface{}]*fileObjCookie
|
||||
// The key of this map is a pointer to the corresponding fCookie
|
||||
cookies map[*fileObjCookie]struct{}
|
||||
}
|
||||
|
||||
// PortEvent is an abstraction of the port_event C struct.
|
||||
@ -778,7 +778,7 @@ func NewEventPort() (*EventPort, error) {
|
||||
port: port,
|
||||
fds: make(map[uintptr]*fileObjCookie),
|
||||
paths: make(map[string]*fileObjCookie),
|
||||
cookies: make(map[*interface{}]*fileObjCookie),
|
||||
cookies: make(map[*fileObjCookie]struct{}),
|
||||
}
|
||||
return e, nil
|
||||
}
|
||||
@ -799,6 +799,7 @@ func (e *EventPort) Close() error {
|
||||
}
|
||||
e.fds = nil
|
||||
e.paths = nil
|
||||
e.cookies = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -826,17 +827,16 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
|
||||
if _, found := e.paths[path]; found {
|
||||
return fmt.Errorf("%v is already associated with this Event Port", path)
|
||||
}
|
||||
fobj, err := createFileObj(path, stat)
|
||||
fCookie, err := createFileObjCookie(path, stat, cookie)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fCookie := &fileObjCookie{fobj, cookie}
|
||||
_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
|
||||
_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fCookie.fobj)), events, (*byte)(unsafe.Pointer(fCookie)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
e.paths[path] = fCookie
|
||||
e.cookies[&fCookie.cookie] = fCookie
|
||||
e.cookies[fCookie] = struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -858,7 +858,7 @@ func (e *EventPort) DissociatePath(path string) error {
|
||||
if err == nil {
|
||||
// dissociate was successful, safe to delete the cookie
|
||||
fCookie := e.paths[path]
|
||||
delete(e.cookies, &fCookie.cookie)
|
||||
delete(e.cookies, fCookie)
|
||||
}
|
||||
delete(e.paths, path)
|
||||
return err
|
||||
@ -871,13 +871,16 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
|
||||
if _, found := e.fds[fd]; found {
|
||||
return fmt.Errorf("%v is already associated with this Event Port", fd)
|
||||
}
|
||||
fCookie := &fileObjCookie{nil, cookie}
|
||||
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
|
||||
fCookie, err := createFileObjCookie("", nil, cookie)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(fCookie)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
e.fds[fd] = fCookie
|
||||
e.cookies[&fCookie.cookie] = fCookie
|
||||
e.cookies[fCookie] = struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -896,27 +899,31 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
|
||||
if err == nil {
|
||||
// dissociate was successful, safe to delete the cookie
|
||||
fCookie := e.fds[fd]
|
||||
delete(e.cookies, &fCookie.cookie)
|
||||
delete(e.cookies, fCookie)
|
||||
}
|
||||
delete(e.fds, fd)
|
||||
return err
|
||||
}
|
||||
|
||||
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
|
||||
fobj := new(fileObj)
|
||||
bs, err := ByteSliceFromString(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
func createFileObjCookie(name string, stat os.FileInfo, cookie interface{}) (*fileObjCookie, error) {
|
||||
fCookie := new(fileObjCookie)
|
||||
fCookie.cookie = cookie
|
||||
if name != "" && stat != nil {
|
||||
fCookie.fobj = new(fileObj)
|
||||
bs, err := ByteSliceFromString(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fCookie.fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
|
||||
s := stat.Sys().(*syscall.Stat_t)
|
||||
fCookie.fobj.Atim.Sec = s.Atim.Sec
|
||||
fCookie.fobj.Atim.Nsec = s.Atim.Nsec
|
||||
fCookie.fobj.Mtim.Sec = s.Mtim.Sec
|
||||
fCookie.fobj.Mtim.Nsec = s.Mtim.Nsec
|
||||
fCookie.fobj.Ctim.Sec = s.Ctim.Sec
|
||||
fCookie.fobj.Ctim.Nsec = s.Ctim.Nsec
|
||||
}
|
||||
fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
|
||||
s := stat.Sys().(*syscall.Stat_t)
|
||||
fobj.Atim.Sec = s.Atim.Sec
|
||||
fobj.Atim.Nsec = s.Atim.Nsec
|
||||
fobj.Mtim.Sec = s.Mtim.Sec
|
||||
fobj.Mtim.Nsec = s.Mtim.Nsec
|
||||
fobj.Ctim.Sec = s.Ctim.Sec
|
||||
fobj.Ctim.Nsec = s.Ctim.Nsec
|
||||
return fobj, nil
|
||||
return fCookie, nil
|
||||
}
|
||||
|
||||
// GetOne wraps port_get(3c) and returns a single PortEvent.
|
||||
@ -929,44 +936,50 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
|
||||
p := new(PortEvent)
|
||||
e.mu.Lock()
|
||||
defer e.mu.Unlock()
|
||||
e.peIntToExt(pe, p)
|
||||
err = e.peIntToExt(pe, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
|
||||
// NOTE: Always call this function while holding the e.mu mutex
|
||||
func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
|
||||
func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) error {
|
||||
if e.cookies == nil {
|
||||
return fmt.Errorf("this EventPort is already closed")
|
||||
}
|
||||
peExt.Events = peInt.Events
|
||||
peExt.Source = peInt.Source
|
||||
cookie := (*interface{})(unsafe.Pointer(peInt.User))
|
||||
peExt.Cookie = *cookie
|
||||
fCookie := (*fileObjCookie)(unsafe.Pointer(peInt.User))
|
||||
_, found := e.cookies[fCookie]
|
||||
|
||||
if !found {
|
||||
panic("unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254")
|
||||
}
|
||||
peExt.Cookie = fCookie.cookie
|
||||
delete(e.cookies, fCookie)
|
||||
|
||||
switch peInt.Source {
|
||||
case PORT_SOURCE_FD:
|
||||
delete(e.cookies, cookie)
|
||||
peExt.Fd = uintptr(peInt.Object)
|
||||
// Only remove the fds entry if it exists and this cookie matches
|
||||
if fobj, ok := e.fds[peExt.Fd]; ok {
|
||||
if &fobj.cookie == cookie {
|
||||
if fobj == fCookie {
|
||||
delete(e.fds, peExt.Fd)
|
||||
}
|
||||
}
|
||||
case PORT_SOURCE_FILE:
|
||||
if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
|
||||
// Use our stashed reference rather than using unsafe on what we got back
|
||||
// the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
|
||||
peExt.fobj = fCookie.fobj
|
||||
} else {
|
||||
panic("mismanaged memory")
|
||||
}
|
||||
delete(e.cookies, cookie)
|
||||
peExt.fobj = fCookie.fobj
|
||||
peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
|
||||
// Only remove the paths entry if it exists and this cookie matches
|
||||
if fobj, ok := e.paths[peExt.Path]; ok {
|
||||
if &fobj.cookie == cookie {
|
||||
if fobj == fCookie {
|
||||
delete(e.paths, peExt.Path)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Pending wraps port_getn(3c) and returns how many events are pending.
|
||||
@ -990,7 +1003,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
|
||||
got := uint32(min)
|
||||
max := uint32(len(s))
|
||||
var err error
|
||||
ps := make([]portEvent, max, max)
|
||||
ps := make([]portEvent, max)
|
||||
_, err = port_getn(e.port, &ps[0], max, &got, timeout)
|
||||
// got will be trustworthy with ETIME, but not any other error.
|
||||
if err != nil && err != ETIME {
|
||||
@ -998,8 +1011,18 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
|
||||
}
|
||||
e.mu.Lock()
|
||||
defer e.mu.Unlock()
|
||||
valid := 0
|
||||
for i := 0; i < int(got); i++ {
|
||||
e.peIntToExt(&ps[i], &s[i])
|
||||
err2 := e.peIntToExt(&ps[i], &s[i])
|
||||
if err2 != nil {
|
||||
if valid == 0 && err == nil {
|
||||
// If err2 is the only error and there are no valid events
|
||||
// to return, return it to the caller.
|
||||
err = err2
|
||||
}
|
||||
break
|
||||
}
|
||||
valid = i + 1
|
||||
}
|
||||
return int(got), err
|
||||
return valid, err
|
||||
}
|
||||
|
8
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
8
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@ -13,8 +13,6 @@ import (
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -117,11 +115,7 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
|
||||
}
|
||||
|
||||
// Use unsafe to convert addr into a []byte.
|
||||
var b []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||
hdr.Data = unsafe.Pointer(addr)
|
||||
hdr.Cap = length
|
||||
hdr.Len = length
|
||||
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)
|
||||
|
||||
// Register mapping in m and return it.
|
||||
p := &b[cap(b)-1]
|
||||
|
13
vendor/golang.org/x/sys/unix/sysvshm_unix.go
generated
vendored
13
vendor/golang.org/x/sys/unix/sysvshm_unix.go
generated
vendored
@ -7,11 +7,7 @@
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
import "unsafe"
|
||||
|
||||
// SysvShmAttach attaches the Sysv shared memory segment associated with the
|
||||
// shared memory identifier id.
|
||||
@ -34,12 +30,7 @@ func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
|
||||
}
|
||||
|
||||
// Use unsafe to convert addr into a []byte.
|
||||
// TODO: convert to unsafe.Slice once we can assume Go 1.17
|
||||
var b []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||
hdr.Data = unsafe.Pointer(addr)
|
||||
hdr.Cap = int(info.Segsz)
|
||||
hdr.Len = int(info.Segsz)
|
||||
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))
|
||||
return b, nil
|
||||
}
|
||||
|
||||
|
95
vendor/golang.org/x/sys/unix/xattr_bsd.go
generated
vendored
95
vendor/golang.org/x/sys/unix/xattr_bsd.go
generated
vendored
@ -160,13 +160,12 @@ func Lremovexattr(link string, attr string) (err error) {
|
||||
}
|
||||
|
||||
func Listxattr(file string, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
// FreeBSD won't allow you to list xattrs from multiple namespaces
|
||||
s := 0
|
||||
s, pos := 0, 0
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
|
||||
stmp, e := ListxattrNS(file, nsid, dest[pos:])
|
||||
|
||||
/* Errors accessing system attrs are ignored so that
|
||||
* we can implement the Linux-like behavior of omitting errors that
|
||||
@ -175,66 +174,102 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
|
||||
* Linux will still error if we ask for user attributes on a file that
|
||||
* we don't have read permissions on, so don't ignore those errors
|
||||
*/
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
} else if e != nil {
|
||||
if e != nil {
|
||||
if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
}
|
||||
return s, e
|
||||
}
|
||||
|
||||
s += stmp
|
||||
destsiz -= s
|
||||
if destsiz < 0 {
|
||||
destsiz = 0
|
||||
pos = s
|
||||
if pos > destsiz {
|
||||
pos = destsiz
|
||||
}
|
||||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
|
||||
if e != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func Flistxattr(fd int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s := 0
|
||||
s, pos := 0, 0
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
} else if e != nil {
|
||||
stmp, e := FlistxattrNS(fd, nsid, dest[pos:])
|
||||
|
||||
if e != nil {
|
||||
if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
}
|
||||
return s, e
|
||||
}
|
||||
|
||||
s += stmp
|
||||
destsiz -= s
|
||||
if destsiz < 0 {
|
||||
destsiz = 0
|
||||
pos = s
|
||||
if pos > destsiz {
|
||||
pos = destsiz
|
||||
}
|
||||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
|
||||
if e != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func Llistxattr(link string, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s := 0
|
||||
s, pos := 0, 0
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
} else if e != nil {
|
||||
stmp, e := LlistxattrNS(link, nsid, dest[pos:])
|
||||
|
||||
if e != nil {
|
||||
if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
}
|
||||
return s, e
|
||||
}
|
||||
|
||||
s += stmp
|
||||
destsiz -= s
|
||||
if destsiz < 0 {
|
||||
destsiz = 0
|
||||
pos = s
|
||||
if pos > destsiz {
|
||||
pos = destsiz
|
||||
}
|
||||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
|
||||
if e != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return s, nil
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
generated
vendored
@ -1,40 +0,0 @@
|
||||
// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && amd64 && go1.13
|
||||
// +build darwin,amd64,go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
generated
vendored
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
generated
vendored
@ -1,25 +0,0 @@
|
||||
// go run mkasm.go darwin amd64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.13
|
||||
// +build go1.13
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
32
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
32
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
@ -1,8 +1,8 @@
|
||||
// go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
|
||||
// go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && amd64 && go1.12
|
||||
// +build darwin,amd64,go1.12
|
||||
//go:build darwin && amd64
|
||||
// +build darwin,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]int32) (err error) {
|
||||
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
21
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
21
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
@ -1,11 +1,14 @@
|
||||
// go run mkasm.go darwin amd64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.12
|
||||
// +build go1.12
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
|
||||
@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe(SB)
|
||||
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
generated
vendored
@ -1,40 +0,0 @@
|
||||
// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && arm64 && go1.13
|
||||
// +build darwin,arm64,go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
generated
vendored
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
generated
vendored
@ -1,25 +0,0 @@
|
||||
// go run mkasm.go darwin arm64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.13
|
||||
// +build go1.13
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
32
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
32
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
@ -1,8 +1,8 @@
|
||||
// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
||||
// go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && arm64 && go1.12
|
||||
// +build darwin,arm64,go1.12
|
||||
//go:build darwin && arm64
|
||||
// +build darwin,arm64
|
||||
|
||||
package unix
|
||||
|
||||
@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]int32) (err error) {
|
||||
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
21
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
21
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
@ -1,11 +1,14 @@
|
||||
// go run mkasm.go darwin arm64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.12
|
||||
// +build go1.12
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
|
||||
@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe(SB)
|
||||
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
@ -287,46 +287,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
|
||||
n = int(r0)
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
@ -334,36 +334,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -374,16 +344,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
@ -412,46 +412,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
@ -289,36 +289,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -329,16 +299,6 @@ func setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
generated
vendored
@ -223,46 +223,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
generated
vendored
@ -308,46 +308,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
generated
vendored
@ -269,36 +269,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -309,16 +279,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
@ -319,36 +319,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -359,16 +329,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
|
||||
n = int64(r0)
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
@ -329,36 +329,6 @@ func setfsuid(uid int) (prev int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -369,16 +339,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
798
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
generated
vendored
798
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
generated
vendored
File diff suppressed because it is too large
Load Diff
796
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
generated
vendored
Normal file
796
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
generated
vendored
Normal file
@ -0,0 +1,796 @@
|
||||
// go run mkasm.go openbsd arm
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
|
||||
GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgroups(SB)
|
||||
|
||||
GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB)
|
||||
|
||||
TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_wait4(SB)
|
||||
|
||||
GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB)
|
||||
|
||||
TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_accept(SB)
|
||||
|
||||
GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB)
|
||||
|
||||
TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_bind(SB)
|
||||
|
||||
GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB)
|
||||
|
||||
TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_connect(SB)
|
||||
|
||||
GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB)
|
||||
|
||||
TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_socket(SB)
|
||||
|
||||
GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockopt(SB)
|
||||
|
||||
GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsockopt(SB)
|
||||
|
||||
GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpeername(SB)
|
||||
|
||||
GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockname(SB)
|
||||
|
||||
GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shutdown(SB)
|
||||
|
||||
GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_socketpair(SB)
|
||||
|
||||
GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB)
|
||||
|
||||
TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvfrom(SB)
|
||||
|
||||
GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendto(SB)
|
||||
|
||||
GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB)
|
||||
|
||||
TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvmsg(SB)
|
||||
|
||||
GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendmsg(SB)
|
||||
|
||||
GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
|
||||
GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB)
|
||||
|
||||
TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
|
||||
GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB)
|
||||
|
||||
TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
|
||||
GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB)
|
||||
|
||||
TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
|
||||
GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB)
|
||||
|
||||
TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_madvise(SB)
|
||||
|
||||
GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlock(SB)
|
||||
|
||||
GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlockall(SB)
|
||||
|
||||
GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mprotect(SB)
|
||||
|
||||
GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB)
|
||||
|
||||
TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_msync(SB)
|
||||
|
||||
GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlock(SB)
|
||||
|
||||
GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
|
||||
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe2(SB)
|
||||
|
||||
GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getdents(SB)
|
||||
|
||||
GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getcwd(SB)
|
||||
|
||||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sysctl(SB)
|
||||
|
||||
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ppoll(SB)
|
||||
|
||||
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB)
|
||||
|
||||
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_access(SB)
|
||||
|
||||
GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB)
|
||||
|
||||
TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_adjtime(SB)
|
||||
|
||||
GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chdir(SB)
|
||||
|
||||
GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chflags(SB)
|
||||
|
||||
GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chmod(SB)
|
||||
|
||||
GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
|
||||
GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
|
||||
GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB)
|
||||
|
||||
TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
|
||||
GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup(SB)
|
||||
|
||||
GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup2(SB)
|
||||
|
||||
GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup3(SB)
|
||||
|
||||
GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB)
|
||||
|
||||
TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_exit(SB)
|
||||
|
||||
GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_faccessat(SB)
|
||||
|
||||
GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchdir(SB)
|
||||
|
||||
GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchflags(SB)
|
||||
|
||||
GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmod(SB)
|
||||
|
||||
GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmodat(SB)
|
||||
|
||||
GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchown(SB)
|
||||
|
||||
GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchownat(SB)
|
||||
|
||||
GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_flock(SB)
|
||||
|
||||
GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fpathconf(SB)
|
||||
|
||||
GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstat(SB)
|
||||
|
||||
GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatat(SB)
|
||||
|
||||
GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatfs(SB)
|
||||
|
||||
GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsync(SB)
|
||||
|
||||
GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ftruncate(SB)
|
||||
|
||||
GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getegid(SB)
|
||||
|
||||
GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_geteuid(SB)
|
||||
|
||||
GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgid(SB)
|
||||
|
||||
GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgid(SB)
|
||||
|
||||
GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgrp(SB)
|
||||
|
||||
GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpid(SB)
|
||||
|
||||
GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getppid(SB)
|
||||
|
||||
GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpriority(SB)
|
||||
|
||||
GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrlimit(SB)
|
||||
|
||||
GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrtable(SB)
|
||||
|
||||
GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrusage(SB)
|
||||
|
||||
GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsid(SB)
|
||||
|
||||
GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_gettimeofday(SB)
|
||||
|
||||
GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getuid(SB)
|
||||
|
||||
GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_issetugid(SB)
|
||||
|
||||
GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
|
||||
GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_kqueue(SB)
|
||||
|
||||
GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_lchown(SB)
|
||||
|
||||
GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_link(SB)
|
||||
|
||||
GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB)
|
||||
|
||||
TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_linkat(SB)
|
||||
|
||||
GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_listen(SB)
|
||||
|
||||
GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_lstat(SB)
|
||||
|
||||
GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdir(SB)
|
||||
|
||||
GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdirat(SB)
|
||||
|
||||
GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkfifo(SB)
|
||||
|
||||
GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkfifoat(SB)
|
||||
|
||||
GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mknod(SB)
|
||||
|
||||
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mknodat(SB)
|
||||
|
||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_nanosleep(SB)
|
||||
|
||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB)
|
||||
|
||||
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_open(SB)
|
||||
|
||||
GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB)
|
||||
|
||||
TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_openat(SB)
|
||||
|
||||
GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pathconf(SB)
|
||||
|
||||
GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pread(SB)
|
||||
|
||||
GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pwrite(SB)
|
||||
|
||||
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)
|
||||
|
||||
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_read(SB)
|
||||
|
||||
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlink(SB)
|
||||
|
||||
GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlinkat(SB)
|
||||
|
||||
GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_rename(SB)
|
||||
|
||||
GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB)
|
||||
|
||||
TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_renameat(SB)
|
||||
|
||||
GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_revoke(SB)
|
||||
|
||||
GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB)
|
||||
|
||||
TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_rmdir(SB)
|
||||
|
||||
GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_lseek(SB)
|
||||
|
||||
GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB)
|
||||
|
||||
TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_select(SB)
|
||||
|
||||
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setegid(SB)
|
||||
|
||||
GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_seteuid(SB)
|
||||
|
||||
GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgid(SB)
|
||||
|
||||
GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setlogin(SB)
|
||||
|
||||
GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpgid(SB)
|
||||
|
||||
GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpriority(SB)
|
||||
|
||||
GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setregid(SB)
|
||||
|
||||
GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setreuid(SB)
|
||||
|
||||
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setresgid(SB)
|
||||
|
||||
GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setresuid(SB)
|
||||
|
||||
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setrlimit(SB)
|
||||
|
||||
GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setrtable(SB)
|
||||
|
||||
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsid(SB)
|
||||
|
||||
GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_settimeofday(SB)
|
||||
|
||||
GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setuid(SB)
|
||||
|
||||
GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_stat(SB)
|
||||
|
||||
GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_statfs(SB)
|
||||
|
||||
GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB)
|
||||
|
||||
TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlink(SB)
|
||||
|
||||
GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlinkat(SB)
|
||||
|
||||
GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sync(SB)
|
||||
|
||||
GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_truncate(SB)
|
||||
|
||||
GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB)
|
||||
|
||||
TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_umask(SB)
|
||||
|
||||
GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlink(SB)
|
||||
|
||||
GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlinkat(SB)
|
||||
|
||||
GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_unmount(SB)
|
||||
|
||||
GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB)
|
||||
|
||||
TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_write(SB)
|
||||
|
||||
GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mmap(SB)
|
||||
|
||||
GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_munmap(SB)
|
||||
|
||||
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimensat(SB)
|
||||
|
||||
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)
|
1
vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
generated
vendored
@ -6,6 +6,7 @@
|
||||
|
||||
package unix
|
||||
|
||||
// Deprecated: Use libc wrappers instead of direct syscalls.
|
||||
const (
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); }
|
||||
SYS_FORK = 2 // { int sys_fork(void); }
|
||||
|
17
vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
generated
vendored
17
vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
generated
vendored
@ -294,7 +294,7 @@ type PtraceLwpInfoStruct struct {
|
||||
Flags int32
|
||||
Sigmask Sigset_t
|
||||
Siglist Sigset_t
|
||||
Siginfo __Siginfo
|
||||
Siginfo __PtraceSiginfo
|
||||
Tdname [20]int8
|
||||
Child_pid int32
|
||||
Syscall_code uint32
|
||||
@ -312,6 +312,17 @@ type __Siginfo struct {
|
||||
Value [4]byte
|
||||
_ [32]byte
|
||||
}
|
||||
type __PtraceSiginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
Code int32
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Status int32
|
||||
Addr uintptr
|
||||
Value [4]byte
|
||||
_ [32]byte
|
||||
}
|
||||
|
||||
type Sigset_t struct {
|
||||
Val [4]uint32
|
||||
@ -350,8 +361,8 @@ type FpExtendedPrecision struct{}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
Addr *byte
|
||||
Offs uintptr
|
||||
Addr uintptr
|
||||
Len uint32
|
||||
}
|
||||
|
||||
|
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
generated
vendored
@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
|
||||
Flags int32
|
||||
Sigmask Sigset_t
|
||||
Siglist Sigset_t
|
||||
Siginfo __Siginfo
|
||||
Siginfo __PtraceSiginfo
|
||||
Tdname [20]int8
|
||||
Child_pid int32
|
||||
Syscall_code uint32
|
||||
@ -310,6 +310,18 @@ type __Siginfo struct {
|
||||
_ [40]byte
|
||||
}
|
||||
|
||||
type __PtraceSiginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
Code int32
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Status int32
|
||||
Addr uintptr
|
||||
Value [8]byte
|
||||
_ [40]byte
|
||||
}
|
||||
|
||||
type Sigset_t struct {
|
||||
Val [4]uint32
|
||||
}
|
||||
@ -354,8 +366,8 @@ type FpExtendedPrecision struct{}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
Addr *byte
|
||||
Offs uintptr
|
||||
Addr uintptr
|
||||
Len uint64
|
||||
}
|
||||
|
||||
|
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
generated
vendored
@ -293,7 +293,7 @@ type PtraceLwpInfoStruct struct {
|
||||
Flags int32
|
||||
Sigmask Sigset_t
|
||||
Siglist Sigset_t
|
||||
Siginfo __Siginfo
|
||||
Siginfo __PtraceSiginfo
|
||||
Tdname [20]int8
|
||||
Child_pid int32
|
||||
Syscall_code uint32
|
||||
@ -312,6 +312,18 @@ type __Siginfo struct {
|
||||
_ [32]byte
|
||||
}
|
||||
|
||||
type __PtraceSiginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
Code int32
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Status int32
|
||||
Addr uintptr
|
||||
Value [4]byte
|
||||
_ [32]byte
|
||||
}
|
||||
|
||||
type Sigset_t struct {
|
||||
Val [4]uint32
|
||||
}
|
||||
@ -337,8 +349,8 @@ type FpExtendedPrecision struct {
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
Addr *byte
|
||||
Offs uintptr
|
||||
Addr uintptr
|
||||
Len uint32
|
||||
}
|
||||
|
||||
|
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
generated
vendored
@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
|
||||
Flags int32
|
||||
Sigmask Sigset_t
|
||||
Siglist Sigset_t
|
||||
Siginfo __Siginfo
|
||||
Siginfo __PtraceSiginfo
|
||||
Tdname [20]int8
|
||||
Child_pid int32
|
||||
Syscall_code uint32
|
||||
@ -310,6 +310,18 @@ type __Siginfo struct {
|
||||
_ [40]byte
|
||||
}
|
||||
|
||||
type __PtraceSiginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
Code int32
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Status int32
|
||||
Addr uintptr
|
||||
Value [8]byte
|
||||
_ [40]byte
|
||||
}
|
||||
|
||||
type Sigset_t struct {
|
||||
Val [4]uint32
|
||||
}
|
||||
@ -334,8 +346,8 @@ type FpExtendedPrecision struct{}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
Addr *byte
|
||||
Offs uintptr
|
||||
Addr uintptr
|
||||
Len uint64
|
||||
}
|
||||
|
||||
|
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
generated
vendored
@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
|
||||
Flags int32
|
||||
Sigmask Sigset_t
|
||||
Siglist Sigset_t
|
||||
Siginfo __Siginfo
|
||||
Siginfo __PtraceSiginfo
|
||||
Tdname [20]int8
|
||||
Child_pid int32
|
||||
Syscall_code uint32
|
||||
@ -310,6 +310,18 @@ type __Siginfo struct {
|
||||
_ [40]byte
|
||||
}
|
||||
|
||||
type __PtraceSiginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
Code int32
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Status int32
|
||||
Addr uintptr
|
||||
Value [8]byte
|
||||
_ [40]byte
|
||||
}
|
||||
|
||||
type Sigset_t struct {
|
||||
Val [4]uint32
|
||||
}
|
||||
@ -335,8 +347,8 @@ type FpExtendedPrecision struct{}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
Addr *byte
|
||||
Offs uintptr
|
||||
Addr uintptr
|
||||
Len uint64
|
||||
}
|
||||
|
||||
|
2
vendor/golang.org/x/sys/windows/setupapi_windows.go
generated
vendored
2
vendor/golang.org/x/sys/windows/setupapi_windows.go
generated
vendored
@ -296,7 +296,7 @@ const (
|
||||
// Flag to indicate that the sorting from the INF file should be used.
|
||||
DI_INF_IS_SORTED DI_FLAGS = 0x00008000
|
||||
|
||||
// Flag to indicate that only the the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
|
||||
// Flag to indicate that only the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
|
||||
DI_ENUMSINGLEINF DI_FLAGS = 0x00010000
|
||||
|
||||
// Flag that prevents ConfigMgr from removing/re-enumerating devices during device
|
||||
|
10
vendor/golang.org/x/sys/windows/syscall.go
generated
vendored
10
vendor/golang.org/x/sys/windows/syscall.go
generated
vendored
@ -30,8 +30,6 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
// ByteSliceFromString returns a NUL-terminated slice of bytes
|
||||
@ -83,13 +81,7 @@ func BytePtrToString(p *byte) string {
|
||||
ptr = unsafe.Pointer(uintptr(ptr) + 1)
|
||||
}
|
||||
|
||||
var s []byte
|
||||
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
h.Data = unsafe.Pointer(p)
|
||||
h.Len = n
|
||||
h.Cap = n
|
||||
|
||||
return string(s)
|
||||
return string(unsafe.Slice(p, n))
|
||||
}
|
||||
|
||||
// Single-word zero for use when we need a valid pointer to 0 bytes.
|
||||
|
17
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
17
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@ -138,13 +138,7 @@ func UTF16PtrToString(p *uint16) string {
|
||||
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
|
||||
}
|
||||
|
||||
var s []uint16
|
||||
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
h.Data = unsafe.Pointer(p)
|
||||
h.Len = n
|
||||
h.Cap = n
|
||||
|
||||
return string(utf16.Decode(s))
|
||||
return string(utf16.Decode(unsafe.Slice(p, n)))
|
||||
}
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
@ -364,6 +358,15 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
|
||||
//sys GetActiveProcessorCount(groupNumber uint16) (ret uint32)
|
||||
//sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
|
||||
//sys EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows
|
||||
//sys EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) = user32.EnumChildWindows
|
||||
//sys GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) = user32.GetClassNameW
|
||||
//sys GetDesktopWindow() (hwnd HWND) = user32.GetDesktopWindow
|
||||
//sys GetForegroundWindow() (hwnd HWND) = user32.GetForegroundWindow
|
||||
//sys IsWindow(hwnd HWND) (isWindow bool) = user32.IsWindow
|
||||
//sys IsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode
|
||||
//sys IsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible
|
||||
//sys GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo
|
||||
|
||||
// Volume Management Functions
|
||||
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user