From a40115fb3baacb82e63b91f7114246f2d712b488 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 24 Jul 2012 02:16:21 +0000 Subject: [PATCH] lets try pretend to be xterm-256color and see how this works? SVN revision: 74333 --- src/bin/col.c | 28 ++++++++++++++-------------- src/bin/termpty.c | 4 +++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/bin/col.c b/src/bin/col.c index 5293703b..1787f2f1 100644 --- a/src/bin/col.c +++ b/src/bin/col.c @@ -68,21 +68,21 @@ const Color colors256[256] = { // basic 16 repeated { 0x00, 0x00, 0x00, 0xff }, // COL_BLACK - { 0xcc, 0x33, 0x33, 0xff }, // COL_RED - { 0x33, 0xcc, 0x33, 0xff }, // COL_GREEN - { 0xcc, 0x88, 0x33, 0xff }, // COL_YELLOW - { 0x33, 0x33, 0xcc, 0xff }, // COL_BLUE - { 0xcc, 0x33, 0xcc, 0xff }, // COL_MAGENTA - { 0x33, 0xcc, 0xcc, 0xff }, // COL_CYAN - { 0xcc, 0xcc, 0xcc, 0xff }, // COL_WHITE + { 0xc0, 0x00, 0x00, 0xff }, // COL_RED + { 0x00, 0xc0, 0x00, 0xff }, // COL_GREEN + { 0xc0, 0xc0, 0x00, 0xff }, // COL_YELLOW + { 0x00, 0x00, 0xc0, 0xff }, // COL_BLUE + { 0xc0, 0x00, 0xc0, 0xff }, // COL_MAGENTA + { 0x00, 0xc0, 0xc0, 0xff }, // COL_CYAN + { 0xc0, 0xc0, 0xc0, 0xff }, // COL_WHITE - { 0x66, 0x66, 0x66, 0xff }, // COL_BLACK - { 0xff, 0x66, 0x66, 0xff }, // COL_RED - { 0x66, 0xff, 0x66, 0xff }, // COL_GREEN - { 0xff, 0xff, 0x66, 0xff }, // COL_YELLOW - { 0x66, 0x66, 0xff, 0xff }, // COL_BLUE - { 0xff, 0x66, 0xff, 0xff }, // COL_MAGENTA - { 0x66, 0xff, 0xff, 0xff }, // COL_CYAN + { 0x80, 0x80, 0x80, 0xff }, // COL_BLACK + { 0xff, 0x80, 0x80, 0xff }, // COL_RED + { 0x80, 0xff, 0x80, 0xff }, // COL_GREEN + { 0xff, 0xff, 0x80, 0xff }, // COL_YELLOW + { 0x80, 0x80, 0xff, 0xff }, // COL_BLUE + { 0xff, 0x80, 0xff, 0xff }, // COL_MAGENTA + { 0x80, 0xff, 0xff, 0xff }, // COL_CYAN { 0xff, 0xff, 0xff, 0xff }, // COL_WHITE // pure 6x6x6 colorcube diff --git a/src/bin/termpty.c b/src/bin/termpty.c index d6ec0006..06eee066 100644 --- a/src/bin/termpty.c +++ b/src/bin/termpty.c @@ -310,7 +310,9 @@ termpty_new(const char *cmd, int w, int h, int backscroll) /* TODO: should we reset signals here? */ // pretend to be xterm - putenv("TERM=xterm"); +// putenv("TERM=xterm"); + putenv("TERM=xterm-256color"); + putenv("XTERM_256_COLORS=1"); execvp(args[0], (char *const *)args); exit(127); /* same as system() for failed commands */ }