update termbox-go dependency

This commit is contained in:
Kevin Schoon 2018-03-03 20:16:21 +00:00
parent f03ef13268
commit 24f8cd8cf0
3 changed files with 9 additions and 5 deletions

2
Gopkg.lock generated
View File

@ -65,7 +65,7 @@
branch = "master"
name = "github.com/nsf/termbox-go"
packages = ["."]
revision = "88b7b944be8bc8d8ec6195fca97c5869ba20f99d"
revision = "e2050e41c8847748ec5288741c0b19a8cb26d084"
[[projects]]
branch = "master"

View File

@ -1,3 +1,5 @@
[![GoDoc](https://godoc.org/github.com/nsf/termbox-go?status.svg)](http://godoc.org/github.com/nsf/termbox-go)
## Termbox
Termbox is a library that provides a minimalistic API which allows the programmer to write text-based user interfaces. The library is crossplatform and has both terminal-based implementations on *nix operating systems and a winapi console based implementation for windows operating systems. The basic idea is an abstraction of the greatest common subset of features available on all major terminals and other terminal-like APIs in a minimalistic fashion. Small API means it is easy to implement, test, maintain and learn it, that's what makes the termbox a distinct library in its area.
@ -34,6 +36,3 @@ There are also some interesting projects using termbox-go:
- [pinger](https://github.com/hirose31/pinger) helps you to monitor numerous hosts using ICMP ECHO_REQUEST.
- [vixl44](https://github.com/sebashwa/vixl44) lets you create pixel art inside your terminal using vim movements
- [zterm](https://github.com/varunrau/zterm) is a typing game inspired by http://zty.pe/
### API reference
[godoc.org/github.com/nsf/termbox-go](http://godoc.org/github.com/nsf/termbox-go)

View File

@ -151,11 +151,16 @@ func setup_term() (err error) {
return
}
number_sec_len := int16(2)
if header[0] == 542 { // doc says it should be octal 0542, but what I see it terminfo files is 542, learn to program please... thank you..
number_sec_len = 4
}
if (header[1]+header[2])%2 != 0 {
// old quirk to align everything on word boundaries
header[2] += 1
}
str_offset = ti_header_length + header[1] + header[2] + 2*header[3]
str_offset = ti_header_length + header[1] + header[2] + number_sec_len*header[3]
table_offset = str_offset + 2*header[4]
keys = make([]string, 0xFFFF-key_min)