diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-08-19 12:46:54 +0200 |
---|---|---|
committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-08-19 12:46:54 +0200 |
commit | ce3f4fc647be3ab28f934db9365445a56ebd85bf (patch) | |
tree | 6e58a363b7cf818e0a3ff32bdcab95a68db8e64e | |
parent | d2f157c7418e2762316e5471f819ec1e5c49e93c (diff) | |
download | st-ce3f4fc647be3ab28f934db9365445a56ebd85bf.tar.gz st-ce3f4fc647be3ab28f934db9365445a56ebd85bf.zip |
fixed backspace problem, updated terminfo entry and moved TNAME in config.h.
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | config.h | 3 | ||||
-rw-r--r-- | st.c | 6 | ||||
-rw-r--r-- | st.info | 9 |
4 files changed, 12 insertions, 7 deletions
@@ -42,7 +42,6 @@ install: all | |||
42 | @cp -f st ${DESTDIR}${PREFIX}/bin | 42 | @cp -f st ${DESTDIR}${PREFIX}/bin |
43 | @chmod 755 ${DESTDIR}${PREFIX}/bin/st | 43 | @chmod 755 ${DESTDIR}${PREFIX}/bin/st |
44 | @tic st.info | 44 | @tic st.info |
45 | @tic st-256color.info | ||
46 | 45 | ||
47 | uninstall: | 46 | uninstall: |
48 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin | 47 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin |
@@ -1,5 +1,5 @@ | |||
1 | #define TAB 8 | 1 | #define TAB 8 |
2 | 2 | #define TNAME "st-256color" | |
3 | #define FONT "6x13" | 3 | #define FONT "6x13" |
4 | #define BOLDFONT FONT"bold" | 4 | #define BOLDFONT FONT"bold" |
5 | #define BORDER 2 | 5 | #define BORDER 2 |
@@ -33,6 +33,7 @@ static const char *colorname[] = { | |||
33 | 33 | ||
34 | /* special keys */ | 34 | /* special keys */ |
35 | static Key key[] = { | 35 | static Key key[] = { |
36 | { XK_BackSpace, "\177" }, | ||
36 | { XK_Delete, "\033[3~" }, | 37 | { XK_Delete, "\033[3~" }, |
37 | { XK_Home, "\033[1~" }, | 38 | { XK_Home, "\033[1~" }, |
38 | { XK_End, "\033[4~" }, | 39 | { XK_End, "\033[4~" }, |
@@ -20,8 +20,6 @@ | |||
20 | #include <X11/keysym.h> | 20 | #include <X11/keysym.h> |
21 | #include <X11/Xutil.h> | 21 | #include <X11/Xutil.h> |
22 | 22 | ||
23 | #define TNAME "st-256color" | ||
24 | |||
25 | /* Arbitrary sizes */ | 23 | /* Arbitrary sizes */ |
26 | #define ESC_TITLE_SIZ 256 | 24 | #define ESC_TITLE_SIZ 256 |
27 | #define ESC_BUF_SIZ 256 | 25 | #define ESC_BUF_SIZ 256 |
@@ -107,8 +105,6 @@ typedef struct { | |||
107 | char s[ESC_BUF_SIZ]; | 105 | char s[ESC_BUF_SIZ]; |
108 | } Key; | 106 | } Key; |
109 | 107 | ||
110 | #include "config.h" | ||
111 | |||
112 | /* Drawing Context */ | 108 | /* Drawing Context */ |
113 | typedef struct { | 109 | typedef struct { |
114 | unsigned long col[256]; | 110 | unsigned long col[256]; |
@@ -117,6 +113,8 @@ typedef struct { | |||
117 | GC gc; | 113 | GC gc; |
118 | } DC; | 114 | } DC; |
119 | 115 | ||
116 | #include "config.h" | ||
117 | |||
120 | static void die(const char *errstr, ...); | 118 | static void die(const char *errstr, ...); |
121 | static void draw(int); | 119 | static void draw(int); |
122 | static void execsh(void); | 120 | static void execsh(void); |
@@ -30,7 +30,7 @@ st| simpleterm, | |||
30 | il1=\E[L, | 30 | il1=\E[L, |
31 | ind=^J, | 31 | ind=^J, |
32 | invis=\E[8m, | 32 | invis=\E[8m, |
33 | kbs=^H, | 33 | kbs=\177, |
34 | kcub1=\E[D, | 34 | kcub1=\E[D, |
35 | kcud1=\E[B, | 35 | kcud1=\E[B, |
36 | kcuf1=\E[C, | 36 | kcuf1=\E[C, |
@@ -52,3 +52,10 @@ st| simpleterm, | |||
52 | smso=\E[7m, | 52 | smso=\E[7m, |
53 | smul=\E[4m, | 53 | smul=\E[4m, |
54 | tbc=\E[2g, | 54 | tbc=\E[2g, |
55 | |||
56 | st-256color| simpleterm with 256 colors, | ||
57 | colors#256, | ||
58 | # Nicked from xterm-256color | ||
59 | setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, | ||
60 | setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, | ||
61 | use=st, | ||