Skip to content

Instantly share code, notes, and snippets.

@quarnster
Created February 12, 2014 21:34
Show Gist options
  • Save quarnster/8964993 to your computer and use it in GitHub Desktop.
Save quarnster/8964993 to your computer and use it in GitHub Desktop.
Entering '3rdparty/bundles/GoSublime'
diff --git a/something_borrowed/src/gosublime.org/gocode/package.go b/something_borrowed/src/gosublime.org/gocode/package.go
index 9ac11dd..3d2b01f 100644
--- a/something_borrowed/src/gosublime.org/gocode/package.go
+++ b/something_borrowed/src/gosublime.org/gocode/package.go
@@ -3,13 +3,13 @@ package gocode
import (
"bytes"
"errors"
- "strings"
"fmt"
"go/ast"
"go/token"
"io"
"os"
"strconv"
+ "strings"
"text/scanner"
)
Entering '3rdparty/bundles/TextMate-Themes'
Entering '3rdparty/bundles/Vintageous'
Entering '3rdparty/bundles/c.tmbundle'
Entering '3rdparty/bundles/go.tmbundle'
Entering '3rdparty/bundles/monokai.tmbundle'
Entering '3rdparty/bundles/property-list.tmbundle'
Entering '3rdparty/bundles/themes/soda'
Entering '3rdparty/bundles/xml.tmbundle'
Entering '3rdparty/libs/gopy'
diff --git a/examples/shell/commands.go b/examples/shell/commands.go
index eb4a7af..2d9e269 100644
--- a/examples/shell/commands.go
+++ b/examples/shell/commands.go
@@ -33,6 +33,7 @@ var builtins = map[string]CmdFunc{
"echo": echo,
"cd": chdir,
}
+
//////////////////////////////////////////////////////////////////////////////
func echo(args []string) error {
diff --git a/lib/cgo.go b/lib/cgo.go
index e69de29..8627e61 100644
--- a/lib/cgo.go
+++ b/lib/cgo.go
@@ -0,0 +1,4 @@
+package py
+
+// #cgo pkg-config: python-3.3
+import "C"
diff --git a/lib/utils.c b/lib/utils.c
index 4aa0d7a..b620163 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -500,3 +500,12 @@ void GoPyObject_GC_Track(PyObject *obj){
void setGcRefs(PyGC_Head *g, Py_ssize_t refs){
g->gc.gc_refs = refs;
}
+
+extern void stub(void* addr);
+void cinit() {
+ stub(&sigaltstack);
+ stub(&signal);
+ stub(&sigaction);
+ extern void __sigaltstack();
+ stub(&__sigaltstack);
+}
diff --git a/lock_test.go b/lock_test.go
index e7011b9..e6cf523 100644
--- a/lock_test.go
+++ b/lock_test.go
@@ -1,7 +1,7 @@
package pytesting
import (
- "lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
"math/rand"
"runtime"
"sync"
diff --git a/long_test.go b/long_test.go
index 284fb7d..bc7f5e0 100644
--- a/long_test.go
+++ b/long_test.go
@@ -1,30 +1,30 @@
package pytesting
import (
- "lime/3rdparty/libs/gopy/lib"
- "testing"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "testing"
)
func TestLong(t *testing.T) {
- py.Initialize()
- defer py.Finalize()
- l := py.NewLong(10)
- d, err := py.NewDict()
- if err != nil {
- t.Fatal(err)
- }
- if err = d.SetItemString("gopy.count", l); err != nil {
- t.Fatal(err)
- }
- if l2, err := d.GetItemString("gopy.count"); err != nil {
- t.Fatal(err)
- } else {
- if l3, ok := l2.(*py.Long); !ok {
- t.Fatalf("Unable to cast to long")
- } else {
- if v := l3.Int64(); v != 10 {
- t.Fatalf("Bad value: %d", v)
- }
- }
- }
+ py.Initialize()
+ defer py.Finalize()
+ l := py.NewLong(10)
+ d, err := py.NewDict()
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err = d.SetItemString("gopy.count", l); err != nil {
+ t.Fatal(err)
+ }
+ if l2, err := d.GetItemString("gopy.count"); err != nil {
+ t.Fatal(err)
+ } else {
+ if l3, ok := l2.(*py.Long); !ok {
+ t.Fatalf("Unable to cast to long")
+ } else {
+ if v := l3.Int64(); v != 10 {
+ t.Fatalf("Bad value: %d", v)
+ }
+ }
+ }
}
diff --git a/module_test.go b/module_test.go
index ebdfd9c..e0ac0ce 100644
--- a/module_test.go
+++ b/module_test.go
@@ -1,7 +1,7 @@
package pytesting
import (
- "lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
"testing"
)
diff --git a/run_test.go b/run_test.go
index c3cf0ba..53399f9 100644
--- a/run_test.go
+++ b/run_test.go
@@ -1,7 +1,7 @@
package pytesting
import (
- "lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
"testing"
)
Entering '3rdparty/libs/rubex'
diff --git a/cgo.go b/cgo.go
index e69de29..78919ad 100644
--- a/cgo.go
+++ b/cgo.go
@@ -0,0 +1,4 @@
+package rubex
+
+// #cgo pkg-config: oniguruma
+import "C"
Entering '3rdparty/libs/termbox-go'
diff --git a/_demos/keyboard.go b/_demos/keyboard.go
index d9326a7..64f8283 100644
--- a/_demos/keyboard.go
+++ b/_demos/keyboard.go
@@ -4,174 +4,174 @@ import "../../termbox-go"
import "fmt"
type key struct {
- x int
- y int
+ x int
+ y int
ch rune
}
-var K_ESC = []key{{1,1,'E'},{2,1,'S'},{3,1,'C'}}
-var K_F1 = []key{{6,1,'F'},{7,1,'1'}}
-var K_F2 = []key{{9,1,'F'},{10,1,'2'}}
-var K_F3 = []key{{12,1,'F'},{13,1,'3'}}
-var K_F4 = []key{{15,1,'F'},{16,1,'4'}}
-var K_F5 = []key{{19,1,'F'},{20,1,'5'}}
-var K_F6 = []key{{22,1,'F'},{23,1,'6'}}
-var K_F7 = []key{{25,1,'F'},{26,1,'7'}}
-var K_F8 = []key{{28,1,'F'},{29,1,'8'}}
-var K_F9 = []key{{33,1,'F'},{34,1,'9'}}
-var K_F10 = []key{{36,1,'F'},{37,1,'1'},{38,1,'0'}}
-var K_F11 = []key{{40,1,'F'},{41,1,'1'},{42,1,'1'}}
-var K_F12 = []key{{44,1,'F'},{45,1,'1'},{46,1,'2'}}
-var K_PRN = []key{{50,1,'P'},{51,1,'R'},{52,1,'N'}}
-var K_SCR = []key{{54,1,'S'},{55,1,'C'},{56,1,'R'}}
-var K_BRK = []key{{58,1,'B'},{59,1,'R'},{60,1,'K'}}
-var K_LED1 = []key{{66,1,'-'}}
-var K_LED2 = []key{{70,1,'-'}}
-var K_LED3 = []key{{74,1,'-'}}
-var K_TILDE = []key{{1,4,'`'}}
-var K_TILDE_SHIFT = []key{{1,4,'~'}}
-var K_1 = []key{{4,4,'1'}}
-var K_1_SHIFT = []key{{4,4,'!'}}
-var K_2 = []key{{7,4,'2'}}
-var K_2_SHIFT = []key{{7,4,'@'}}
-var K_3 = []key{{10,4,'3'}}
-var K_3_SHIFT = []key{{10,4,'#'}}
-var K_4 = []key{{13,4,'4'}}
-var K_4_SHIFT = []key{{13,4,'$'}}
-var K_5 = []key{{16,4,'5'}}
-var K_5_SHIFT = []key{{16,4,'%'}}
-var K_6 = []key{{19,4,'6'}}
-var K_6_SHIFT = []key{{19,4,'^'}}
-var K_7 = []key{{22,4,'7'}}
-var K_7_SHIFT = []key{{22,4,'&'}}
-var K_8 = []key{{25,4,'8'}}
-var K_8_SHIFT = []key{{25,4,'*'}}
-var K_9 = []key{{28,4,'9'}}
-var K_9_SHIFT = []key{{28,4,'('}}
-var K_0 = []key{{31,4,'0'}}
-var K_0_SHIFT = []key{{31,4,')'}}
-var K_MINUS = []key{{34,4,'-'}}
-var K_MINUS_SHIFT = []key{{34,4,'_'}}
-var K_EQUALS = []key{{37,4,'='}}
-var K_EQUALS_SHIFT = []key{{37,4,'+'}}
-var K_BACKSLASH = []key{{40,4,'\\'}}
-var K_BACKSLASH_SHIFT = []key{{40,4,'|'}}
-var K_BACKSPACE = []key{{44,4,0x2190},{45,4,0x2500},{46,4,0x2500}}
-var K_INS = []key{{50,4,'I'},{51,4,'N'},{52,4,'S'}}
-var K_HOM = []key{{54,4,'H'},{55,4,'O'},{56,4,'M'}}
-var K_PGU = []key{{58,4,'P'},{59,4,'G'},{60,4,'U'}}
-var K_K_NUMLOCK = []key{{65,4,'N'}}
-var K_K_SLASH = []key{{68,4,'/'}}
-var K_K_STAR = []key{{71,4,'*'}}
-var K_K_MINUS = []key{{74,4,'-'}}
-var K_TAB = []key{{1,6,'T'},{2,6,'A'},{3,6,'B'}}
-var K_q = []key{{6,6,'q'}}
-var K_Q = []key{{6,6,'Q'}}
-var K_w = []key{{9,6,'w'}}
-var K_W = []key{{9,6,'W'}}
-var K_e = []key{{12,6,'e'}}
-var K_E = []key{{12,6,'E'}}
-var K_r = []key{{15,6,'r'}}
-var K_R = []key{{15,6,'R'}}
-var K_t = []key{{18,6,'t'}}
-var K_T = []key{{18,6,'T'}}
-var K_y = []key{{21,6,'y'}}
-var K_Y = []key{{21,6,'Y'}}
-var K_u = []key{{24,6,'u'}}
-var K_U = []key{{24,6,'U'}}
-var K_i = []key{{27,6,'i'}}
-var K_I = []key{{27,6,'I'}}
-var K_o = []key{{30,6,'o'}}
-var K_O = []key{{30,6,'O'}}
-var K_p = []key{{33,6,'p'}}
-var K_P = []key{{33,6,'P'}}
-var K_LSQB = []key{{36,6,'['}}
-var K_LCUB = []key{{36,6,'{'}}
-var K_RSQB = []key{{39,6,']'}}
-var K_RCUB = []key{{39,6,'}'}}
+var K_ESC = []key{{1, 1, 'E'}, {2, 1, 'S'}, {3, 1, 'C'}}
+var K_F1 = []key{{6, 1, 'F'}, {7, 1, '1'}}
+var K_F2 = []key{{9, 1, 'F'}, {10, 1, '2'}}
+var K_F3 = []key{{12, 1, 'F'}, {13, 1, '3'}}
+var K_F4 = []key{{15, 1, 'F'}, {16, 1, '4'}}
+var K_F5 = []key{{19, 1, 'F'}, {20, 1, '5'}}
+var K_F6 = []key{{22, 1, 'F'}, {23, 1, '6'}}
+var K_F7 = []key{{25, 1, 'F'}, {26, 1, '7'}}
+var K_F8 = []key{{28, 1, 'F'}, {29, 1, '8'}}
+var K_F9 = []key{{33, 1, 'F'}, {34, 1, '9'}}
+var K_F10 = []key{{36, 1, 'F'}, {37, 1, '1'}, {38, 1, '0'}}
+var K_F11 = []key{{40, 1, 'F'}, {41, 1, '1'}, {42, 1, '1'}}
+var K_F12 = []key{{44, 1, 'F'}, {45, 1, '1'}, {46, 1, '2'}}
+var K_PRN = []key{{50, 1, 'P'}, {51, 1, 'R'}, {52, 1, 'N'}}
+var K_SCR = []key{{54, 1, 'S'}, {55, 1, 'C'}, {56, 1, 'R'}}
+var K_BRK = []key{{58, 1, 'B'}, {59, 1, 'R'}, {60, 1, 'K'}}
+var K_LED1 = []key{{66, 1, '-'}}
+var K_LED2 = []key{{70, 1, '-'}}
+var K_LED3 = []key{{74, 1, '-'}}
+var K_TILDE = []key{{1, 4, '`'}}
+var K_TILDE_SHIFT = []key{{1, 4, '~'}}
+var K_1 = []key{{4, 4, '1'}}
+var K_1_SHIFT = []key{{4, 4, '!'}}
+var K_2 = []key{{7, 4, '2'}}
+var K_2_SHIFT = []key{{7, 4, '@'}}
+var K_3 = []key{{10, 4, '3'}}
+var K_3_SHIFT = []key{{10, 4, '#'}}
+var K_4 = []key{{13, 4, '4'}}
+var K_4_SHIFT = []key{{13, 4, '$'}}
+var K_5 = []key{{16, 4, '5'}}
+var K_5_SHIFT = []key{{16, 4, '%'}}
+var K_6 = []key{{19, 4, '6'}}
+var K_6_SHIFT = []key{{19, 4, '^'}}
+var K_7 = []key{{22, 4, '7'}}
+var K_7_SHIFT = []key{{22, 4, '&'}}
+var K_8 = []key{{25, 4, '8'}}
+var K_8_SHIFT = []key{{25, 4, '*'}}
+var K_9 = []key{{28, 4, '9'}}
+var K_9_SHIFT = []key{{28, 4, '('}}
+var K_0 = []key{{31, 4, '0'}}
+var K_0_SHIFT = []key{{31, 4, ')'}}
+var K_MINUS = []key{{34, 4, '-'}}
+var K_MINUS_SHIFT = []key{{34, 4, '_'}}
+var K_EQUALS = []key{{37, 4, '='}}
+var K_EQUALS_SHIFT = []key{{37, 4, '+'}}
+var K_BACKSLASH = []key{{40, 4, '\\'}}
+var K_BACKSLASH_SHIFT = []key{{40, 4, '|'}}
+var K_BACKSPACE = []key{{44, 4, 0x2190}, {45, 4, 0x2500}, {46, 4, 0x2500}}
+var K_INS = []key{{50, 4, 'I'}, {51, 4, 'N'}, {52, 4, 'S'}}
+var K_HOM = []key{{54, 4, 'H'}, {55, 4, 'O'}, {56, 4, 'M'}}
+var K_PGU = []key{{58, 4, 'P'}, {59, 4, 'G'}, {60, 4, 'U'}}
+var K_K_NUMLOCK = []key{{65, 4, 'N'}}
+var K_K_SLASH = []key{{68, 4, '/'}}
+var K_K_STAR = []key{{71, 4, '*'}}
+var K_K_MINUS = []key{{74, 4, '-'}}
+var K_TAB = []key{{1, 6, 'T'}, {2, 6, 'A'}, {3, 6, 'B'}}
+var K_q = []key{{6, 6, 'q'}}
+var K_Q = []key{{6, 6, 'Q'}}
+var K_w = []key{{9, 6, 'w'}}
+var K_W = []key{{9, 6, 'W'}}
+var K_e = []key{{12, 6, 'e'}}
+var K_E = []key{{12, 6, 'E'}}
+var K_r = []key{{15, 6, 'r'}}
+var K_R = []key{{15, 6, 'R'}}
+var K_t = []key{{18, 6, 't'}}
+var K_T = []key{{18, 6, 'T'}}
+var K_y = []key{{21, 6, 'y'}}
+var K_Y = []key{{21, 6, 'Y'}}
+var K_u = []key{{24, 6, 'u'}}
+var K_U = []key{{24, 6, 'U'}}
+var K_i = []key{{27, 6, 'i'}}
+var K_I = []key{{27, 6, 'I'}}
+var K_o = []key{{30, 6, 'o'}}
+var K_O = []key{{30, 6, 'O'}}
+var K_p = []key{{33, 6, 'p'}}
+var K_P = []key{{33, 6, 'P'}}
+var K_LSQB = []key{{36, 6, '['}}
+var K_LCUB = []key{{36, 6, '{'}}
+var K_RSQB = []key{{39, 6, ']'}}
+var K_RCUB = []key{{39, 6, '}'}}
var K_ENTER = []key{
- {43,6,0x2591},{44,6,0x2591},{45,6,0x2591},{46,6,0x2591},
- {43,7,0x2591},{44,7,0x2591},{45,7,0x21B5},{46,7,0x2591},
- {41,8,0x2591},{42,8,0x2591},{43,8,0x2591},{44,8,0x2591},
- {45,8,0x2591},{46,8,0x2591},
+ {43, 6, 0x2591}, {44, 6, 0x2591}, {45, 6, 0x2591}, {46, 6, 0x2591},
+ {43, 7, 0x2591}, {44, 7, 0x2591}, {45, 7, 0x21B5}, {46, 7, 0x2591},
+ {41, 8, 0x2591}, {42, 8, 0x2591}, {43, 8, 0x2591}, {44, 8, 0x2591},
+ {45, 8, 0x2591}, {46, 8, 0x2591},
}
-var K_DEL = []key{{50,6,'D'},{51,6,'E'},{52,6,'L'}}
-var K_END = []key{{54,6,'E'},{55,6,'N'},{56,6,'D'}}
-var K_PGD = []key{{58,6,'P'},{59,6,'G'},{60,6,'D'}}
-var K_K_7 = []key{{65,6,'7'}}
-var K_K_8 = []key{{68,6,'8'}}
-var K_K_9 = []key{{71,6,'9'}}
-var K_K_PLUS = []key{{74,6,' '},{74,7,'+'},{74,8,' '}}
-var K_CAPS = []key{{1,8,'C'},{2,8,'A'},{3,8,'P'},{4,8,'S'}}
-var K_a = []key{{7,8,'a'}}
-var K_A = []key{{7,8,'A'}}
-var K_s = []key{{10,8,'s'}}
-var K_S = []key{{10,8,'S'}}
-var K_d = []key{{13,8,'d'}}
-var K_D = []key{{13,8,'D'}}
-var K_f = []key{{16,8,'f'}}
-var K_F = []key{{16,8,'F'}}
-var K_g = []key{{19,8,'g'}}
-var K_G = []key{{19,8,'G'}}
-var K_h = []key{{22,8,'h'}}
-var K_H = []key{{22,8,'H'}}
-var K_j = []key{{25,8,'j'}}
-var K_J = []key{{25,8,'J'}}
-var K_k = []key{{28,8,'k'}}
-var K_K = []key{{28,8,'K'}}
-var K_l = []key{{31,8,'l'}}
-var K_L = []key{{31,8,'L'}}
-var K_SEMICOLON = []key{{34,8,';'}}
-var K_PARENTHESIS = []key{{34,8,':'}}
-var K_QUOTE = []key{{37,8,'\''}}
-var K_DOUBLEQUOTE = []key{{37,8,'"'}}
-var K_K_4 = []key{{65,8,'4'}}
-var K_K_5 = []key{{68,8,'5'}}
-var K_K_6 = []key{{71,8,'6'}}
-var K_LSHIFT = []key{{1,10,'S'},{2,10,'H'},{3,10,'I'},{4,10,'F'},{5,10,'T'}}
-var K_z = []key{{9,10,'z'}}
-var K_Z = []key{{9,10,'Z'}}
-var K_x = []key{{12,10,'x'}}
-var K_X = []key{{12,10,'X'}}
-var K_c = []key{{15,10,'c'}}
-var K_C = []key{{15,10,'C'}}
-var K_v = []key{{18,10,'v'}}
-var K_V = []key{{18,10,'V'}}
-var K_b = []key{{21,10,'b'}}
-var K_B = []key{{21,10,'B'}}
-var K_n = []key{{24,10,'n'}}
-var K_N = []key{{24,10,'N'}}
-var K_m = []key{{27,10,'m'}}
-var K_M = []key{{27,10,'M'}}
-var K_COMMA = []key{{30,10,','}}
-var K_LANB = []key{{30,10,'<'}}
-var K_PERIOD = []key{{33,10,'.'}}
-var K_RANB = []key{{33,10,'>'}}
-var K_SLASH = []key{{36,10,'/'}}
-var K_QUESTION = []key{{36,10,'?'}}
-var K_RSHIFT = []key{{42,10,'S'},{43,10,'H'},{44,10,'I'},{45,10,'F'},{46,10,'T'}}
-var K_ARROW_UP = []key{{54,10,'('},{55,10,0x2191},{56,10,')'}}
-var K_K_1 = []key{{65,10,'1'}}
-var K_K_2 = []key{{68,10,'2'}}
-var K_K_3 = []key{{71,10,'3'}}
-var K_K_ENTER = []key{{74,10,0x2591},{74,11,0x2591},{74,12,0x2591}}
-var K_LCTRL = []key{{1,12,'C'},{2,12,'T'},{3,12,'R'},{4,12,'L'}}
-var K_LWIN = []key{{6,12,'W'},{7,12,'I'},{8,12,'N'}}
-var K_LALT = []key{{10,12,'A'},{11,12,'L'},{12,12,'T'}}
+var K_DEL = []key{{50, 6, 'D'}, {51, 6, 'E'}, {52, 6, 'L'}}
+var K_END = []key{{54, 6, 'E'}, {55, 6, 'N'}, {56, 6, 'D'}}
+var K_PGD = []key{{58, 6, 'P'}, {59, 6, 'G'}, {60, 6, 'D'}}
+var K_K_7 = []key{{65, 6, '7'}}
+var K_K_8 = []key{{68, 6, '8'}}
+var K_K_9 = []key{{71, 6, '9'}}
+var K_K_PLUS = []key{{74, 6, ' '}, {74, 7, '+'}, {74, 8, ' '}}
+var K_CAPS = []key{{1, 8, 'C'}, {2, 8, 'A'}, {3, 8, 'P'}, {4, 8, 'S'}}
+var K_a = []key{{7, 8, 'a'}}
+var K_A = []key{{7, 8, 'A'}}
+var K_s = []key{{10, 8, 's'}}
+var K_S = []key{{10, 8, 'S'}}
+var K_d = []key{{13, 8, 'd'}}
+var K_D = []key{{13, 8, 'D'}}
+var K_f = []key{{16, 8, 'f'}}
+var K_F = []key{{16, 8, 'F'}}
+var K_g = []key{{19, 8, 'g'}}
+var K_G = []key{{19, 8, 'G'}}
+var K_h = []key{{22, 8, 'h'}}
+var K_H = []key{{22, 8, 'H'}}
+var K_j = []key{{25, 8, 'j'}}
+var K_J = []key{{25, 8, 'J'}}
+var K_k = []key{{28, 8, 'k'}}
+var K_K = []key{{28, 8, 'K'}}
+var K_l = []key{{31, 8, 'l'}}
+var K_L = []key{{31, 8, 'L'}}
+var K_SEMICOLON = []key{{34, 8, ';'}}
+var K_PARENTHESIS = []key{{34, 8, ':'}}
+var K_QUOTE = []key{{37, 8, '\''}}
+var K_DOUBLEQUOTE = []key{{37, 8, '"'}}
+var K_K_4 = []key{{65, 8, '4'}}
+var K_K_5 = []key{{68, 8, '5'}}
+var K_K_6 = []key{{71, 8, '6'}}
+var K_LSHIFT = []key{{1, 10, 'S'}, {2, 10, 'H'}, {3, 10, 'I'}, {4, 10, 'F'}, {5, 10, 'T'}}
+var K_z = []key{{9, 10, 'z'}}
+var K_Z = []key{{9, 10, 'Z'}}
+var K_x = []key{{12, 10, 'x'}}
+var K_X = []key{{12, 10, 'X'}}
+var K_c = []key{{15, 10, 'c'}}
+var K_C = []key{{15, 10, 'C'}}
+var K_v = []key{{18, 10, 'v'}}
+var K_V = []key{{18, 10, 'V'}}
+var K_b = []key{{21, 10, 'b'}}
+var K_B = []key{{21, 10, 'B'}}
+var K_n = []key{{24, 10, 'n'}}
+var K_N = []key{{24, 10, 'N'}}
+var K_m = []key{{27, 10, 'm'}}
+var K_M = []key{{27, 10, 'M'}}
+var K_COMMA = []key{{30, 10, ','}}
+var K_LANB = []key{{30, 10, '<'}}
+var K_PERIOD = []key{{33, 10, '.'}}
+var K_RANB = []key{{33, 10, '>'}}
+var K_SLASH = []key{{36, 10, '/'}}
+var K_QUESTION = []key{{36, 10, '?'}}
+var K_RSHIFT = []key{{42, 10, 'S'}, {43, 10, 'H'}, {44, 10, 'I'}, {45, 10, 'F'}, {46, 10, 'T'}}
+var K_ARROW_UP = []key{{54, 10, '('}, {55, 10, 0x2191}, {56, 10, ')'}}
+var K_K_1 = []key{{65, 10, '1'}}
+var K_K_2 = []key{{68, 10, '2'}}
+var K_K_3 = []key{{71, 10, '3'}}
+var K_K_ENTER = []key{{74, 10, 0x2591}, {74, 11, 0x2591}, {74, 12, 0x2591}}
+var K_LCTRL = []key{{1, 12, 'C'}, {2, 12, 'T'}, {3, 12, 'R'}, {4, 12, 'L'}}
+var K_LWIN = []key{{6, 12, 'W'}, {7, 12, 'I'}, {8, 12, 'N'}}
+var K_LALT = []key{{10, 12, 'A'}, {11, 12, 'L'}, {12, 12, 'T'}}
var K_SPACE = []key{
- {14,12,' '},{15,12,' '},{16,12,' '},{17,12,' '},{18,12,' '},
- {19,12,'S'},{20,12,'P'},{21,12,'A'},{22,12,'C'},{23,12,'E'},
- {24,12,' '},{25,12,' '},{26,12,' '},{27,12,' '},{28,12,' '},
+ {14, 12, ' '}, {15, 12, ' '}, {16, 12, ' '}, {17, 12, ' '}, {18, 12, ' '},
+ {19, 12, 'S'}, {20, 12, 'P'}, {21, 12, 'A'}, {22, 12, 'C'}, {23, 12, 'E'},
+ {24, 12, ' '}, {25, 12, ' '}, {26, 12, ' '}, {27, 12, ' '}, {28, 12, ' '},
}
-var K_RALT = []key{{30,12,'A'},{31,12,'L'},{32,12,'T'}}
-var K_RWIN = []key{{34,12,'W'},{35,12,'I'},{36,12,'N'}}
-var K_RPROP = []key{{38,12,'P'},{39,12,'R'},{40,12,'O'},{41,12,'P'}}
-var K_RCTRL = []key{{43,12,'C'},{44,12,'T'},{45,12,'R'},{46,12,'L'}}
-var K_ARROW_LEFT = []key{{50,12,'('},{51,12,0x2190},{52,12,')'}}
-var K_ARROW_DOWN = []key{{54,12,'('},{55,12,0x2193},{56,12,')'}}
-var K_ARROW_RIGHT = []key{{58,12,'('},{59,12,0x2192},{60,12,')'}}
-var K_K_0 = []key{{65,12,' '},{66,12,'0'},{67,12,' '},{68,12,' '}}
-var K_K_PERIOD = []key{{71,12,'.'}}
+var K_RALT = []key{{30, 12, 'A'}, {31, 12, 'L'}, {32, 12, 'T'}}
+var K_RWIN = []key{{34, 12, 'W'}, {35, 12, 'I'}, {36, 12, 'N'}}
+var K_RPROP = []key{{38, 12, 'P'}, {39, 12, 'R'}, {40, 12, 'O'}, {41, 12, 'P'}}
+var K_RCTRL = []key{{43, 12, 'C'}, {44, 12, 'T'}, {45, 12, 'R'}, {46, 12, 'L'}}
+var K_ARROW_LEFT = []key{{50, 12, '('}, {51, 12, 0x2190}, {52, 12, ')'}}
+var K_ARROW_DOWN = []key{{54, 12, '('}, {55, 12, 0x2193}, {56, 12, ')'}}
+var K_ARROW_RIGHT = []key{{58, 12, '('}, {59, 12, 0x2192}, {60, 12, ')'}}
+var K_K_0 = []key{{65, 12, ' '}, {66, 12, '0'}, {67, 12, ' '}, {68, 12, ' '}}
+var K_K_PERIOD = []key{{71, 12, '.'}}
type combo struct {
keys [][]key
@@ -211,69 +211,69 @@ var combos = []combo{
{[][]key{K_6, K_LCTRL, K_RCTRL}},
{[][]key{K_7, K_SLASH, K_MINUS_SHIFT, K_LCTRL, K_RCTRL}},
{[][]key{K_SPACE}},
- {[][]key{K_1_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_DOUBLEQUOTE,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_3_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_4_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_5_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_7_SHIFT,K_LSHIFT,K_RSHIFT}},
+ {[][]key{K_1_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_DOUBLEQUOTE, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_3_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_4_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_5_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_7_SHIFT, K_LSHIFT, K_RSHIFT}},
{[][]key{K_QUOTE}},
- {[][]key{K_9_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_0_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_8_SHIFT,K_K_STAR,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_EQUALS_SHIFT,K_K_PLUS,K_LSHIFT,K_RSHIFT}},
+ {[][]key{K_9_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_0_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_8_SHIFT, K_K_STAR, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_EQUALS_SHIFT, K_K_PLUS, K_LSHIFT, K_RSHIFT}},
{[][]key{K_COMMA}},
- {[][]key{K_MINUS,K_K_MINUS}},
- {[][]key{K_PERIOD,K_K_PERIOD}},
- {[][]key{K_SLASH,K_K_SLASH}},
- {[][]key{K_0,K_K_0}},
- {[][]key{K_1,K_K_1}},
- {[][]key{K_2,K_K_2}},
- {[][]key{K_3,K_K_3}},
- {[][]key{K_4,K_K_4}},
- {[][]key{K_5,K_K_5}},
- {[][]key{K_6,K_K_6}},
- {[][]key{K_7,K_K_7}},
- {[][]key{K_8,K_K_8}},
- {[][]key{K_9,K_K_9}},
- {[][]key{K_PARENTHESIS,K_LSHIFT,K_RSHIFT}},
+ {[][]key{K_MINUS, K_K_MINUS}},
+ {[][]key{K_PERIOD, K_K_PERIOD}},
+ {[][]key{K_SLASH, K_K_SLASH}},
+ {[][]key{K_0, K_K_0}},
+ {[][]key{K_1, K_K_1}},
+ {[][]key{K_2, K_K_2}},
+ {[][]key{K_3, K_K_3}},
+ {[][]key{K_4, K_K_4}},
+ {[][]key{K_5, K_K_5}},
+ {[][]key{K_6, K_K_6}},
+ {[][]key{K_7, K_K_7}},
+ {[][]key{K_8, K_K_8}},
+ {[][]key{K_9, K_K_9}},
+ {[][]key{K_PARENTHESIS, K_LSHIFT, K_RSHIFT}},
{[][]key{K_SEMICOLON}},
- {[][]key{K_LANB,K_LSHIFT,K_RSHIFT}},
+ {[][]key{K_LANB, K_LSHIFT, K_RSHIFT}},
{[][]key{K_EQUALS}},
- {[][]key{K_RANB,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_QUESTION,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_2_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_A,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_B,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_C,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_D,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_E,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_F,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_G,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_H,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_I,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_J,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_K,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_L,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_M,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_N,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_O,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_P,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_Q,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_R,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_S,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_T,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_U,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_V,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_W,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_X,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_Y,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_Z,K_LSHIFT,K_RSHIFT}},
+ {[][]key{K_RANB, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_QUESTION, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_2_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_A, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_B, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_C, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_D, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_E, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_F, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_G, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_H, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_I, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_J, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_K, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_L, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_M, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_N, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_O, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_P, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_Q, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_R, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_S, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_T, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_U, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_V, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_W, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_X, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_Y, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_Z, K_LSHIFT, K_RSHIFT}},
{[][]key{K_LSQB}},
{[][]key{K_BACKSLASH}},
{[][]key{K_RSQB}},
- {[][]key{K_6_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_MINUS_SHIFT,K_LSHIFT,K_RSHIFT}},
+ {[][]key{K_6_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_MINUS_SHIFT, K_LSHIFT, K_RSHIFT}},
{[][]key{K_TILDE}},
{[][]key{K_a}},
{[][]key{K_b}},
@@ -301,11 +301,11 @@ var combos = []combo{
{[][]key{K_x}},
{[][]key{K_y}},
{[][]key{K_z}},
- {[][]key{K_LCUB,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_BACKSLASH_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_RCUB,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_TILDE_SHIFT,K_LSHIFT,K_RSHIFT}},
- {[][]key{K_8,K_BACKSPACE,K_LCTRL,K_RCTRL}},
+ {[][]key{K_LCUB, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_BACKSLASH_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_RCUB, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_TILDE_SHIFT, K_LSHIFT, K_RSHIFT}},
+ {[][]key{K_8, K_BACKSPACE, K_LCTRL, K_RCTRL}},
}
var func_combos = []combo{
@@ -347,7 +347,7 @@ func printf_tb(x, y int, fg, bg termbox.Attribute, format string, args ...interf
func draw_key(k []key, fg, bg termbox.Attribute) {
for _, k := range k {
- termbox.SetCell(k.x + 2, k.y + 4, k.ch, fg, bg)
+ termbox.SetCell(k.x+2, k.y+4, k.ch, fg, bg)
}
}
@@ -489,7 +489,7 @@ func draw_keyboard() {
draw_key(K_K_0, termbox.ColorWhite, termbox.ColorBlue)
draw_key(K_K_PERIOD, termbox.ColorWhite, termbox.ColorBlue)
- printf_tb(33, 1, termbox.ColorMagenta | termbox.AttrBold, termbox.ColorBlack, "Keyboard demo!")
+ printf_tb(33, 1, termbox.ColorMagenta|termbox.AttrBold, termbox.ColorBlack, "Keyboard demo!")
printf_tb(21, 2, termbox.ColorMagenta, termbox.ColorBlack, "(press CTRL+X and then CTRL+Q to exit)")
printf_tb(15, 3, termbox.ColorMagenta, termbox.ColorBlack, "(press CTRL+X and then CTRL+C to change input mode)")
@@ -499,7 +499,7 @@ func draw_keyboard() {
"termbox.InputAlt",
}
printf_tb(3, 18, termbox.ColorWhite, termbox.ColorBlack, "Input mode: %s",
- inputmodemap[termbox.SetInputMode(termbox.InputCurrent)])
+ inputmodemap[termbox.SetInputMode(termbox.InputCurrent)])
}
var fcmap = []string{
@@ -575,17 +575,17 @@ func funckeymap(k termbox.Key) string {
}
func pretty_print_press(ev *termbox.Event) {
- printf_tb(3, 19, termbox.ColorWhite , termbox.ColorBlack, "Key: ");
- printf_tb(8, 19, termbox.ColorYellow, termbox.ColorBlack, "decimal: %d", ev.Key);
- printf_tb(8, 20, termbox.ColorGreen , termbox.ColorBlack, "hex: 0x%X", ev.Key);
- printf_tb(8, 21, termbox.ColorCyan , termbox.ColorBlack, "octal: 0%o", ev.Key);
- printf_tb(8, 22, termbox.ColorRed , termbox.ColorBlack, "string: %s", funckeymap(ev.Key));
-
- printf_tb(43, 19, termbox.ColorWhite , termbox.ColorBlack, "Char: ");
- printf_tb(49, 19, termbox.ColorYellow, termbox.ColorBlack, "decimal: %d", ev.Ch);
- printf_tb(49, 20, termbox.ColorGreen , termbox.ColorBlack, "hex: 0x%X", ev.Ch);
- printf_tb(49, 21, termbox.ColorCyan , termbox.ColorBlack, "octal: 0%o", ev.Ch);
- printf_tb(49, 22, termbox.ColorRed , termbox.ColorBlack, "string: %s", string(ev.Ch));
+ printf_tb(3, 19, termbox.ColorWhite, termbox.ColorBlack, "Key: ")
+ printf_tb(8, 19, termbox.ColorYellow, termbox.ColorBlack, "decimal: %d", ev.Key)
+ printf_tb(8, 20, termbox.ColorGreen, termbox.ColorBlack, "hex: 0x%X", ev.Key)
+ printf_tb(8, 21, termbox.ColorCyan, termbox.ColorBlack, "octal: 0%o", ev.Key)
+ printf_tb(8, 22, termbox.ColorRed, termbox.ColorBlack, "string: %s", funckeymap(ev.Key))
+
+ printf_tb(43, 19, termbox.ColorWhite, termbox.ColorBlack, "Char: ")
+ printf_tb(49, 19, termbox.ColorYellow, termbox.ColorBlack, "decimal: %d", ev.Ch)
+ printf_tb(49, 20, termbox.ColorGreen, termbox.ColorBlack, "hex: 0x%X", ev.Ch)
+ printf_tb(49, 21, termbox.ColorCyan, termbox.ColorBlack, "octal: 0%o", ev.Ch)
+ printf_tb(49, 22, termbox.ColorRed, termbox.ColorBlack, "string: %s", string(ev.Ch))
modifier := "none"
if ev.Mod != 0 {
@@ -595,13 +595,13 @@ func pretty_print_press(ev *termbox.Event) {
}
func pretty_print_resize(ev *termbox.Event) {
- printf_tb(3, 19, termbox.ColorWhite, termbox.ColorBlack, "Resize event: %d x %d", ev.Width, ev.Height);
+ printf_tb(3, 19, termbox.ColorWhite, termbox.ColorBlack, "Resize event: %d x %d", ev.Width, ev.Height)
}
func dispatch_press(ev *termbox.Event) {
- if ev.Mod & termbox.ModAlt != 0 {
- draw_key(K_LALT, termbox.ColorWhite, termbox.ColorRed);
- draw_key(K_RALT, termbox.ColorWhite, termbox.ColorRed);
+ if ev.Mod&termbox.ModAlt != 0 {
+ draw_key(K_LALT, termbox.ColorWhite, termbox.ColorRed)
+ draw_key(K_RALT, termbox.ColorWhite, termbox.ColorRed)
}
var k *combo
diff --git a/_demos/output.go b/_demos/output.go
index 60bb88b..fdc41f8 100644
--- a/_demos/output.go
+++ b/_demos/output.go
@@ -51,7 +51,7 @@ func draw_all() {
0,
termbox.AttrBold,
})
- print_combinations_table(2 + len(chars), 1, []termbox.Attribute{
+ print_combinations_table(2+len(chars), 1, []termbox.Attribute{
termbox.AttrReverse,
})
termbox.Flush()
diff --git a/_demos/rainbow.go b/_demos/rainbow.go
index f026c11..30dc47c 100644
--- a/_demos/rainbow.go
+++ b/_demos/rainbow.go
@@ -67,7 +67,7 @@ func main() {
}
x, y = 4, y+1
}
- y --
+ y--
print_head("24 Value Greyscale:")
for i := 0; i < 24; i++ {
diff --git a/_demos/random_output.go b/_demos/random_output.go
index 53e9f64..5be2a32 100644
--- a/_demos/random_output.go
+++ b/_demos/random_output.go
@@ -10,7 +10,7 @@ func draw() {
for y := 0; y < h; y++ {
for x := 0; x < w; x++ {
termbox.SetCell(x, y, ' ', termbox.ColorDefault,
- termbox.Attribute(rand.Int() % 8)+1)
+ termbox.Attribute(rand.Int()%8)+1)
}
}
termbox.Flush()
diff --git a/syscalls_freebsd.go b/syscalls_freebsd.go
index fd30fae..e03624e 100644
--- a/syscalls_freebsd.go
+++ b/syscalls_freebsd.go
@@ -4,36 +4,36 @@
package termbox
type syscall_Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed uint32
+ Ospeed uint32
}
const (
- syscall_IGNBRK = 0x1
- syscall_BRKINT = 0x2
- syscall_PARMRK = 0x8
- syscall_ISTRIP = 0x20
- syscall_INLCR = 0x40
- syscall_IGNCR = 0x80
- syscall_ICRNL = 0x100
- syscall_IXON = 0x200
- syscall_OPOST = 0x1
- syscall_ECHO = 0x8
- syscall_ECHONL = 0x10
- syscall_ICANON = 0x100
- syscall_ISIG = 0x80
- syscall_IEXTEN = 0x400
- syscall_CSIZE = 0x300
- syscall_PARENB = 0x1000
- syscall_CS8 = 0x300
- syscall_VMIN = 0x10
- syscall_VTIME = 0x11
+ syscall_IGNBRK = 0x1
+ syscall_BRKINT = 0x2
+ syscall_PARMRK = 0x8
+ syscall_ISTRIP = 0x20
+ syscall_INLCR = 0x40
+ syscall_IGNCR = 0x80
+ syscall_ICRNL = 0x100
+ syscall_IXON = 0x200
+ syscall_OPOST = 0x1
+ syscall_ECHO = 0x8
+ syscall_ECHONL = 0x10
+ syscall_ICANON = 0x100
+ syscall_ISIG = 0x80
+ syscall_IEXTEN = 0x400
+ syscall_CSIZE = 0x300
+ syscall_PARENB = 0x1000
+ syscall_CS8 = 0x300
+ syscall_VMIN = 0x10
+ syscall_VTIME = 0x11
- syscall_TCGETS = 0x402c7413
- syscall_TCSETS = 0x802c7414
+ syscall_TCGETS = 0x402c7413
+ syscall_TCSETS = 0x802c7414
)
diff --git a/syscalls_openbsd.go b/syscalls_openbsd.go
index 7a16244..49a3355 100644
--- a/syscalls_openbsd.go
+++ b/syscalls_openbsd.go
@@ -4,36 +4,36 @@
package termbox
type syscall_Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed int32
+ Ospeed int32
}
const (
- syscall_IGNBRK = 0x1
- syscall_BRKINT = 0x2
- syscall_PARMRK = 0x8
- syscall_ISTRIP = 0x20
- syscall_INLCR = 0x40
- syscall_IGNCR = 0x80
- syscall_ICRNL = 0x100
- syscall_IXON = 0x200
- syscall_OPOST = 0x1
- syscall_ECHO = 0x8
- syscall_ECHONL = 0x10
- syscall_ICANON = 0x100
- syscall_ISIG = 0x80
- syscall_IEXTEN = 0x400
- syscall_CSIZE = 0x300
- syscall_PARENB = 0x1000
- syscall_CS8 = 0x300
- syscall_VMIN = 0x10
- syscall_VTIME = 0x11
+ syscall_IGNBRK = 0x1
+ syscall_BRKINT = 0x2
+ syscall_PARMRK = 0x8
+ syscall_ISTRIP = 0x20
+ syscall_INLCR = 0x40
+ syscall_IGNCR = 0x80
+ syscall_ICRNL = 0x100
+ syscall_IXON = 0x200
+ syscall_OPOST = 0x1
+ syscall_ECHO = 0x8
+ syscall_ECHONL = 0x10
+ syscall_ICANON = 0x100
+ syscall_ISIG = 0x80
+ syscall_IEXTEN = 0x400
+ syscall_CSIZE = 0x300
+ syscall_PARENB = 0x1000
+ syscall_CS8 = 0x300
+ syscall_VMIN = 0x10
+ syscall_VTIME = 0x11
- syscall_TCGETS = 0x402c7413
- syscall_TCSETS = 0x802c7414
+ syscall_TCGETS = 0x402c7413
+ syscall_TCSETS = 0x802c7414
)
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 428fb72..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,282 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-include(FindGit)
-include(ExternalProject)
-
-if(WIN32)
- set(EXESUFFIX ".exe")
- set(PYTHON_PATH "C:\\Python3")
- find_package(PythonInterp 3.3 QUIET)
- if (NOT PYTHONINTERP_FOUND)
- set(file python-3.3.2.msi)
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(file python-3.3.2.amd64.msi)
- endif()
- if(NOT EXISTS ${PYTHON_PATH})
- if(NOT EXISTS ${CMAKE_BINARY_DIR}/${file})
- message("Downloading python ${file}")
- file(DOWNLOAD http://python.org/ftp/python/3.3.2/${file} ${CMAKE_BINARY_DIR}/${file} SHOW_PROGRESS EXPECTED_MD5 0d9db9c2316562c62e1e4c347b6f9430)
- endif()
- find_program(MSIEXEC msiexec REQUIRED)
- message("Installing python3 to ${PYTHON_PATH}")
- execute_process(
- COMMAND ${MSIEXEC} /i ${file} TARGETDIR=${PYTHON_PATH} /qb /log test.log
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
- endif()
- endif()
- if(NOT EXISTS ${CMAKE_SOURCE_DIR}/3rdparty/libs/gopy/lib/cgo.go)
- string(REPLACE "\\" "/" PYTHON_PATH ${PYTHON_PATH})
- file(WRITE ${CMAKE_SOURCE_DIR}/3rdparty/libs/gopy/lib/cgo.go "package py
-// #cgo CFLAGS: -I\"${PYTHON_PATH}/include\"
-// #cgo LDFLAGS: -L\"${CMAKE_BINARY_DIR}\" -lpython33
-import \"C\"
-")
- endif()
- if(NOT EXISTS ${CMAKE_BINARY_DIR}/mingw-get.zip)
- file(DOWNLOAD http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip/download ${CMAKE_BINARY_DIR}/mingw-get.zip SHOW_PROGRESS EXPECTED_MD5 971778e9330ae006aaeb2d63344be5f3)
- endif()
-
- if(NOT EXISTS ${CMAKE_BINARY_DIR}/dist/bin/mingw-get.exe)
- execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/dist)
- execute_process(COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/dist ${CMAKE_COMMAND} -E tar xvfz ${CMAKE_BINARY_DIR}/mingw-get.zip)
- endif()
- if(NOT EXISTS ${CMAKE_BINARY_DIR}/dist/bin/gcc.exe)
- execute_process(
- COMMAND ${CMAKE_BINARY_DIR}/dist/bin/mingw-get.exe install gcc g++ mingw32-pexports
- WORKING_DIR ${CMAKE_BINARY_DIR}/dist
- )
- endif()
- set(SHELL_EXE ${CMAKE_BINARY_DIR}/dist/msys/1.0/bin/sh.exe)
- if(NOT EXISTS ${SHELL_EXE})
- execute_process(
- COMMAND ${CMAKE_BINARY_DIR}/dist/bin/mingw-get.exe install sh msys-sed msys-grep msys-awk msys-make
- WORKING_DIR ${CMAKE_BINARY_DIR}/dist
- )
- endif()
- set(SHELL ${CMAKE_BINARY_DIR}/sh.bat)
- file(WRITE ${SHELL} "set PATH=%PATH%;${CMAKE_BINARY_DIR}/dist/bin;${CMAKE_BINARY_DIR}/dist/msys/1.0/bin;/bin;/sbin;/usr/bin;/usr/sbin
-${SHELL_EXE} %*
-")
- if(NOT EXISTS ${CMAKE_BINARY_DIR}/libpython33.a)
- execute_process(COMMAND ${CMAKE_BINARY_DIR}/dist/bin/pexports ${PYTHON_PATH}/python33.dll OUTPUT_VARIABLE PY3_DATA)
- file(WRITE ${CMAKE_BINARY_DIR}/py33.def ${PY3_DATA})
- execute_process(COMMAND ${CMAKE_BINARY_DIR}/dist/bin/dlltool -D python33.dll -l ${CMAKE_BINARY_DIR}/libpython33.a -d ${CMAKE_BINARY_DIR}/py33.def)
- execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_PATH}/python33.dll ${CMAKE_BINARY_DIR}/python33.dll)
- endif()
- ExternalProject_Add(
- Oniguruma
- URL http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.5.tar.gz
- URL_MD5 970f98a4cd10021b545d84e34c34aae4
- CONFIGURE_COMMAND ${SHELL} <SOURCE_DIR>/configure --prefix=${CMAKE_BINARY_DIR}/dist
- BUILD_COMMAND ${SHELL} -c "make"
- INSTALL_COMMAND ${SHELL} -c "make install"
- BUILD_IN_SOURCE 1
- )
-else()
- ExternalProject_Add(
- Python3
- URL http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
- URL_MD5 7dffe775f3bea68a44f762a3490e5e28
- CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}/dist
- # C code messing with sig calls and Go don't mix very well.
- # See https://code.google.com/p/go/issues/detail?id=5287 for details
- COMMAND cat pyconfig.h | sed s/\#define\ HAVE_SIGALTSTACK\ 1// > pyconfig.new && mv pyconfig.new pyconfig.h
- BUILD_COMMAND make -j8
- BUILD_IN_SOURCE 1
- )
- if(NOT EXISTS ${CMAKE_BINARY_DIR}/gopy_cgo.cmake)
- file(WRITE ${CMAKE_BINARY_DIR}/gopy_cgo.cmake "
- cmake_minimum_required(VERSION 2.8)
- execute_process(COMMAND ${CMAKE_BINARY_DIR}/dist/bin/python3-config --cflags OUTPUT_VARIABLE PY_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND ${CMAKE_BINARY_DIR}/dist/bin/python3-config --ldflags OUTPUT_VARIABLE PY_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND ${CMAKE_BINARY_DIR}/dist/bin/python3-config --libs OUTPUT_VARIABLE PY_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
- file(WRITE ${CMAKE_SOURCE_DIR}/3rdparty/libs/gopy/lib/cgo.go \"package py
- // #cgo CFLAGS: \${PY_CFLAGS}
- // #cgo LDFLAGS: \${PY_LDFLAGS} \${PY_LIBS}
- import \\\"C\\\"
- \")
- ")
- endif()
-
- add_custom_command(
- OUTPUT ${CMAKE_SOURCE_DIR}/3rdparty/libs/gopy/lib/cgo.go
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/gopy_cgo.cmake
- DEPENDS Python3
- DEPENDS ${CMAKE_BINARY_DIR}/gopy_cgo.cmake
- )
-
- ExternalProject_Add(
- Oniguruma
- URL http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.5.tar.gz
- URL_MD5 970f98a4cd10021b545d84e34c34aae4
- CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${CMAKE_BINARY_DIR}/dist
- )
-endif()
-
-if(NOT EXISTS ${CMAKE_SOURCE_DIR}/3rdparty/libs/rubex/cgo.go)
- file(WRITE ${CMAKE_SOURCE_DIR}/3rdparty/libs/rubex/cgo.go "
- package rubex
- // #cgo CFLAGS: -I${CMAKE_BINARY_DIR}/dist/include
- // #cgo LDFLAGS: ${CMAKE_BINARY_DIR}/dist/lib/libonig.a
- import \"C\"
- ")
-endif()
-
-execute_process(
- COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-)
-
-
-find_program(GOEXE go)
-if(NOT GOEXE)
- set(GOARCH "386")
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(GOARCH "amd64")
- endif()
- string(TOLOWER ${CMAKE_SYSTEM_NAME} GOOS)
- set(EXTENSION "tar.gz")
- if(GOOS STREQUAL "windows")
- set(EXTENSION "zip")
- endif()
- ExternalProject_Add(
- Go
- URL https://go.googlecode.com/files/go1.1.2.${GOOS}-${GOARCH}.${EXTENSION}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- )
-
- set(GOPATH ${CMAKE_SOURCE_DIR}/../..)
- set(GOROOT ${CMAKE_BINARY_DIR}/Go-prefix/src/Go)
- set(ENV{GOPATH} ${GOPATH})
- set(ENV{GOROOT} ${GOROOT})
- set(GOEXE ${CMAKE_BINARY_DIR}/Go-prefix/src/Go/bin/go${EXESUFFIX})
- add_custom_command(OUTPUT ${GOEXE}
- DEPENDS Go
- )
-endif()
-
-if(EXISTS ${GOEXE})
- foreach(var GOPATH GOROOT GOARCH GOOS)
- execute_process(COMMAND ${GOEXE} env ${var} OUTPUT_VARIABLE ${var} OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("${var}: " ${${var}})
- endforeach(var)
-endif()
-
-if(WIN32)
- file(WRITE "${CMAKE_BINARY_DIR}/go.bat" "
-set GOROOT=${GOROOT}
-set GOPATH=${GOPATH}
-set PATH=%PATH%;${CMAKE_BINARY_DIR}/dist/bin;${GOROOT}/bin;${CMAKE_BINARY_DIR}
-${GOEXE} %*
-")
- set(GOCMD ${CMAKE_BINARY_DIR}/go.bat)
- if(GOPATH)
- string(REGEX REPLACE ";.*" "" GOPATH ${GOPATH})
- endif()
-else()
- set(GOCMD PATH=$ENV{PATH}:${CMAKE_BINARY_DIR}/Go-prefix/src/Go/bin LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_BINARY_DIR}/dist/lib GOROOT=${GOROOT} GOPATH=${GOPATH} ${GOEXE})
- if(GOPATH)
- string(REGEX REPLACE ":.*" "" GOPATH ${GOPATH})
- endif()
-endif()
-
-set(GOPKG ${GOPATH}/pkg/${GOOS}_${GOARCH})
-foreach(pkg code.google.com/p/log4go github.com/quarnster/parser github.com/quarnster/util/text github.com/howeyc/fsnotify)
- add_custom_command(OUTPUT ${GOPKG}/${pkg}.a
- COMMAND ${GOCMD} get ${pkg}
- DEPENDS ${GOEXE} ${GODEPS}
- )
-endforeach()
-
-add_custom_command(OUTPUT ${GOPATH}/bin/pegparser${EXESUFFIX}
- COMMAND ${GOCMD} install github.com/quarnster/parser/pegparser
- DEPENDS ${GOEXE}
- DEPENDS ${GOPKG}/github.com/quarnster/parser.a
-)
-
-add_custom_command(OUTPUT ${GOPKG}/lime/3rdparty/libs/gopy/lib.a
- COMMAND ${GOCMD} install lime/3rdparty/libs/gopy/lib
- DEPENDS ${CMAKE_SOURCE_DIR}/3rdparty/libs/gopy/lib/cgo.go
-)
-
-macro(add_peg peg ignore testfile)
- string(REPLACE ".peg" "_generated.go" GOFILE ${peg})
- get_filename_component(dir ${GOFILE} PATH)
- get_filename_component(BASE ${GOFILE} NAME_WE)
- set(header "// This file was generated, and shouldn't be manually changed")
- add_custom_command(OUTPUT ${GOFILE}
- COMMAND ${GOPATH}/bin/pegparser -peg=${peg} -outpath=${dir} -outfile=${BASE} -header=${header} -notest -ignore=${ignore} -testfile=${testfile}
- DEPENDS ${GOPATH}/bin/pegparser${EXESUFFIX}
- DEPENDS ${peg}
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- VERBATIM
- )
- set(PEGDEPENDS ${PEGDEPENDS} ${GOFILE})
-endmacro(add_peg)
-
-add_peg(${CMAKE_SOURCE_DIR}/backend/loaders/json/json.peg "JsonFile,Values,Value,Null,Dictionary,Array,KeyValuePairs,KeyValuePair,QuotedText,Text,Integer,Float,Boolean,Spacing,Comment" "testdata/Default (OSX).sublime-keymap")
-add_peg(${CMAKE_SOURCE_DIR}/backend/loaders/plist/plist.peg "Spacing,KeyValuePair,KeyTag,StringTag,Value,Values,PlistFile,Plist" "testdata/C.plist")
-
-add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/backend/sublime/region_generated.go
- COMMAND ${GOCMD} run ${CMAKE_SOURCE_DIR}/tasks/build/gen_python_api.go
- DEPENDS godep
- DEPENDS ${PEGDEPENDS}
- DEPENDS ${CMAKE_SOURCE_DIR}/tasks/build/gen_python_api.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/command.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/commandhandler.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/editor.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/events.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/key.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/packages.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/view.go
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/window.go
-)
-
-add_custom_target(fix
- COMMAND ${GOCMD} run ${CMAKE_SOURCE_DIR}/tasks/build/fix.go
- DEPENDS ${PEGDEPENDS}
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/sublime/region_generated.go
-)
-
-add_custom_target(godep
- DEPENDS ${GOPATH}/pkg/${GOOS}_${GOARCH}/github.com/howeyc/fsnotify.a
-)
-
-add_custom_target(lime
- DEPENDS ${CMAKE_SOURCE_DIR}/backend/sublime/region_generated.go
- DEPENDS ${GOPATH}/pkg/${GOOS}_${GOARCH}/lime/3rdparty/libs/gopy/lib.a
- DEPENDS Oniguruma
- DEPENDS fix
-)
-
-add_custom_target(termbox ALL
- COMMAND ${GOCMD} build
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/frontend/termbox
- DEPENDS lime
-)
-
-add_custom_target(html ALL
- COMMAND ${GOCMD} build
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/frontend/html
- DEPENDS lime
-)
-
-file(GLOB_RECURSE TESTS ${CMAKE_SOURCE_DIR} "*_test.go")
-foreach(testfile ${TESTS})
- if(${testfile} MATCHES ".*._test.go")
- if(NOT ${testfile} MATCHES "bundles|tasks")
- get_filename_component(dir ${testfile} PATH)
- string(REPLACE ${CMAKE_SOURCE_DIR} "lime" dir ${dir})
- set(GO_TESTS ${GO_TESTS} ${dir})
- endif()
- endif()
-endforeach(testfile)
-
-add_custom_target(test
- COMMAND ${GOCMD} test -i ${GO_TESTS}
- COMMAND ${GOCMD} test -v ${GO_TESTS}
- DEPENDS lime
-)
diff --git a/backend/commandhandler.go b/backend/commandhandler.go
index 8cd2266..cc902a1 100644
--- a/backend/commandhandler.go
+++ b/backend/commandhandler.go
@@ -7,7 +7,7 @@ package backend
import (
"code.google.com/p/log4go"
"fmt"
- . "lime/backend/util"
+ . "github.com/limetext/lime/backend/util"
"reflect"
"regexp"
"strings"
diff --git a/backend/commands/case.go b/backend/commands/case.go
index 6065881..206dc93 100644
--- a/backend/commands/case.go
+++ b/backend/commands/case.go
@@ -5,7 +5,7 @@
package commands
import (
- . "lime/backend"
+ . "github.com/limetext/lime/backend"
"strings"
"unicode"
)
diff --git a/backend/commands/case_test.go b/backend/commands/case_test.go
index 21a801e..e9cef45 100644
--- a/backend/commands/case_test.go
+++ b/backend/commands/case_test.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
. "github.com/quarnster/util/text"
- . "lime/backend"
"testing"
)
diff --git a/backend/commands/find.go b/backend/commands/find.go
index 8f71154..34b7450 100644
--- a/backend/commands/find.go
+++ b/backend/commands/find.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
. "github.com/quarnster/util/text"
- . "lime/backend"
)
type (
diff --git a/backend/commands/find_test.go b/backend/commands/find_test.go
index 27b89fc..0ff86dc 100644
--- a/backend/commands/find_test.go
+++ b/backend/commands/find_test.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
. "github.com/quarnster/util/text"
- . "lime/backend"
"reflect"
"testing"
)
diff --git a/backend/commands/glue.go b/backend/commands/glue.go
index b0b0bdc..37ba902 100644
--- a/backend/commands/glue.go
+++ b/backend/commands/glue.go
@@ -6,7 +6,7 @@ package commands
import (
"fmt"
- "lime/backend"
+ "github.com/limetext/lime/backend"
)
const lime_cmd_mark = "lime.cmd.mark"
diff --git a/backend/commands/glue_test.go b/backend/commands/glue_test.go
index 35f6186..bf5fbc9 100644
--- a/backend/commands/glue_test.go
+++ b/backend/commands/glue_test.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- . "lime/backend"
"testing"
)
diff --git a/backend/commands/insdel.go b/backend/commands/insdel.go
index 965521b..a4d4376 100644
--- a/backend/commands/insdel.go
+++ b/backend/commands/insdel.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- . "lime/backend"
)
type (
diff --git a/backend/commands/insdel_test.go b/backend/commands/insdel_test.go
index f4dccc3..96a822b 100644
--- a/backend/commands/insdel_test.go
+++ b/backend/commands/insdel_test.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
. "github.com/quarnster/util/text"
- . "lime/backend"
"reflect"
"strings"
"testing"
diff --git a/backend/commands/move.go b/backend/commands/move.go
index 2c09dc6..401d07e 100644
--- a/backend/commands/move.go
+++ b/backend/commands/move.go
@@ -6,13 +6,12 @@ package commands
import (
"fmt"
+ . "github.com/limetext/lime/backend"
+ "github.com/limetext/lime/backend/util" // Beginning of line
"github.com/quarnster/util/text"
- . "lime/backend"
- "lime/backend/util"
)
const (
- // Beginning of line
BOL MoveToType = iota
// End of line
EOL
diff --git a/backend/commands/move_test.go b/backend/commands/move_test.go
index b879d2b..c969e32 100644
--- a/backend/commands/move_test.go
+++ b/backend/commands/move_test.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
. "github.com/quarnster/util/text"
- . "lime/backend"
"reflect"
"testing"
)
diff --git a/backend/commands/register.go b/backend/commands/register.go
index fecc87a..f71bddd 100644
--- a/backend/commands/register.go
+++ b/backend/commands/register.go
@@ -6,7 +6,7 @@ package commands
import (
"code.google.com/p/log4go"
- "lime/backend"
+ "github.com/limetext/lime/backend"
)
type cmd struct {
diff --git a/backend/commands/undoredo.go b/backend/commands/undoredo.go
index 46ef0be..951180a 100644
--- a/backend/commands/undoredo.go
+++ b/backend/commands/undoredo.go
@@ -5,7 +5,7 @@
package commands
import (
- "lime/backend"
+ "github.com/limetext/lime/backend"
)
type (
diff --git a/backend/commands/undoredo_test.go b/backend/commands/undoredo_test.go
index c8d8187..31652be 100644
--- a/backend/commands/undoredo_test.go
+++ b/backend/commands/undoredo_test.go
@@ -5,8 +5,8 @@
package commands
import (
+ . "github.com/limetext/lime/backend"
. "github.com/quarnster/util/text"
- . "lime/backend"
"testing"
)
diff --git a/backend/editor.go b/backend/editor.go
index 742ed67..1c43267 100644
--- a/backend/editor.go
+++ b/backend/editor.go
@@ -8,10 +8,10 @@ import (
"code.google.com/p/log4go"
"fmt"
"github.com/howeyc/fsnotify"
+ "github.com/limetext/lime/backend/loaders"
+ . "github.com/limetext/lime/backend/util"
. "github.com/quarnster/util/text"
"io/ioutil"
- "lime/backend/loaders"
- . "lime/backend/util"
"runtime"
"runtime/debug"
"sync"
diff --git a/backend/key.go b/backend/key.go
index cef15c8..85b73b0 100644
--- a/backend/key.go
+++ b/backend/key.go
@@ -9,7 +9,7 @@ import (
"code.google.com/p/log4go"
"encoding/json"
"fmt"
- . "lime/backend/util"
+ . "github.com/limetext/lime/backend/util"
"sort"
"strings"
"unicode"
diff --git a/backend/key_test.go b/backend/key_test.go
index de1bde6..78e13f5 100644
--- a/backend/key_test.go
+++ b/backend/key_test.go
@@ -5,8 +5,8 @@
package backend
import (
+ "github.com/limetext/lime/backend/loaders"
"io/ioutil"
- "lime/backend/loaders"
"testing"
)
diff --git a/backend/loaders/json.go b/backend/loaders/json.go
index abb5b57..4547559 100644
--- a/backend/loaders/json.go
+++ b/backend/loaders/json.go
@@ -8,8 +8,8 @@ import (
sj "encoding/json"
"errors"
"fmt"
+ "github.com/limetext/lime/backend/loaders/json"
. "github.com/quarnster/util/text"
- "lime/backend/loaders/json"
)
func LoadJSON(data []byte, intf interface{}) error {
diff --git a/backend/loaders/plist.go b/backend/loaders/plist.go
index 3703559..33e353b 100644
--- a/backend/loaders/plist.go
+++ b/backend/loaders/plist.go
@@ -8,8 +8,8 @@ import (
"bytes"
"errors"
"fmt"
+ "github.com/limetext/lime/backend/loaders/plist"
"github.com/quarnster/parser"
- "lime/backend/loaders/plist"
"strings"
)
diff --git a/backend/parser/parser.go b/backend/parser/parser.go
index 0ee3d6b..8dd756a 100644
--- a/backend/parser/parser.go
+++ b/backend/parser/parser.go
@@ -16,9 +16,9 @@ package parser
import (
"bytes"
+ "github.com/limetext/lime/backend/render"
"github.com/quarnster/parser"
"github.com/quarnster/util/text"
- "lime/backend/render"
"sort"
"sync"
)
diff --git a/backend/render/textmate/syntax.go b/backend/render/textmate/syntax.go
index a77d4c0..49d714f 100644
--- a/backend/render/textmate/syntax.go
+++ b/backend/render/textmate/syntax.go
@@ -5,10 +5,10 @@
package textmate
import (
+ "github.com/limetext/lime/backend/render"
+ "github.com/limetext/lime/backend/textmate"
"github.com/quarnster/parser"
"github.com/quarnster/util/text"
- "lime/backend/render"
- "lime/backend/textmate"
"sync"
)
diff --git a/backend/sublime/commands_generated.go b/backend/sublime/commands_generated.go
index e0942bc..45e7392 100644
--- a/backend/sublime/commands_generated.go
+++ b/backend/sublime/commands_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/commands_manual.go b/backend/sublime/commands_manual.go
index e5d2289..e47917e 100644
--- a/backend/sublime/commands_manual.go
+++ b/backend/sublime/commands_manual.go
@@ -7,10 +7,10 @@ package sublime
import (
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
+ "github.com/limetext/lime/backend/util"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
- "lime/backend/util"
)
var (
diff --git a/backend/sublime/conversion_manual.go b/backend/sublime/conversion_manual.go
index 9a191aa..5b210c8 100644
--- a/backend/sublime/conversion_manual.go
+++ b/backend/sublime/conversion_manual.go
@@ -6,9 +6,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
"reflect"
)
diff --git a/backend/sublime/edit_generated.go b/backend/sublime/edit_generated.go
index 0cef2c5..5d0fb35 100644
--- a/backend/sublime/edit_generated.go
+++ b/backend/sublime/edit_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/events_manual.go b/backend/sublime/events_manual.go
index 9e878e2..8bb1226 100644
--- a/backend/sublime/events_manual.go
+++ b/backend/sublime/events_manual.go
@@ -7,9 +7,9 @@ package sublime
import (
"code.google.com/p/log4go"
"fmt"
- "github.com/quarnster/util/text" //"time"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend" //"time"
+ "github.com/quarnster/util/text"
)
var (
diff --git a/backend/sublime/frontend_generated.go b/backend/sublime/frontend_generated.go
index 5ceef8a..2b9f52a 100644
--- a/backend/sublime/frontend_generated.go
+++ b/backend/sublime/frontend_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/region_generated.go b/backend/sublime/region_generated.go
index e328d75..167dde8 100644
--- a/backend/sublime/region_generated.go
+++ b/backend/sublime/region_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/region_manual.go b/backend/sublime/region_manual.go
index f3a5f34..95eb3e4 100644
--- a/backend/sublime/region_manual.go
+++ b/backend/sublime/region_manual.go
@@ -6,8 +6,8 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
)
func (o *Region) PyRichCompare(other py.Object, op py.Op) (py.Object, error) {
diff --git a/backend/sublime/regionset_generated.go b/backend/sublime/regionset_generated.go
index db680b1..3dc7f09 100644
--- a/backend/sublime/regionset_generated.go
+++ b/backend/sublime/regionset_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/settings_generated.go b/backend/sublime/settings_generated.go
index 7a3cf7a..e290ecf 100644
--- a/backend/sublime/settings_generated.go
+++ b/backend/sublime/settings_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/settings_manual.go b/backend/sublime/settings_manual.go
index 43a3941..e751d51 100644
--- a/backend/sublime/settings_manual.go
+++ b/backend/sublime/settings_manual.go
@@ -6,7 +6,7 @@ package sublime
import (
"fmt"
- "lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
)
func (o *Settings) Py_get(tu *py.Tuple, kw *py.Dict) (py.Object, error) {
diff --git a/backend/sublime/sublime_api_generated.go b/backend/sublime/sublime_api_generated.go
index 94ccf7e..b81944a 100644
--- a/backend/sublime/sublime_api_generated.go
+++ b/backend/sublime/sublime_api_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/sublime_manual.go b/backend/sublime/sublime_manual.go
index 13842f9..880960b 100644
--- a/backend/sublime/sublime_manual.go
+++ b/backend/sublime/sublime_manual.go
@@ -7,9 +7,9 @@ package sublime
import (
"code.google.com/p/log4go"
"fmt"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
- "lime/backend/render"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
+ "github.com/limetext/lime/backend/render"
"os"
"strings"
"time"
diff --git a/backend/sublime/sublime_test.go b/backend/sublime/sublime_test.go
index c41b060..c6fb69a 100644
--- a/backend/sublime/sublime_test.go
+++ b/backend/sublime/sublime_test.go
@@ -8,12 +8,12 @@ import (
"bytes"
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
+ _ "github.com/limetext/lime/backend/commands"
+ "github.com/limetext/lime/backend/util"
"github.com/quarnster/util/text"
"io/ioutil"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
- _ "lime/backend/commands"
- "lime/backend/util"
"os"
"path/filepath"
"strings"
diff --git a/backend/sublime/view_buffer_generated.go b/backend/sublime/view_buffer_generated.go
index 178a9de..fd49a53 100644
--- a/backend/sublime/view_buffer_generated.go
+++ b/backend/sublime/view_buffer_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/view_generated.go b/backend/sublime/view_generated.go
index ba2a9cd..d68e781 100644
--- a/backend/sublime/view_generated.go
+++ b/backend/sublime/view_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/view_manual.go b/backend/sublime/view_manual.go
index abc84db..6273104 100644
--- a/backend/sublime/view_manual.go
+++ b/backend/sublime/view_manual.go
@@ -7,9 +7,9 @@ package sublime
import (
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var _ = log4go.Error
diff --git a/backend/sublime/window_generated.go b/backend/sublime/window_generated.go
index 30a3bbc..658240d 100644
--- a/backend/sublime/window_generated.go
+++ b/backend/sublime/window_generated.go
@@ -7,9 +7,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/sublime/window_manual.go b/backend/sublime/window_manual.go
index 56d3e51..1a13f33 100644
--- a/backend/sublime/window_manual.go
+++ b/backend/sublime/window_manual.go
@@ -6,9 +6,9 @@ package sublime
import (
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
)
var (
diff --git a/backend/textmate/language.go b/backend/textmate/language.go
index f25e1d0..ad6aca6 100644
--- a/backend/textmate/language.go
+++ b/backend/textmate/language.go
@@ -9,11 +9,11 @@ import (
"encoding/json"
"errors"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/rubex"
+ "github.com/limetext/lime/backend/loaders"
"github.com/quarnster/parser"
"github.com/quarnster/util/text"
"io/ioutil"
- "lime/3rdparty/libs/rubex"
- "lime/backend/loaders"
"strconv"
"strings"
"sync"
diff --git a/backend/textmate/language_test.go b/backend/textmate/language_test.go
index d2cb1f7..69b3d31 100644
--- a/backend/textmate/language_test.go
+++ b/backend/textmate/language_test.go
@@ -6,9 +6,9 @@ package textmate
import (
"fmt"
+ "github.com/limetext/lime/backend/util"
+ lu "github.com/limetext/lime/backend/util"
"io/ioutil"
- "lime/backend/util"
- lu "lime/backend/util"
"testing"
)
diff --git a/backend/textmate/testdata/go2.go b/backend/textmate/testdata/go2.go
index 297606d..d745929 100644
--- a/backend/textmate/testdata/go2.go
+++ b/backend/textmate/testdata/go2.go
@@ -5,5 +5,5 @@ package main
import (
"code.google.com/p/log4go"
-// "fmt"
+ // "fmt"
)
diff --git a/backend/textmate/testdata/main.go b/backend/textmate/testdata/main.go
index fbddb0b..0765e2f 100644
--- a/backend/textmate/testdata/main.go
+++ b/backend/textmate/testdata/main.go
@@ -3,13 +3,13 @@ package main
import (
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/termbox-go"
+ "github.com/limetext/lime/backend"
+ "github.com/limetext/lime/backend/loaders"
+ "github.com/limetext/lime/backend/sublime"
+ "github.com/limetext/lime/backend/textmate"
"io/ioutil"
- "lime/3rdparty/libs/termbox-go"
- "lime/backend"
- "lime/backend/loaders"
"lime/backend/primitives"
- "lime/backend/sublime"
- "lime/backend/textmate"
"strings"
"time"
)
diff --git a/backend/textmate/theme.go b/backend/textmate/theme.go
index 617f757..540256c 100644
--- a/backend/textmate/theme.go
+++ b/backend/textmate/theme.go
@@ -8,10 +8,10 @@ import (
"code.google.com/p/log4go"
"encoding/json"
"fmt"
+ "github.com/limetext/lime/backend/loaders"
+ "github.com/limetext/lime/backend/render"
"image/color"
"io/ioutil"
- "lime/backend/loaders"
- "lime/backend/render"
"strconv"
"strings"
)
diff --git a/backend/textmate/theme_test.go b/backend/textmate/theme_test.go
index 8e4a1e9..ef4bc3a 100644
--- a/backend/textmate/theme_test.go
+++ b/backend/textmate/theme_test.go
@@ -6,9 +6,9 @@ package textmate
import (
"fmt"
+ "github.com/limetext/lime/backend/loaders"
+ "github.com/limetext/lime/backend/util"
"io/ioutil"
- "lime/backend/loaders"
- "lime/backend/util"
"testing"
)
diff --git a/backend/view.go b/backend/view.go
index fe0aa4e..6057343 100644
--- a/backend/view.go
+++ b/backend/view.go
@@ -7,11 +7,11 @@ package backend
import (
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/backend/parser"
+ "github.com/limetext/lime/backend/render"
+ "github.com/limetext/lime/backend/textmate"
+ . "github.com/limetext/lime/backend/util"
. "github.com/quarnster/util/text"
- "lime/backend/parser"
- "lime/backend/render"
- "lime/backend/textmate"
- . "lime/backend/util"
"reflect"
"runtime/debug"
"strings"
diff --git a/backend/view_test.go b/backend/view_test.go
index 27bddb6..75344f0 100644
--- a/backend/view_test.go
+++ b/backend/view_test.go
@@ -6,10 +6,10 @@ package backend
import (
"fmt"
+ "github.com/limetext/lime/backend/textmate"
+ "github.com/limetext/lime/backend/util"
. "github.com/quarnster/util/text"
"io/ioutil"
- "lime/backend/textmate"
- "lime/backend/util"
"math/rand"
"reflect"
"testing"
diff --git a/frontend/html/main.go b/frontend/html/main.go
index 158bb47..e99a500 100644
--- a/frontend/html/main.go
+++ b/frontend/html/main.go
@@ -6,15 +6,15 @@ package main
import (
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
+ _ "github.com/limetext/lime/backend/commands"
+ "github.com/limetext/lime/backend/render"
+ "github.com/limetext/lime/backend/sublime"
+ "github.com/limetext/lime/backend/textmate"
+ "github.com/limetext/lime/backend/util"
. "github.com/quarnster/util/text"
"io"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
- _ "lime/backend/commands"
- "lime/backend/render"
- "lime/backend/sublime"
- "lime/backend/textmate"
- "lime/backend/util"
"net/http"
"runtime/debug"
"strconv"
diff --git a/frontend/qml/main.go b/frontend/qml/main.go
index 68f90e8..6446cc5 100644
--- a/frontend/qml/main.go
+++ b/frontend/qml/main.go
@@ -7,17 +7,17 @@ import (
"bytes"
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/backend"
+ _ "github.com/limetext/lime/backend/commands"
+ "github.com/limetext/lime/backend/render"
+ "github.com/limetext/lime/backend/sublime"
+ "github.com/limetext/lime/backend/textmate"
+ "github.com/limetext/lime/backend/util"
"github.com/niemeyer/qml"
. "github.com/quarnster/util/text"
"image/color"
"io"
- "lime/3rdparty/libs/gopy/lib"
- "lime/backend"
- _ "lime/backend/commands"
- "lime/backend/render"
- "lime/backend/sublime"
- "lime/backend/textmate"
- "lime/backend/util"
"sync"
)
diff --git a/frontend/termbox/main.go b/frontend/termbox/main.go
index e11c1e8..c5289e6 100644
--- a/frontend/termbox/main.go
+++ b/frontend/termbox/main.go
@@ -6,14 +6,14 @@ package main
import (
"code.google.com/p/log4go"
"fmt"
+ "github.com/limetext/lime/3rdparty/libs/gopy/lib"
+ "github.com/limetext/lime/3rdparty/libs/termbox-go"
+ "github.com/limetext/lime/backend"
+ _ "github.com/limetext/lime/backend/commands"
+ "github.com/limetext/lime/backend/sublime"
+ "github.com/limetext/lime/backend/textmate"
+ "github.com/limetext/lime/backend/util"
. "github.com/quarnster/util/text"
- "lime/3rdparty/libs/gopy/lib"
- "lime/3rdparty/libs/termbox-go"
- "lime/backend"
- _ "lime/backend/commands"
- "lime/backend/sublime"
- "lime/backend/textmate"
- "lime/backend/util"
"runtime/debug"
"strconv"
"sync"
diff --git a/frontend/termbox/main_test.go b/frontend/termbox/main_test.go
index 494146b..f2ce2b0 100644
--- a/frontend/termbox/main_test.go
+++ b/frontend/termbox/main_test.go
@@ -5,7 +5,7 @@
package main
import (
- "lime/3rdparty/libs/termbox-go"
+ "github.com/limetext/lime/3rdparty/libs/termbox-go"
"testing"
)
diff --git a/tasks/build/gen_python_api.go b/tasks/build/gen_python_api.go
index b7f2d8e..d850351 100644
--- a/tasks/build/gen_python_api.go
+++ b/tasks/build/gen_python_api.go
@@ -10,9 +10,9 @@ package main
import (
"fmt"
+ "github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
"io/ioutil"
- "lime/backend"
"os"
"os/exec"
"path/filepath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment