diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-07 10:29:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-07 10:29:06 +0000 |
commit | e6d35b6aa49ca708f62a289bc7c44ad09f5a393f (patch) | |
tree | 2ada93cebada7d5bee775832411894ddad6b1680 /tty-term.c | |
parent | 521fa7d6409da23ff3f9f357dc8244374ef01a9e (diff) | |
download | rtmux-e6d35b6aa49ca708f62a289bc7c44ad09f5a393f.tar.gz rtmux-e6d35b6aa49ca708f62a289bc7c44ad09f5a393f.tar.bz2 rtmux-e6d35b6aa49ca708f62a289bc7c44ad09f5a393f.zip |
Support for 88 colour terminals.
Diffstat (limited to 'tty-term.c')
-rw-r--r-- | tty-term.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: tty-term.c,v 1.16 2009-03-02 18:05:40 nicm Exp $ */ +/* $Id: tty-term.c,v 1.17 2009-03-07 10:29:06 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -310,7 +310,7 @@ tty_term_find(char *name, int fd, char **cause) term->flags |= TERM_HASDEFAULTS; /* - * Try to figure out if we have 256 colours. The standard xterm + * Try to figure out if we have 256 or 88 colours. The standard xterm * definitions are broken (well, or the way they are parsed is: in any * case they end up returning 8). So also do a hack. */ @@ -318,6 +318,10 @@ tty_term_find(char *name, int fd, char **cause) term->flags |= TERM_256COLOURS; if (strstr(name, "256col") != NULL) /* XXX HACK */ term->flags |= TERM_256COLOURS; + if (tty_term_number(term, TTYC_COLORS) == 88) + term->flags |= TERM_88COLOURS; + if (strstr(name, "88col") != NULL) /* XXX HACK */ + term->flags |= TERM_88COLOURS; return (term); |