aboutsummaryrefslogtreecommitdiff
path: root/colour.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2018-10-25 17:02:42 +0100
committerThomas Adam <thomas@xteddy.org>2018-10-25 17:02:42 +0100
commite771f10dc617d46f9096c90f078621a322eeb757 (patch)
treee14bd3fbf23db20666dffb7897b5d18306989f6d /colour.c
parent2808f8261cb132e2faf6fe43cd8a5c7ff66b4c12 (diff)
parentfc41bf46acaccb3da8d0588b7e1bbcfebc6442f6 (diff)
downloadrtmux-e771f10dc617d46f9096c90f078621a322eeb757.tar.gz
rtmux-e771f10dc617d46f9096c90f078621a322eeb757.tar.bz2
rtmux-e771f10dc617d46f9096c90f078621a322eeb757.zip
Merge branch 'obsd-master'
Diffstat (limited to 'colour.c')
-rw-r--r--colour.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/colour.c b/colour.c
index 5be60445..a0274dd3 100644
--- a/colour.c
+++ b/colour.c
@@ -141,6 +141,8 @@ colour_tostring(int c)
return ("white");
case 8:
return ("default");
+ case 9:
+ return ("terminal");
case 90:
return ("brightblack");
case 91:
@@ -188,6 +190,11 @@ colour_fromstring(const char *s)
return (n | COLOUR_FLAG_256);
}
+ if (strcasecmp(s, "default") == 0)
+ return (8);
+ if (strcasecmp(s, "terminal") == 0)
+ return (9);
+
if (strcasecmp(s, "black") == 0 || strcmp(s, "0") == 0)
return (0);
if (strcasecmp(s, "red") == 0 || strcmp(s, "1") == 0)
@@ -204,8 +211,6 @@ colour_fromstring(const char *s)
return (6);
if (strcasecmp(s, "white") == 0 || strcmp(s, "7") == 0)
return (7);
- if (strcasecmp(s, "default") == 0 || strcmp(s, "8") == 0)
- return (8);
if (strcasecmp(s, "brightblack") == 0 || strcmp(s, "90") == 0)
return (90);
if (strcasecmp(s, "brightred") == 0 || strcmp(s, "91") == 0)