diff options
| author | Andrew Wilkins <axwalk@gmail.com> | 2015-05-23 15:16:09 +0000 |
|---|---|---|
| committer | Andrew Wilkins <axwalk@gmail.com> | 2015-05-23 15:16:09 +0000 |
| commit | 4ffbbd7da7fe8a896cbf3f4d6004d6a1625cb31e (patch) | |
| tree | 1f1989cda6c5bf4d1629b8db424db2a59fb6b0a3 /llgo/third_party/liner/bsdinput.go | |
| parent | c681c3d8904ea5dc833011f86c4469e277376c41 (diff) | |
| download | bcm5719-llvm-4ffbbd7da7fe8a896cbf3f4d6004d6a1625cb31e.tar.gz bcm5719-llvm-4ffbbd7da7fe8a896cbf3f4d6004d6a1625cb31e.zip | |
[llgo] cmd/llgoi: use line editor
Summary:
This diff adds line-editing to llgoi, by
vendoring and using github.com/peterh/liner.
I have only implemented the basics here;
follow-ups will come later to add persisted
history, and completion,
Reviewers: pcc
Reviewed By: pcc
Subscribers: axw, llvm-commits
Differential Revision: http://reviews.llvm.org/D9811
llvm-svn: 238100
Diffstat (limited to 'llgo/third_party/liner/bsdinput.go')
| -rw-r--r-- | llgo/third_party/liner/bsdinput.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/llgo/third_party/liner/bsdinput.go b/llgo/third_party/liner/bsdinput.go new file mode 100644 index 00000000000..4b552d44d96 --- /dev/null +++ b/llgo/third_party/liner/bsdinput.go @@ -0,0 +1,39 @@ +// +build openbsd freebsd netbsd + +package liner + +import "syscall" + +const ( + getTermios = syscall.TIOCGETA + setTermios = syscall.TIOCSETA +) + +const ( + // Input flags + inpck = 0x010 + istrip = 0x020 + icrnl = 0x100 + ixon = 0x200 + + // Output flags + opost = 0x1 + + // Control flags + cs8 = 0x300 + + // Local flags + isig = 0x080 + icanon = 0x100 + iexten = 0x400 +) + +type termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]byte + Ispeed int32 + Ospeed int32 +} |

