From cc776730a7ddfb535d95548df6f50387be8718ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 5 Jan 2017 21:59:40 +0100 Subject: ui: remove now unused code --- ui-curses.c | 41 ++++------------------------------------- 1 file changed, 4 insertions(+), 37 deletions(-) (limited to 'ui-curses.c') diff --git a/ui-curses.c b/ui-curses.c index 52b11fc..631f816 100644 --- a/ui-curses.c +++ b/ui-curses.c @@ -1,6 +1,3 @@ -/* parts of the color handling code originates from tmux/colour.c and is - * Copyright (c) 2008 Nicholas Marriott - */ #include #include #include @@ -35,8 +32,6 @@ # define MAX_COLOR_PAIRS COLOR_PAIRS #endif -#define CONTROL(k) ((k)&0x1F) - #ifndef DEBUG_UI #define DEBUG_UI 0 #endif @@ -67,6 +62,10 @@ } while (0); #endif +#define MAX_COLOR_CLOBBER 240 +static short color_clobber_idx = 0; +static uint32_t clobbering_colors[MAX_COLOR_CLOBBER]; + typedef struct { attr_t attr; short fg, bg; @@ -117,38 +116,6 @@ __attribute__((noreturn)) static void ui_die_msg(Ui *ui, const char *msg, ...) { va_end(ap); } -typedef struct { - unsigned char i; - unsigned char r; - unsigned char g; - unsigned char b; -} Color; - -#define MAX_COLOR_CLOBBER (240) -static short color_clobber_idx = 0; -static uint32_t clobbering_colors[MAX_COLOR_CLOBBER]; - -static int color_compare(const void *lhs0, const void *rhs0) { - const Color *lhs = lhs0, *rhs = rhs0; - - if (lhs->r < rhs->r) - return -1; - if (lhs->r > rhs->r) - return 1; - - if (lhs->g < rhs->g) - return -1; - if (lhs->g > rhs->g) - return 1; - - if (lhs->b < rhs->b) - return -1; - if (lhs->b > rhs->b) - return 1; - - return 0; -} - /* Calculate r,g,b components of one of the standard upper 240 colors */ static void get_6cube_rgb(unsigned int n, int *r, int *g, int *b) { -- cgit v1.2.3