From e6d35b6aa49ca708f62a289bc7c44ad09f5a393f Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 7 Mar 2009 10:29:06 +0000 Subject: Support for 88 colour terminals. --- tty-term.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tty-term.c') diff --git a/tty-term.c b/tty-term.c index 55f44e40..61ebcacb 100644 --- a/tty-term.c +++ b/tty-term.c @@ -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 @@ -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); -- cgit