From d9a3e89f501800c3e7c779b7e9545a5c80134593 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 16 May 2010 23:42:13 +0200 Subject: 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 --- miscutils/fbsplash.c | 4 ++-- miscutils/less.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'miscutils') diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 5974006bb..e370d207b 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c @@ -359,7 +359,7 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv) if (fifo_filename && bCursorOff) { // hide cursor (BEFORE any fb ops) - full_write(STDOUT_FILENO, "\x1b" "[?25l", 6); + full_write(STDOUT_FILENO, "\033[?25l", 6); } fb_drawimage(); @@ -404,7 +404,7 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv) } if (bCursorOff) // restore cursor - full_write(STDOUT_FILENO, "\x1b" "[?25h", 6); + full_write(STDOUT_FILENO, "\033[?25h", 6); return EXIT_SUCCESS; } diff --git a/miscutils/less.c b/miscutils/less.c index e4f8ab979..848266212 100644 --- a/miscutils/less.c +++ b/miscutils/less.c @@ -29,11 +29,11 @@ #endif /* The escape codes for highlighted and normal text */ -#define HIGHLIGHT "\033[7m" -#define NORMAL "\033[0m" -/* The escape code to clear the screen */ -#define CLEAR "\033[H\033[J" -/* The escape code to clear to end of line */ +#define HIGHLIGHT "\033[7m" +#define NORMAL "\033[0m" +/* The escape code to home and clear to the end of screen */ +#define CLEAR "\033[H\033[J" +/* The escape code to clear to the end of line */ #define CLEAR_2_EOL "\033[K" enum { -- cgit v1.2.3