summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-01-09 23:24:56 +0100
committerDimitri Sokolyuk <demon@dim13.org>2017-01-09 23:24:56 +0100
commit60ba872a93e2faff36f75c0971ee35fae16a18ef (patch)
tree863c49f751233b46ed944c41f5dc403204be6a72
parenta7f8ca73c0f36149683282d8b653af4e6cc023d5 (diff)
cleanup
-rw-r--r--main.go1
-rw-r--r--tek.go10
2 files changed, 6 insertions, 5 deletions
diff --git a/main.go b/main.go
index fabd317..db6a67e 100644
--- a/main.go
+++ b/main.go
@@ -29,7 +29,6 @@ func steps(n int) []float64 {
}
func plot(out Plotter, patches []Patch) {
- out.Clear()
st := steps(5)
for _, p := range patches {
for _, u := range st {
diff --git a/tek.go b/tek.go
index d0909e1..cce0beb 100644
--- a/tek.go
+++ b/tek.go
@@ -8,7 +8,10 @@ import (
const (
FF = 12
ESC = 27
- GS = 29
+ FS = 28 // point plot
+ GS = 29 // graph and dark vector
+ RS = 30 // incremental plot
+ US = 31 // alpha mode
)
type Out struct {
@@ -43,14 +46,13 @@ func (o Out) Clear() {
func (o Out) Enable() {
if o.xterm {
o.escString("[?38h")
- o.Clear()
}
+ o.Clear()
}
func (o Out) Disable() {
+ o.writeByte(US) // Text mode
if o.xterm {
- //o.escString("[?38l")
- o.writeByte(31) // Text mode
o.writeByte(ESC, 3) // VT Page
}
}