diff options
author | Denys Vlasenko | 2010-05-16 23:42:13 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-05-16 23:42:13 +0200 |
commit | d9a3e89f501800c3e7c779b7e9545a5c80134593 (patch) | |
tree | ba3b65ce2d512542a27e78f4820d799008bc0b4c /editors | |
parent | 26e2c1db0df35df1affa558efc12d2bcfd7718e2 (diff) | |
download | busybox-d9a3e89f501800c3e7c779b7e9545a5c80134593.zip busybox-d9a3e89f501800c3e7c779b7e9545a5c80134593.tar.gz |
consolidate ESC sequences
function old new delta
bell 2 - -2
CMdown 2 - -2
Ceos 4 - -4
Ceol 4 - -4
CMup 4 - -4
SOs 5 - -5
SOn 5 - -5
CMrc 9 - -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/vi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editors/vi.c b/editors/vi.c index b8cacb4..d9124fd 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -60,18 +60,18 @@ enum { /* vt102 typical ESC sequence */ /* terminal standout start/normal ESC sequence */ -static const char SOs[] ALIGN1 = "\033[7m"; -static const char SOn[] ALIGN1 = "\033[0m"; +#define SOs "\033[7m" +#define SOn "\033[0m" /* terminal bell sequence */ -static const char bell[] ALIGN1 = "\007"; +#define bell "\007" /* Clear-end-of-line and Clear-end-of-screen ESC sequence */ -static const char Ceol[] ALIGN1 = "\033[K"; -static const char Ceos[] ALIGN1 = "\033[J"; +#define Ceol "\033[K" +#define Ceos "\033[J" /* Cursor motion arbitrary destination ESC sequence */ -static const char CMrc[] ALIGN1 = "\033[%d;%dH"; +#define CMrc "\033[%u;%uH" /* Cursor motion up and down ESC sequence */ -static const char CMup[] ALIGN1 = "\033[A"; -static const char CMdown[] ALIGN1 = "\n"; +#define CMup "\033[A" +#define CMdown "\n" #if ENABLE_FEATURE_VI_DOT_CMD || ENABLE_FEATURE_VI_YANKMARK // cmds modifying text[] |